Re: RFC: -Wall by default

2012-04-13 Thread Chris Lattner
On Apr 13, 2012, at 5:09 PM, NightStrike wrote: > Can the -Winf option really happen? It should be easy to make that > turn on every -W option without having the manually list them and keep > it up to date. Like, it should be easy, I would hope, to make that be > automatic. Even if just used as

Re: RFC: -Wall by default

2012-04-13 Thread NightStrike
On Fri, Apr 13, 2012 at 12:46 PM, Dave Korn wrote: > On 13/04/2012 22:45, Oleg Smolsky wrote: >> On 2012-04-11 01:50, Vincent Lefevre wrote: >>> On 2012-04-09 13:03:38 -0500, Gabriel Dos Reis wrote: On Mon, Apr 9, 2012 at 12:44 PM, Robert Dewar  wrote: > On 4/9/2012 1:36 PM, Jonathan Wake

Re: RFC: -Wall by default

2012-04-13 Thread Gabriel Dos Reis
On Fri, Apr 13, 2012 at 5:39 PM, Dave Korn wrote: > On 12/04/2012 22:36, Gabriel Dos Reis wrote: >> On Thu, Apr 12, 2012 at 4:00 PM, Dave Korn wrote: >>> On 12/04/2012 16:47, Gabriel Dos Reis wrote: >>> I keep talking about useful *warnings*, you keep talking about *numbers*. >>>  No you don'

Re: RFC: -Wall by default

2012-04-13 Thread Dave Korn
On 12/04/2012 16:35, Robert Dewar wrote: > On 4/12/2012 10:48 AM, Andrew Haley wrote: > >> Ultimately, it's a matter of taste and experience. I'm going to find >> it hard to write for people who don't know the relative precedence of >> & and | . > > There are probably some programmers who compl

Re: RFC: -Wall by default

2012-04-13 Thread Dave Korn
On 13/04/2012 22:45, Oleg Smolsky wrote: > On 2012-04-11 01:50, Vincent Lefevre wrote: >> On 2012-04-09 13:03:38 -0500, Gabriel Dos Reis wrote: >>> On Mon, Apr 9, 2012 at 12:44 PM, Robert Dewar wrote: On 4/9/2012 1:36 PM, Jonathan Wakely wrote: > Maybe -Wstandard isn't the best name

Re: RFC: -Wall by default

2012-04-13 Thread Dave Korn
On 12/04/2012 22:36, Gabriel Dos Reis wrote: > On Thu, Apr 12, 2012 at 4:00 PM, Dave Korn wrote: >> On 12/04/2012 16:47, Gabriel Dos Reis wrote: >> >>> I keep talking about useful *warnings*, you keep talking about *numbers*. >> No you don't. You said: >> > People easily associates some o

Re: RFC: -Wall by default

2012-04-13 Thread Oleg Smolsky
On 2012-04-11 01:50, Vincent Lefevre wrote: On 2012-04-09 13:03:38 -0500, Gabriel Dos Reis wrote: On Mon, Apr 9, 2012 at 12:44 PM, Robert Dewar wrote: On 4/9/2012 1:36 PM, Jonathan Wakely wrote: Maybe -Wstandard isn't the best name though, as "standard" usually means something quite specific

Re: RFC: -Wall by default

2012-04-13 Thread Robert Dewar
On 4/13/2012 2:03 AM, Gabriel Dos Reis wrote: On Thu, Apr 12, 2012 at 4:50 PM, Robert Dewar wrote: End of thread for me, remove me from the reply lists, thanks discussion is going nowhere, at this stage my vote is for no change whatever in the way warnings are handled. I was asked "wassup wit

Re: RFC: -Wall by default

2012-04-12 Thread Gabriel Dos Reis
On Thu, Apr 12, 2012 at 4:50 PM, Robert Dewar wrote: > End of thread for me, remove me from the reply lists, thanks > discussion is going nowhere, at this stage my vote is for > no change whatever in the way warnings are handled. I was asked "wassup with Robert?". All I can say s that it is a de

Re: RFC: -Wall by default

2012-04-12 Thread Robert Dewar
End of thread for me, remove me from the reply lists, thanks discussion is going nowhere, at this stage my vote is for no change whatever in the way warnings are handled.

Re: RFC: -Wall by default

2012-04-12 Thread Gabriel Dos Reis
On Thu, Apr 12, 2012 at 4:42 PM, Robert Dewar wrote: > On 4/12/2012 5:40 PM, Gabriel Dos Reis wrote: > >> It isn't non-sense just because you decide so or you don't like the >> observation. >> >>>  and >>> nonsense now, this has nothing to do with incompleteness! > > > I think you don't know what

Re: RFC: -Wall by default

2012-04-12 Thread Robert Dewar
On 4/12/2012 5:40 PM, Gabriel Dos Reis wrote: It isn't non-sense just because you decide so or you don't like the observation. and nonsense now, this has nothing to do with incompleteness! I think you don't know what incompleteness is about, yes, it is nonsense, because no one can make any

Re: RFC: -Wall by default

2012-04-12 Thread Gabriel Dos Reis
On Thu, Apr 12, 2012 at 4:38 PM, Robert Dewar wrote: > On 4/12/2012 5:35 PM, Gabriel Dos Reis wrote: > >>>  There's nothing more ambiguous than saying that something is final in a >>> world where perfection is never achieved.  That's why software has >>> monotonically increasing version numbers, i

Re: RFC: -Wall by default

2012-04-12 Thread Robert Dewar
On 4/12/2012 5:35 PM, Gabriel Dos Reis wrote: There's nothing more ambiguous than saying that something is final in a world where perfection is never achieved. That's why software has monotonically increasing version numbers, instead of just one that means "this is done now". As I observed

Re: RFC: -Wall by default

2012-04-12 Thread Gabriel Dos Reis
On Thu, Apr 12, 2012 at 4:30 PM, Jonathan Wakely wrote: > On 12 April 2012 16:49, Gabriel Dos Reis wrote: >>> It would even allow -Winf for the >>> sometimes-requested-but-probably-not-actually-useful >>> -Wreally-really-all that turns on *all* possible warnings.  Or >>> -Wover9000. >> >> Do we ha

Re: RFC: -Wall by default

2012-04-12 Thread Gabriel Dos Reis
On Thu, Apr 12, 2012 at 4:00 PM, Dave Korn wrote: > On 12/04/2012 16:47, Gabriel Dos Reis wrote: > >> I keep talking about useful *warnings*, you keep talking about *numbers*. > >  No you don't.  You said: > People easily associates some ordering to numbers (usually the greater t

Re: RFC: -Wall by default

2012-04-12 Thread Gabriel Dos Reis
On Thu, Apr 12, 2012 at 3:56 PM, Dave Korn wrote: > On 12/04/2012 17:03, Gabriel Dos Reis wrote: >>  There is >> little ambiguity left by -Wreally-all-of-them-damn-it  :-) > >  Actually, no, as anyone could tell you who before they discovered version > control used to have lots of files lying arou

Re: RFC: -Wall by default

2012-04-12 Thread Jonathan Wakely
On 12 April 2012 16:49, Gabriel Dos Reis wrote: >> It would even allow -Winf for the >> sometimes-requested-but-probably-not-actually-useful >> -Wreally-really-all that turns on *all* possible warnings.  Or >> -Wover9000. > > Do we have bugzilla entry for that? http://gcc.gnu.org/bugzilla/show_bug

Re: RFC: -Wall by default

2012-04-12 Thread Dave Korn
On 12/04/2012 16:47, Gabriel Dos Reis wrote: > I keep talking about useful *warnings*, you keep talking about *numbers*. No you don't. You said: >>> People easily associates some ordering to numbers (usually >>> the greater the better or in this case the worse) which >>> creates a

Re: RFC: -Wall by default

2012-04-12 Thread Dave Korn
On 12/04/2012 17:03, Gabriel Dos Reis wrote: > There is > little ambiguity left by -Wreally-all-of-them-damn-it :-) Actually, no, as anyone could tell you who before they discovered version control used to have lots of files lying around called "foo.final.c", "foo.final.reallyfinal.c", "foo.fi

Re: RFC: -Wall by default

2012-04-12 Thread pcpa
Robert Dewar escreveu: > On 4/12/2012 10:48 AM, Andrew Haley wrote: > >> Ultimately, it's a matter of taste and experience. I'm going to find >> it hard to write for people who don't know the relative precedence of >> & and | . > > There are probably some programmers who completely know ALL the o

Re: RFC: -Wall by default

2012-04-12 Thread Pedro Alves
On 04/12/2012 04:52 PM, Gabriel Dos Reis wrote: > On Thu, Apr 12, 2012 at 10:43 AM, Pedro Alves wrote: >> On 04/12/2012 04:23 PM, Gabriel Dos Reis wrote: >> >>> because -Os says it optimizes for size, the expectation is clear. >>> -O3 does not necessarily give better optimization than -O2. >> >>

Re: RFC: -Wall by default

2012-04-12 Thread Gabriel Dos Reis
On Thu, Apr 12, 2012 at 10:49 AM, Gabriel Dos Reis wrote: > On Thu, Apr 12, 2012 at 10:38 AM, Jonathan Wakely > wrote: >> On 12 April 2012 16:33, Robert Dewar wrote: >>> >>> For warnings you put a higher number to get more warnings. Yes, >>> you may find that you get too many warnings and they a

Re: RFC: -Wall by default

2012-04-12 Thread Gabriel Dos Reis
On Thu, Apr 12, 2012 at 10:43 AM, Pedro Alves wrote: > On 04/12/2012 04:23 PM, Gabriel Dos Reis wrote: > >> because -Os says it optimizes for size, the expectation is clear. >> -O3 does not necessarily give better optimization than -O2. > > > No, but it does mean that GCC turns on more optimizatio

Re: RFC: -Wall by default

2012-04-12 Thread Gabriel Dos Reis
On Thu, Apr 12, 2012 at 10:38 AM, Jonathan Wakely wrote: > On 12 April 2012 16:33, Robert Dewar wrote: >> >> For warnings you put a higher number to get more warnings. Yes, >> you may find that you get too many warnings and they are not >> useful. Remedy: reduce the number after -W :-) > > It woul

Re: RFC: -Wall by default

2012-04-12 Thread Gabriel Dos Reis
On Thu, Apr 12, 2012 at 10:24 AM, Dave Korn wrote: > On 12/04/2012 16:06, Gabriel Dos Reis wrote: >> On Thu, Apr 12, 2012 at 10:01 AM, Dave Korn >> wrote: >>> On 12/04/2012 15:55, Gabriel Dos Reis wrote: On Thu, Apr 12, 2012 at 9:46 AM, Dave Korn wrote: > On 12/04/2012 15:43, Gab

Re: RFC: -Wall by default

2012-04-12 Thread Pedro Alves
On 04/12/2012 04:23 PM, Gabriel Dos Reis wrote: > because -Os says it optimizes for size, the expectation is clear. > -O3 does not necessarily give better optimization than -O2. No, but it does mean that GCC turns on more optimization options. "Optimize yet more. -O3 turns on all optimizations

Re: RFC: -Wall by default

2012-04-12 Thread Jonathan Wakely
On 12 April 2012 16:33, Robert Dewar wrote: > > For warnings you put a higher number to get more warnings. Yes, > you may find that you get too many warnings and they are not > useful. Remedy: reduce the number after -W :-) It would even allow -Winf for the sometimes-requested-but-probably-not-act

Re: RFC: -Wall by default

2012-04-12 Thread Robert Dewar
On 4/12/2012 10:48 AM, Andrew Haley wrote: Ultimately, it's a matter of taste and experience. I'm going to find it hard to write for people who don't know the relative precedence of & and | . There are probably some programmers who completely know ALL the operator precedence rules in C. Ther

Re: RFC: -Wall by default

2012-04-12 Thread Robert Dewar
On 4/12/2012 11:23 AM, Gabriel Dos Reis wrote: less warnings to more warnings, what could be more ordered than that! What exactly do you put in -Wn to make it give *more* warning? I can think of a reduced number of switch that would give you more warning on a specific program without them bein

Re: RFC: -Wall by default

2012-04-12 Thread Robert Dewar
On 4/12/2012 10:48 AM, Andrew Haley wrote: Certainly, everything that adds to clarity (and has no runtime costs!) is desirable. But adding parentheses may not add to clarity if doing so also obfuscates the code. There is a cost to the reader due to a blizzard of syntactically redundant parenth

Re: RFC: -Wall by default

2012-04-12 Thread Dave Korn
On 12/04/2012 16:06, Gabriel Dos Reis wrote: > On Thu, Apr 12, 2012 at 10:01 AM, Dave Korn > wrote: >> On 12/04/2012 15:55, Gabriel Dos Reis wrote: >>> On Thu, Apr 12, 2012 at 9:46 AM, Dave Korn >>> wrote: On 12/04/2012 15:43, Gabriel Dos Reis wrote: > People easily associates some ord

Re: RFC: -Wall by default

2012-04-12 Thread Gabriel Dos Reis
On Thu, Apr 12, 2012 at 10:16 AM, Robert Dewar wrote: > On 4/12/2012 11:06 AM, Gabriel Dos Reis wrote: > >> What is nonsensical there? >> >>> But they *are* ordinal. >> >> >> Now?  What is the order? > > > less warnings to more warnings, what could be more > ordered than that! What exactly do you

Re: RFC: -Wall by default

2012-04-12 Thread Robert Dewar
On 4/12/2012 11:06 AM, Gabriel Dos Reis wrote: What is nonsensical there? But they *are* ordinal. Now? What is the order? less warnings to more warnings, what could be more ordered than that! It works just fine for -O, Exactly what happens with -O? -On does not necessarily generate

Re: RFC: -Wall by default

2012-04-12 Thread Gabriel Dos Reis
On Thu, Apr 12, 2012 at 10:01 AM, Dave Korn wrote: > On 12/04/2012 15:55, Gabriel Dos Reis wrote: >> On Thu, Apr 12, 2012 at 9:46 AM, Dave Korn >> wrote: >>> On 12/04/2012 15:43, Gabriel Dos Reis wrote: > People easily associates some ordering to numbers (usually the greater the better

Re: RFC: -Wall by default

2012-04-12 Thread Dave Korn
On 12/04/2012 15:55, Gabriel Dos Reis wrote: > On Thu, Apr 12, 2012 at 9:46 AM, Dave Korn wrote: >> On 12/04/2012 15:43, Gabriel Dos Reis wrote: >>> People easily associates some ordering to numbers (usually >>> the greater the better or in this case the worse) which >>> creates another set of co

Re: RFC: -Wall by default

2012-04-12 Thread Gabriel Dos Reis
On Thu, Apr 12, 2012 at 9:46 AM, Dave Korn wrote: > On 12/04/2012 15:43, Gabriel Dos Reis wrote: >> On Thu, Apr 12, 2012 at 9:38 AM, Robert Dewar wrote: >>> On 4/12/2012 10:26 AM, Gabriel Dos Reis wrote: >>> >> -W0: no warnings (equivalent to -w) >> -W1: default >> -W2: equivalent to

Re: RFC: -Wall by default

2012-04-12 Thread Andrew Haley
On 04/12/2012 03:36 PM, Robert Dewar wrote: > On 4/12/2012 9:30 AM, Andrew Haley wrote: > I would also suggest that your competent programmer would know what they don't know; when reading code they'd look it up, when writing code they'd insert parentheses for clarity. >> >> Using tw

Re: RFC: -Wall by default

2012-04-12 Thread Dave Korn
On 12/04/2012 15:43, Gabriel Dos Reis wrote: > On Thu, Apr 12, 2012 at 9:38 AM, Robert Dewar wrote: >> On 4/12/2012 10:26 AM, Gabriel Dos Reis wrote: >> > -W0: no warnings (equivalent to -w) > -W1: default > -W2: equivalent to the current -Wall > -W3: equivalent to the current -Wal

Re: RFC: -Wall by default

2012-04-12 Thread Gabriel Dos Reis
On Thu, Apr 12, 2012 at 9:38 AM, Robert Dewar wrote: > On 4/12/2012 10:26 AM, Gabriel Dos Reis wrote: > -W0: no warnings (equivalent to -w) -W1: default -W2: equivalent to the current -Wall -W3: equivalent to the current -Wall -Wextra >>> >>> >>>  I like this suggestion a lot.

Re: RFC: -Wall by default

2012-04-12 Thread Robert Dewar
On 4/12/2012 10:26 AM, Gabriel Dos Reis wrote: -W0: no warnings (equivalent to -w) -W1: default -W2: equivalent to the current -Wall -W3: equivalent to the current -Wall -Wextra I like this suggestion a lot. Me too! I also like short switches, but gcc mostly favors long hard-to-type not-n

Re: RFC: -Wall by default

2012-04-12 Thread Robert Dewar
On 4/12/2012 9:30 AM, Andrew Haley wrote: Sorry for the confusion: I intended to write I would also suggest that your competent programmer would know what they don't know; when reading code they'd look it up, when writing code they'd insert parentheses for clarity. Using two different defin

Re: RFC: -Wall by default

2012-04-12 Thread Gabriel Dos Reis
On Thu, Apr 12, 2012 at 5:23 AM, Dave Korn wrote: > On 11/04/2012 09:50, Vincent Lefevre wrote: >> On 2012-04-09 13:03:38 -0500, Gabriel Dos Reis wrote: >>> On Mon, Apr 9, 2012 at 12:44 PM, Robert Dewar wrote: On 4/9/2012 1:36 PM, Jonathan Wakely wrote: > Maybe -Wstandard isn't the b

Re: RFC: -Wall by default

2012-04-12 Thread Andrew Haley
On 04/12/2012 02:03 PM, Robert Dewar wrote: > On 4/12/2012 6:44 AM, Andrew Haley wrote: > >> I would also suggest that a competent programmer would know what they >> don't know; when reading code they'd look it up, when writing code >> they'd insert parentheses for clarity. > > Yes, of course I 1

Re: RFC: -Wall by default

2012-04-12 Thread Robert Dewar
On 4/12/2012 6:44 AM, Andrew Haley wrote: I would also suggest that a competent programmer would know what they don't know; when reading code they'd look it up, when writing code they'd insert parentheses for clarity. Yes, of course I 100% agree with that. But then by your definition code that

Re: RFC: -Wall by default

2012-04-12 Thread Diego Novillo
On 4/12/12 6:23 AM, Dave Korn wrote: On 2012-04-09 13:03:38 -0500, Gabriel Dos Reis wrote: How about a warning level? -W0: no warnings (equivalent to -w) -W1: default -W2: equivalent to the current -Wall -W3: equivalent to the current -Wall -Wextra I like this suggestion a lot. Indeed.

Re: RFC: -Wall by default

2012-04-12 Thread Andrew Haley
On 04/12/2012 10:46 AM, Robert Dewar wrote: > On 4/12/2012 4:55 AM, Fabien Chêne wrote: > >> I've got a radically different experience here, real bugs were >> introduced while trying to remove this warning, and as far as I can >> tell, I've never found any bugs involving precedence of&& and || --

Re: RFC: -Wall by default

2012-04-12 Thread Fabien Chêne
2012/4/12 Robert Dewar : > On 4/12/2012 4:55 AM, Fabien Chêne wrote: > >> I've got a radically different experience here, real bugs were >> introduced while trying to remove this warning, and as far as I can >> tell, I've never found any bugs involving precedence of&&  and || -- >> >> in the code I

Re: RFC: -Wall by default

2012-04-12 Thread Dave Korn
On 11/04/2012 09:50, Vincent Lefevre wrote: > On 2012-04-09 13:03:38 -0500, Gabriel Dos Reis wrote: >> On Mon, Apr 9, 2012 at 12:44 PM, Robert Dewar wrote: >>> On 4/9/2012 1:36 PM, Jonathan Wakely wrote: >>> Maybe -Wstandard isn't the best name though, as "standard" usually means somethin

Re: RFC: -Wall by default

2012-04-12 Thread Robert Dewar
On 4/12/2012 5:55 AM, Miles Bader wrote: ... and it's quite possible that such bugs resulting from adding parentheses means that the programmer "fixing" the code didn't actually know the right precedence! or that the layout (which is what in practice we should rely on to make things clear with

Re: RFC: -Wall by default

2012-04-12 Thread Miles Bader
Robert Dewar writes: >> I've got a radically different experience here, real bugs were >> introduced while trying to remove this warning, and as far as I can >> tell, I've never found any bugs involving precedence of&& and || -- >> in the code I'm working on --, whose precedence is really well kn

Re: RFC: -Wall by default

2012-04-12 Thread Robert Dewar
On 4/12/2012 4:55 AM, Fabien Chêne wrote: I've got a radically different experience here, real bugs were introduced while trying to remove this warning, and as far as I can tell, I've never found any bugs involving precedence of&& and || -- in the code I'm working on --, whose precedence is rea

Re: RFC: -Wall by default

2012-04-12 Thread Fabien Chêne
2012/4/11 Ian Lance Taylor : > Andrew Haley writes: > >> On 04/05/2012 01:28 PM, Michael Veksler wrote: >> >>> As for specific warnings, I hate that the the code (a&&b || c&&d), >>> which did not cause a warning on older gcc version now gives a >>> warning. I would not want it on by default since

Re: RFC: -Wall by default

2012-04-11 Thread Robert Dewar
O This one is an interesting case, since there are strong arguments on both sides. I enabled the C++ warning about the precedence of&& and || (it's been in C for many years). It found real bugs in real code, bugs that had existed for years. I think for ordinary programmers, the fact that AND

Re: RFC: -Wall by default

2012-04-11 Thread Peter Bigot
On Wed, Apr 11, 2012 at 11:18 AM, Ian Lance Taylor wrote: > Andrew Haley writes: > >> On 04/05/2012 01:28 PM, Michael Veksler wrote: >> >>> As for specific warnings, I hate that the the code (a&&b || c&&d), >>> which did not cause a warning on older gcc version now gives a >>> warning. I would no

Re: RFC: -Wall by default

2012-04-11 Thread Andrew Haley
On 04/11/2012 05:18 PM, Ian Lance Taylor wrote: > Andrew Haley writes: > >> On 04/05/2012 01:28 PM, Michael Veksler wrote: >> >>> As for specific warnings, I hate that the the code (a&&b || c&&d), >>> which did not cause a warning on older gcc version now gives a >>> warning. I would not want it

Re: RFC: -Wall by default

2012-04-11 Thread Ian Lance Taylor
Andrew Haley writes: > On 04/05/2012 01:28 PM, Michael Veksler wrote: > >> As for specific warnings, I hate that the the code (a&&b || c&&d), >> which did not cause a warning on older gcc version now gives a >> warning. I would not want it on by default since it forces users to >> write too many

Re: RFC: -Wall by default

2012-04-11 Thread Vincent Lefevre
On 2012-04-09 13:03:38 -0500, Gabriel Dos Reis wrote: > On Mon, Apr 9, 2012 at 12:44 PM, Robert Dewar wrote: > > On 4/9/2012 1:36 PM, Jonathan Wakely wrote: > > > >> Maybe -Wstandard isn't the best name though, as "standard" usually > >> means something quite specific for compilers, and the warnin

Re: RFC: -Wall by default

2012-04-11 Thread Vincent Lefevre
On 2012-04-08 18:56:27 +0100, Jonathan Wakely wrote: > Anyway, GCC prints the option that controls a warning as part of the > diagnostic, so it's trivial to find which options control the > diagnostics that are annoying you. And it's fine that using the -Wno-... form doesn't make the compilation f

Re: RFC: -Wall by default

2012-04-11 Thread Vincent Lefevre
On 2012-04-10 14:48:05 +0100, Andrew Haley wrote: > On 04/05/2012 12:30 PM, Vincent Lefevre wrote: > > On 2012-04-05 11:55:45 +0100, Andrew Haley wrote: > >> On 04/05/2012 11:50 AM, Vincent Lefevre wrote: > >>> On 2012-04-04 20:01:27 +0100, Andrew Haley wrote: > On 04/04/2012 07:11 PM, Gabriel

Re: RFC: -Wall by default

2012-04-11 Thread Vincent Lefevre
On 2012-04-05 16:44:28 -0400, Robert Dewar wrote: > On 4/5/2012 4:24 PM, Russ Allbery wrote: > >Personally, as a matter of *style*, I eliminate such cases either by > >initializing the variable or restructuring the function. But this is very > >much a question of style, not of correctness. > > In

Re: RFC: -Wall by default

2012-04-10 Thread Andrew Haley
On 04/05/2012 01:28 PM, Michael Veksler wrote: > As for specific warnings, I hate that the the code (a&&b || c&&d), > which did not cause a warning on older gcc version now gives a > warning. I would not want it on by default since it forces users to > write too many parentheses in ((a&&b)||(c&&d)

Re: RFC: -Wall by default

2012-04-10 Thread Gabriel Dos Reis
On Tue, Apr 10, 2012 at 7:40 AM, Michael Matz wrote: > Hi, > > On Tue, 10 Apr 2012, Gabriel Dos Reis wrote: > >> > To be honest, all of those sound fine to me... >> > >> > bike-sheddin', >> > -miles >> >> at the risk of more bike sheds:  -Wcommon ? > > To use a variant of your own counterargument

Re: RFC: -Wall by default

2012-04-10 Thread Gabriel Dos Reis
On Tue, Apr 10, 2012 at 7:40 AM, Michael Matz wrote: > Hi, > > On Tue, 10 Apr 2012, Gabriel Dos Reis wrote: > >> > To be honest, all of those sound fine to me... >> > >> > bike-sheddin', >> > -miles >> >> at the risk of more bike sheds:  -Wcommon ? > > To use a variant of your own counterargument

Re: RFC: -Wall by default

2012-04-10 Thread Miles Bader
Andrew Haley writes: > The argument is that we should enable the warnings by default because > it makes gcc more competitive. But that only makes gcc more > competitive if enabling these kinds of warnings by default is an > advantage. However, we haven't established that -Wall by default is > ad

Re: RFC: -Wall by default

2012-04-10 Thread Andrew Haley
On 04/05/2012 12:30 PM, Vincent Lefevre wrote: > On 2012-04-05 11:55:45 +0100, Andrew Haley wrote: >> On 04/05/2012 11:50 AM, Vincent Lefevre wrote: >>> On 2012-04-04 20:01:27 +0100, Andrew Haley wrote: On 04/04/2012 07:11 PM, Gabriel Dos Reis wrote: > Really? Such as what? Such

Re: RFC: -Wall by default

2012-04-10 Thread Andrew Haley
On 04/05/2012 03:21 PM, Gabriel Dos Reis wrote: > On Thu, Apr 5, 2012 at 5:50 AM, Andrew Haley wrote: >> On 04/04/2012 07:02 PM, Gabriel Dos Reis wrote: Oh, wow. Really? That's a big change. Time to be brave, I guess, > but I very much like the idea of a gcc that does just what it's to

Re: RFC: -Wall by default

2012-04-10 Thread Michael Matz
Hi, On Tue, 10 Apr 2012, Gabriel Dos Reis wrote: > > To be honest, all of those sound fine to me... > > > > bike-sheddin', > > -miles > > at the risk of more bike sheds: -Wcommon ? To use a variant of your own counterargument against -Wdefault: "common" also has a special commonly (ahem :) u

Re: RFC: -Wall by default

2012-04-10 Thread Gabriel Dos Reis
On Tue, Apr 10, 2012 at 2:07 AM, Miles Bader wrote: > 2012年4月10日15:26 Eric Botcazou : >>> Something like -Wdefault-warnings is a reasonable choice, for the >>> reasons already mentioned in this sub-thread. >> >> Purists will find that -Wdefault-warnings is redundant though, since -W is >> supposed

Re: RFC: -Wall by default

2012-04-10 Thread Miles Bader
2012年4月10日15:26 Eric Botcazou : >> Something like -Wdefault-warnings is a reasonable choice, for the >> reasons already mentioned in this sub-thread. > > Purists will find that -Wdefault-warnings is redundant though, since -W is > supposed to mean "warning" already, e.g. it's -Wall and not -Wall-wa

Re: RFC: -Wall by default

2012-04-09 Thread Eric Botcazou
> Something like -Wdefault-warnings is a reasonable choice, for the > reasons already mentioned in this sub-thread. Purists will find that -Wdefault-warnings is redundant though, since -W is supposed to mean "warning" already, e.g. it's -Wall and not -Wall-warnings. -- Eric Botcazou

Re: RFC: -Wall by default

2012-04-09 Thread James Cloos
Maybe -Wstandard isn't the best name though, as "standard" usually... AS> It doesn't have to be short: -Wdefault-warnings. I haven't looked at all of the replies since I posted, and I *had* forgotten about -Wextra (I can't even remember how many years it has been since I last read that secti

Re: RFC: -Wall by default

2012-04-09 Thread Andreas Schwab
Gabriel Dos Reis writes: > On Mon, Apr 9, 2012 at 12:44 PM, Robert Dewar wrote: >> On 4/9/2012 1:36 PM, Jonathan Wakely wrote: >> >>> Maybe -Wstandard isn't the best name though, as "standard" usually >>> means something quite specific for compilers, and the warning switch >>> wouldn't have anyt

Re: RFC: -Wall by default

2012-04-09 Thread Gabriel Dos Reis
On Mon, Apr 9, 2012 at 12:44 PM, Robert Dewar wrote: > On 4/9/2012 1:36 PM, Jonathan Wakely wrote: > >> Maybe -Wstandard isn't the best name though, as "standard" usually >> means something quite specific for compilers, and the warning switch >> wouldn't have anything to do with standards conforma

Re: RFC: -Wall by default

2012-04-09 Thread Gabriel Dos Reis
On Mon, Apr 9, 2012 at 12:36 PM, Jonathan Wakely wrote: > Maybe -Wstandard isn't the best name though, as "standard" usually > means something quite specific for compilers, and the warning switch > wouldn't have anything to do with standards conformance. I agree. I have been resisting to go the

Re: RFC: -Wall by default

2012-04-09 Thread Robert Dewar
On 4/9/2012 1:36 PM, Jonathan Wakely wrote: Maybe -Wstandard isn't the best name though, as "standard" usually means something quite specific for compilers, and the warning switch wouldn't have anything to do with standards conformance. -Wdefault might be better

Re: RFC: -Wall by default

2012-04-09 Thread Jonathan Wakely
On 9 April 2012 18:29, Eric Botcazou wrote: >> That would be my preferred solution -- by far.  But, my understanding >> is that that would provoke a riot so I am willing to compromise by >> introducing a new warning switch (even if I dislike that thought.) >> Hopefully, it is it is going to be the

Re: RFC: -Wall by default

2012-04-09 Thread Robert Dewar
On 4/9/2012 1:29 PM, Eric Botcazou wrote: That would be my preferred solution -- by far. But, my understanding is that that would provoke a riot so I am willing to compromise by introducing a new warning switch (even if I dislike that thought.) Hopefully, it is it is going to be the default, mos

Re: RFC: -Wall by default

2012-04-09 Thread Robert Dewar
On 4/9/2012 1:29 PM, Gabriel Dos Reis wrote: We are in agreement. I was just explaining to Gerald that his proposal would have been my first choice, but I am compromising by moving to your suggestion. My complaint is the introduction of a new switch just to accomodate warnings that should not

Re: RFC: -Wall by default

2012-04-09 Thread Eric Botcazou
> That would be my preferred solution -- by far. But, my understanding > is that that would provoke a riot so I am willing to compromise by > introducing a new warning switch (even if I dislike that thought.) > Hopefully, it is it is going to be the default, most people would not have > to learn y

Re: RFC: -Wall by default

2012-04-09 Thread Gabriel Dos Reis
On Mon, Apr 9, 2012 at 12:15 PM, Robert Dewar wrote: > On 4/9/2012 1:08 PM, Gabriel Dos Reis wrote: >> >> On Mon, Apr 9, 2012 at 11:29 AM, Gerald Pfeifer >>  wrote: >>> >>> On Sun, 8 Apr 2012, Robert Dewar wrote: Do you really want me to file hundreds of bug reports that are for cas

Re: RFC: -Wall by default

2012-04-09 Thread Robert Dewar
On 4/9/2012 1:08 PM, Gabriel Dos Reis wrote: On Mon, Apr 9, 2012 at 11:29 AM, Gerald Pfeifer wrote: On Sun, 8 Apr 2012, Robert Dewar wrote: Do you really want me to file hundreds of bug reports that are for cases of uninitialized variables well known to everyone, and well understood by everyon

Re: RFC: -Wall by default

2012-04-09 Thread Gabriel Dos Reis
On Mon, Apr 9, 2012 at 11:29 AM, Gerald Pfeifer wrote: > On Sun, 8 Apr 2012, Robert Dewar wrote: >> Do you really want me to file hundreds of bug reports that are for >> cases of uninitialized variables well known to everyone, and well >> understood by everyone, and not easy to fix (or would have

RE: RFC: -Wall by default

2012-04-09 Thread Paul_Koning
@gcc.gnu.org; Miles Bader; Gabriel Dos Reis; Ian Lance Taylor; Andrew Haley Subject: Re: RFC: -Wall by default On Sun, 8 Apr 2012, Robert Dewar wrote: > Do you really want me to file hundreds of bug reports that are for > cases of uninitialized variables well known to everyone, and well > unde

Re: RFC: -Wall by default

2012-04-09 Thread Gerald Pfeifer
On Sun, 8 Apr 2012, Robert Dewar wrote: > Do you really want me to file hundreds of bug reports that are for > cases of uninitialized variables well known to everyone, and well > understood by everyone, and not easy to fix (or would have been > fixed long ago)? Perhaps we should move this class of

Re: RFC: -Wall by default

2012-04-08 Thread Robert Dewar
On 4/8/2012 4:59 PM, Gabriel Dos Reis wrote: no, -Wstandard wasn't in my original proposal. It is the name suggested by Miles for the list I gave Arnaud upon request. I know that, I can read -:) I am just saying I think this issue still needs discussion (and you were complaining about contin

Re: RFC: -Wall by default

2012-04-08 Thread Gabriel Dos Reis
On Sun, Apr 8, 2012 at 3:29 PM, Robert Dewar wrote: > On 4/8/2012 4:26 PM, Gabriel Dos Reis wrote: >> >> On Sun, Apr 8, 2012 at 3:13 PM, Robert Dewar  wrote: >>> >>> On 4/8/2012 4:02 PM, Jonathan Wakely wrote: >> >> But I'd be just as happy with a -Wstandard (by any name) enabled by defa

Re: RFC: -Wall by default

2012-04-08 Thread Gabriel Dos Reis
On Sun, Apr 8, 2012 at 3:28 PM, Robert Dewar wrote: > On 4/8/2012 4:23 PM, Gabriel Dos Reis wrote: > >> I think I agree with this.  I suspect the only difference might be that >> I do not believe the fix is necessarily to turn them off. > > > Well there are three possibilities > > a) fix the false

Re: RFC: -Wall by default

2012-04-08 Thread Robert Dewar
On 4/8/2012 4:26 PM, Gabriel Dos Reis wrote: On Sun, Apr 8, 2012 at 3:13 PM, Robert Dewar wrote: On 4/8/2012 4:02 PM, Jonathan Wakely wrote: But I'd be just as happy with a -Wstandard (by any name) enabled by default as I would be with -Wall on by default. Only enabling warnings with very li

Re: RFC: -Wall by default

2012-04-08 Thread Robert Dewar
On 4/8/2012 4:25 PM, Gabriel Dos Reis wrote: On Sun, Apr 8, 2012 at 2:54 PM, Robert Dewar wrote: On 4/8/2012 3:37 PM, Jonathan Wakely wrote: Again, that also applies when people use -Wall today: a false positive is unwanted even if you use -Wall, and those false positives are bugs and so havi

Re: RFC: -Wall by default

2012-04-08 Thread Robert Dewar
On 4/8/2012 4:23 PM, Gabriel Dos Reis wrote: I think I agree with this. I suspect the only difference might be that I do not believe the fix is necessarily to turn them off. Well there are three possibilities a) fix the false positives, at the possible expense of introducing new false negati

Re: RFC: -Wall by default

2012-04-08 Thread Gabriel Dos Reis
On Sun, Apr 8, 2012 at 3:13 PM, Robert Dewar wrote: > On 4/8/2012 4:02 PM, Jonathan Wakely wrote: >> But I'd be just as happy with a -Wstandard (by any name) enabled by >> default as I would be with -Wall on by default. Only enabling warnings >> with very little chance of false positives would av

Re: RFC: -Wall by default

2012-04-08 Thread Gabriel Dos Reis
On Sun, Apr 8, 2012 at 2:54 PM, Robert Dewar wrote: > On 4/8/2012 3:37 PM, Jonathan Wakely wrote: > >> Again, that also applies when people use -Wall today: a false positive >> is unwanted even if you use -Wall, and those false positives are bugs >> and so having them in bugzilla is good. > > > Do

Re: RFC: -Wall by default

2012-04-08 Thread Gabriel Dos Reis
On Sun, Apr 8, 2012 at 2:53 PM, Robert Dewar wrote: > On 4/8/2012 3:33 PM, Gabriel Dos Reis wrote: >> >> On Sun, Apr 8, 2012 at 1:51 PM, Robert Dewar  wrote: >>> >>> On 4/8/2012 1:56 PM, Jonathan Wakely wrote:  The people who don't want -Wall (or -Wstandard) enabled are likely

Re: RFC: -Wall by default

2012-04-08 Thread Robert Dewar
On 4/8/2012 4:02 PM, Jonathan Wakely wrote: No, because those are already in bugzilla, and there's a whole wiki page about improving that particular warning. Yes, I know, and that page is to me good justification for NOT including this warning in the set that is on by default. But I'd be just

Re: RFC: -Wall by default

2012-04-08 Thread Jonathan Wakely
On 8 April 2012 20:54, Robert Dewar wrote: > On 4/8/2012 3:37 PM, Jonathan Wakely wrote: > >> Again, that also applies when people use -Wall today: a false positive >> is unwanted even if you use -Wall, and those false positives are bugs >> and so having them in bugzilla is good. > > > Do you reall

Re: RFC: -Wall by default

2012-04-08 Thread Robert Dewar
On 4/8/2012 3:37 PM, Jonathan Wakely wrote: Again, that also applies when people use -Wall today: a false positive is unwanted even if you use -Wall, and those false positives are bugs and so having them in bugzilla is good. Do you really want me to file hundreds of bug reports that are for ca

Re: RFC: -Wall by default

2012-04-08 Thread Robert Dewar
On 4/8/2012 3:33 PM, Gabriel Dos Reis wrote: On Sun, Apr 8, 2012 at 1:51 PM, Robert Dewar wrote: On 4/8/2012 1:56 PM, Jonathan Wakely wrote: The people who don't want -Wall (or -Wstandard) enabled are likely to be the ones who know how to use -Wno-all or whatever to get what they want. I

Re: RFC: -Wall by default

2012-04-08 Thread Jonathan Wakely
On 8 April 2012 19:51, Robert Dewar wrote: > On 4/8/2012 1:56 PM, Jonathan Wakely wrote: >> >>  The people who don't want -Wall (or >> -Wstandard) enabled are likely to be the ones who know how to use >> -Wno-all or whatever to get what they want. > > > I see no evidence that supports that guess. O

Re: RFC: -Wall by default

2012-04-08 Thread Gabriel Dos Reis
On Sun, Apr 8, 2012 at 1:51 PM, Robert Dewar wrote: > On 4/8/2012 1:56 PM, Jonathan Wakely wrote: >> >>  The people who don't want -Wall (or >> -Wstandard) enabled are likely to be the ones who know how to use >> -Wno-all or whatever to get what they want. > > > I see no evidence that supports tha

  1   2   3   >