diff options
author | Cyrill Gorcunov <gorcunov@gmail.com> | 2015-02-08 11:07:17 +0300 |
---|---|---|
committer | Cyrill Gorcunov <gorcunov@gmail.com> | 2015-02-08 11:07:17 +0300 |
commit | 6d42e9ba4730dc8472e4ec698e2af549c53861c3 (patch) | |
tree | e5d18a225aee4d313dc6cdd74628d5e2c13c7820 | |
parent | d9ca54b6d2c6ea4faf35908e8f257bd60ea5f382 (diff) | |
download | nasm-6d42e9ba4730dc8472e4ec698e2af549c53861c3.tar.gz |
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>
-rw-r--r-- | preproc.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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; |