mirror of
https://github.com/cc65/cc65.git
synced 2025-08-08 22:25:28 +00:00
Disallowed 'defined' as a macro name.
This commit is contained in:
@@ -1053,6 +1053,12 @@ static void DoDefine (void)
|
||||
/* Remember if we're in C89 mode */
|
||||
C89 = (IS_Get (&Standard) == STD_C89);
|
||||
|
||||
/* Check for forbidden macro names */
|
||||
if (strcmp (Ident, "defined") == 0) {
|
||||
PPError ("'%s' cannot be used as a macro name", Ident);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Create a new macro definition */
|
||||
M = NewMacro (Ident);
|
||||
|
||||
|
Reference in New Issue
Block a user