cpplib and a couple others: squelch -pedantic warnings
Zack Weinberg
zack@wolery.cumb.org
Wed May 10 10:50:00 GMT 2000
On Wed, May 10, 2000 at 01:41:04PM -0400, Kaveh R. Ghazi wrote:
> > 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.
You might want to consider if this is truly worth it.
> > 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").
... and so does free((char *) "foo"). I don't think this is a real
problem. Yeah, you have to wait to runtime for it to crash, but it's
a nice deterministic crash.
zw
More information about the Gcc-patches
mailing list