This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Warning from cpp on macro argument stringification is missing
- To: zack at wolery dot cumb dot org
- Subject: Warning from cpp on macro argument stringification is missing
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Date: Wed, 6 Sep 2000 11:29:01 -0400 (EDT)
- Cc: gcc-bugs at gcc dot gnu dot org
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