mirror of
https://github.com/cc65/cc65.git
synced 2024-12-24 11:31:31 +00:00
Fix MSVC build broken by #1058
MSVC complains about unary negation of unsigned, but it's intended. Suppress the warning. https://github.com/cc65/cc65/pull/1058#discussion_r451757967 "Tested" with godbolt.org.
This commit is contained in:
parent
359da1ae76
commit
9e5b8d99a3
@ -772,7 +772,11 @@ static SymEntry* ParseStructDecl (const char* Name)
|
||||
*/
|
||||
if (BitOffs > 0) {
|
||||
if (FieldWidth <= 0 || (BitOffs + FieldWidth) > INT_BITS) {
|
||||
/* Bits needed to byte-align the next field. */
|
||||
/* Bits needed to byte-align the next field. MSVC complains
|
||||
** about unary negation of unsigned, but it's intended.
|
||||
** Disable the warning for the next line only.
|
||||
*/
|
||||
#pragma warning(disable: 4146)
|
||||
unsigned PaddingBits = -BitOffs % CHAR_BITS;
|
||||
|
||||
/* We need an anonymous name */
|
||||
|
Loading…
Reference in New Issue
Block a user