mirror of
https://github.com/cc65/cc65.git
synced 2025-04-08 19:38:55 +00:00
Fixed a standard noncompliance: In C99 and above there must be whitespace
between a name of an object like macro and its replacement list.
This commit is contained in:
parent
2f6f5f0da1
commit
70ca6d4200
@ -2640,6 +2640,18 @@ static void DoDefine (void)
|
||||
goto Error_Handler;
|
||||
}
|
||||
NextChar ();
|
||||
|
||||
} else {
|
||||
|
||||
/* Object like macro. Check ISO/IEC 9899:1999 (E) 6.10.3p3:
|
||||
** "There shall be white-space between the identifier and the
|
||||
** replacement list in the definition of an object-like macro."
|
||||
** Note: C89 doesn't have this constraint.
|
||||
*/
|
||||
if (Std == STD_C99 && !IsSpace (CurC)) {
|
||||
PPWarning ("ISO C99 requires whitespace after the macro name");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* Remove whitespace and comments from the line, store the preprocessed
|
||||
|
Loading…
x
Reference in New Issue
Block a user