From: nasm-bot f. C. G. <gor...@gm...> - 2015-02-08 08:09:25
|
Commit-ID: 6d42e9ba4730dc8472e4ec698e2af549c53861c3 Gitweb: http://repo.or.cz/w/nasm.git?a=commitdiff;h=6d42e9ba4730dc8472e4ec698e2af549c53861c3 Author: Cyrill Gorcunov <gor...@gm...> AuthorDate: Sun, 8 Feb 2015 11:07:17 +0300 Committer: Cyrill Gorcunov <gor...@gm...> CommitDate: Sun, 8 Feb 2015 11:07:17 +0300 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 <the...@gm...> Signed-off-by: Cyrill Gorcunov <gor...@gm...> --- preproc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/preproc.c b/preproc.c index 12b3978..4e05298 100644 --- a/preproc.c +++ b/preproc.c @@ -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; |