check for whitespace before object-like macro body
PATCH 1/1 check for whitespace before object-like macro body
6.10.3(3) requires a whitespace between object-like macro and its replacement list.
Signed-off-by Al Viro <[email protected]>
--- pre-process.c | 15 ++++++++++----- 1 files changed, 10 insertions(+), 5 deletions(-)
pre-process.c +10 -5
@@ -1089,11 +1089,16 @@ static int do_handle_define(struct stream *stream, struct token **line, struct t arglist =NULL ; expansion = left->next; -if (!expansion->pos.whitespace &&match_op (expansion,'(' )) { - arglist = expansion; - expansion =parse_arguments (expansion); -if (!expansion) -return 1 ; +if (!expansion->pos.whitespace) { +if (match_op (expansion,'(' )) { + arglist = expansion; + expansion =parse_arguments (expansion); +if (!expansion) +return 1 ; + }else if (!eof_token (expansion)) { +warning (expansion->pos, +"no whitespace before object-like macro body" ); + } } expansion =parse_expansion (expansion, arglist, name);
Signature · 1 line
1.5.0-rc2.GIT