mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-02-05 16:51:27 +08:00
preproc: Warn if someone predefines non ID as definition
Not sure if someone is used this but to not break backward compatibility lets simply yield error but don't stop processing. http://bugzilla.nasm.us/show_bug.cgi?id=3392300 Reported-by: Dave Shields <thedaveshields@gmail.com> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
This commit is contained in:
parent
d9ca54b6d2
commit
6d42e9ba47
@ -5203,6 +5203,10 @@ static void pp_pre_define(char *definition)
|
||||
if (equals)
|
||||
*equals = '=';
|
||||
|
||||
if (space->next->type != TOK_PREPROC_ID &&
|
||||
space->next->type != TOK_ID)
|
||||
error(ERR_WARNING, "pre-defining non ID `%s\'\n", definition);
|
||||
|
||||
l = nasm_malloc(sizeof(Line));
|
||||
l->next = predef;
|
||||
l->first = def;
|
||||
|
Loading…
Reference in New Issue
Block a user