This is the mail archive of the gcc@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: Rename -W to -Wextra ?


On Mon, Jun 03, 2002 at 11:52:28AM +0100, Joseph S. Myers wrote:
> On Mon, 3 Jun 2002, Phil Edwards wrote:
> 
> > (I've been finding all the things that -W controls right now, and will
> > update the manual.  I'll probably need some help coming up with example
> > code that triggers the warning.)
> 
> Can you split -W into separate options for the separate things it
> controls, the way -Wall is just the union of such separate options?

Well, I /can/, but I don't think it's a good idea.  Do we really want that
many new -W* options?

The manual currently lists 10 things warned about by -W.  One of them has
been moved into its own option already, but the manual wasn't updated.
I've found another 5 undocumented uses in the C-family group, and an
additional 6 in C++.  The only occurances of extra_warnings (the variable
in question) in Chill and Objective-C were in deleted files.  None in Java,
and I haven't looked at Ada (and since I can't build it, don't much plan to).

That's 20 separate options.  And remember that they are for corner cases, so
we'd end up with -Wunsigned-compared-against-zero-with-< and -Wempty-if-body
and -Wsubscripting-an-array-declared-as-register...

The idea of a single option to warn about "oddball things which are usually
suspect, but not always" makes sense to me.  It's just the spelling that
GCC got wrong.


Phil

-- 
If ye love wealth greater than liberty, the tranquility of servitude greater
than the animating contest for freedom, go home and leave us in peace.  We seek
not your counsel, nor your arms.  Crouch down and lick the hand that feeds you;
and may posterity forget that ye were our countrymen.            - Samuel Adams


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