This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Warning from cpp on macro argument stringification is missing


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]