cpplib and a couple others: squelch -pedantic warnings

Kaveh R. Ghazi ghazi@caip.rutgers.edu
Wed May 10 10:41:00 GMT 2000


 > From: Zack Weinberg <zack@wolery.cumb.org>
 > > 
 > > What bothers you, that we write anything at all or that I overloaded
 > > the __extension__ keyword?
 > 
 > I don't like having to write anything at all, but if we do have to
 > write something it definitely shouldn't be __extension__.
 > __extension__ is to shut it up about extensions, and no more.

Okay, I agree __extension__ was a bad choice.  My aim in using it was
to avoid having to change the parser and introduce ansidecl.h hackery
and incrementing the MINOR number to 97 to detect when this feature
was added.

 > 
 > I'd put up with freeconst(foo) or free(const_cast<char *> foo) or

Well Mark pointed out that freeconst() has the problem of silently
accepting freeconst("foo").

WRT const_cast, it doesn't really solve the problem because its job is
to specifically remove the const qualifier which is what -Wcast-qual
is warning about.  Teaching -Wcast-qual to ignore const_cast would be
wrong IMO.  Also const_cast is yet another language extension (as
opposed to a warning tag) so it might not go over well.

Sigh, I guess I'll have to modify the parser.

		--Kaveh
--
Kaveh R. Ghazi			Engagement Manager / Project Services
ghazi@caip.rutgers.edu		Qwest Internet Solutions


More information about the Gcc-patches mailing list