mirror of
https://github.com/cc65/cc65.git
synced 2025-01-26 17:36:57 +00:00
Disallowed 'defined' as a macro name.
This commit is contained in:
parent
ae811baaf1
commit
a3a5fbe809
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user