1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-07 07:29:33 +00:00

Disallowed 'defined' as a macro name.

This commit is contained in:
acqn 2022-08-07 13:56:47 +08:00
parent ae811baaf1
commit a3a5fbe809

View File

@ -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);