diff options
Diffstat (limited to 'gcc/cpplex.c')
-rw-r--r-- | gcc/cpplex.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/cpplex.c b/gcc/cpplex.c index b75db74..189333b 100644 --- a/gcc/cpplex.c +++ b/gcc/cpplex.c @@ -1687,6 +1687,12 @@ maybe_macroexpand (pfile, written) not_macro_call: if (macbuf_whitespace) CPP_PUTC (pfile, ' '); + + /* K+R treated this as a hard error. */ + if (CPP_OPTION (pfile, warn_traditional)) + cpp_warning (pfile, + "traditional C rejects function macro %s in non-function context", + hp->name); return 0; } } |