This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Re: [C++ patch] accept __null as sentinel


Michael Matz wrote:
Hi,

On Fri, 29 Apr 2005, Mark Mitchell wrote:


The documentation for -pedantic says:

"Issue all the warnings demanded by strict ISO C and ISO C++; reject all
programs that use forbidden extensions, and some other programs that do not
follow ISO C and ISO C++."


Yes, -pedantic does fit.

I'm not sure what you're suggesting; that the current documentation would suggest that adding this warning to -pedantic makes sense, or that the documentation should be changed to cover some broader class of warnings? I don't think I'd agree with either opinion.


Anyhow, I'm not sure that we're achieving marginal benefit corresponding to the marginal cost of this conversation. I think we're in agreement that (a) the warning is useful in some circumstances, and (b) -Wall isn't the place for it. Where exactly it moves to seems less important to me.

The most practical approach to solving your problem would seem to me to post a patch that adds a new -W flag for this warning (and moves the code to c-common.c, per RTH's suggestion), and not include this warning in any existing warning group. If you copy me, I'll be happy to review and approve. Then, we can move it into some warning group (be it -pedantic, -W, -Wformat=2, etc.) at a later date.

--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
(916) 791-8304


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