Warning from cpp on macro argument stringification is missing
Kaveh R. Ghazi
ghazi@caip.rutgers.edu
Wed Sep 6 08:29:00 GMT 2000
Zack,
There used to be a -Wtraditional warning from cpp on stringification
of macro arguments. It seems to have disappeared.
E.g.
> #define foo(h) "h"
> #define bar(h) 'h'
> foo(f)
> bar(f)
With egcs-1.1.2, gcc -Wtraditional -E, I get:
> f.c:1: warning: macro arg `h' would be stringified with -traditional.
> f.c:2: warning: macro arg `h' would be stringified with -traditional.
> "h"
> 'h'
With egcs-1.1.2, gcc -traditional -Wtraditional -E, I get:
> f.c:1: warning: macro argument `h' is stringified.
> f.c:2: warning: macro argument `h' is stringified.
> "f"
> 'f'
With last night's snapshot, I get no warnings in either case, although
the macro expansion is done appropriately both with and without
-traditional, AFAICT.
This warning is documented in invoke.texi's description of
-Wtraditional and I think its useful, so would you please put it back?
Thanks,
--Kaveh
PS: I'll write a testcase once its back in.
--
Kaveh R. Ghazi Engagement Manager / Project Services
ghazi@caip.rutgers.edu Qwest Internet Solutions
More information about the Gcc-bugs
mailing list