Re: RFC: -Wall by default

2012-04-13 Thread Gabriel Dos Reis
On Thu, Apr 12, 2012 at 4:50 PM, Robert Dewar de...@adacore.com 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

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 Dewarde...@adacore.com 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

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 Dewarde...@adacore.com wrote: On 4/9/2012 1:36 PM, Jonathan Wakely wrote: Maybe -Wstandard isn't the best name though, as standard usually means

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 ordering to numbers

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 Dewarde...@adacore.com 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 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 completely know

Re: RFC: -Wall by default

2012-04-13 Thread Gabriel Dos Reis
On Fri, Apr 13, 2012 at 5:39 PM, Dave Korn dave.korn.cyg...@gmail.com 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*.  

Re: RFC: -Wall by default

2012-04-13 Thread NightStrike
On Fri, Apr 13, 2012 at 12:46 PM, Dave Korn dave.korn.cyg...@gmail.com 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 Dewarde...@adacore.com  wrote: On

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 a

Re: RFC: -Wall by default

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

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

Re: RFC: -Wall by default

2012-04-12 Thread Miles Bader
Robert Dewar de...@adacore.com 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

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 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 something quite specific

Re: RFC: -Wall by default

2012-04-12 Thread Fabien Chêne
2012/4/12 Robert Dewar de...@adacore.com: 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

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 || -- in the

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 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

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 100% agree

Re: RFC: -Wall by default

2012-04-12 Thread Gabriel Dos Reis
On Thu, Apr 12, 2012 at 5:23 AM, Dave Korn dave.korn.cyg...@gmail.com 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

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

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

Re: RFC: -Wall by default

2012-04-12 Thread Gabriel Dos Reis
On Thu, Apr 12, 2012 at 9:38 AM, Robert Dewar de...@adacore.com 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. Me

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 de...@adacore.com 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

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 two different

Re: RFC: -Wall by default

2012-04-12 Thread Gabriel Dos Reis
On Thu, Apr 12, 2012 at 9:46 AM, Dave Korn dave.korn.cyg...@gmail.com wrote: On 12/04/2012 15:43, Gabriel Dos Reis wrote: On Thu, Apr 12, 2012 at 9:38 AM, Robert Dewar de...@adacore.com wrote: On 4/12/2012 10:26 AM, Gabriel Dos Reis wrote: -W0: no warnings (equivalent to -w) -W1: default

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 dave.korn.cyg...@gmail.com 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

Re: RFC: -Wall by default

2012-04-12 Thread Gabriel Dos Reis
On Thu, Apr 12, 2012 at 10:01 AM, Dave Korn dave.korn.cyg...@gmail.com wrote: On 12/04/2012 15:55, Gabriel Dos Reis wrote: On Thu, Apr 12, 2012 at 9:46 AM, Dave Korn dave.korn.cyg...@gmail.com wrote: On 12/04/2012 15:43, Gabriel Dos Reis wrote: People easily associates some ordering to

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

Re: RFC: -Wall by default

2012-04-12 Thread Gabriel Dos Reis
On Thu, Apr 12, 2012 at 10:16 AM, Robert Dewar de...@adacore.com 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 Dave Korn
On 12/04/2012 16:06, Gabriel Dos Reis wrote: On Thu, Apr 12, 2012 at 10:01 AM, Dave Korn dave.korn.cyg...@gmail.com wrote: On 12/04/2012 15:55, Gabriel Dos Reis wrote: On Thu, Apr 12, 2012 at 9:46 AM, Dave Korn dave.korn.cyg...@gmail.com wrote: On 12/04/2012 15:43, Gabriel Dos Reis wrote:

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

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

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.

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

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 Gabriel Dos Reis
On Thu, Apr 12, 2012 at 10:24 AM, Dave Korn dave.korn.cyg...@gmail.com wrote: On 12/04/2012 16:06, Gabriel Dos Reis wrote: On Thu, Apr 12, 2012 at 10:01 AM, Dave Korn dave.korn.cyg...@gmail.com wrote: On 12/04/2012 15:55, Gabriel Dos Reis wrote: On Thu, Apr 12, 2012 at 9:46 AM, Dave Korn

Re: RFC: -Wall by default

2012-04-12 Thread Gabriel Dos Reis
On Thu, Apr 12, 2012 at 10:38 AM, Jonathan Wakely jwakely@gmail.com 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

Re: RFC: -Wall by default

2012-04-12 Thread Gabriel Dos Reis
On Thu, Apr 12, 2012 at 10:43 AM, Pedro Alves pal...@redhat.com 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

Re: RFC: -Wall by default

2012-04-12 Thread Gabriel Dos Reis
On Thu, Apr 12, 2012 at 10:49 AM, Gabriel Dos Reis g...@integrable-solutions.net wrote: On Thu, Apr 12, 2012 at 10:38 AM, Jonathan Wakely jwakely@gmail.com 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

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 pal...@redhat.com 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 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 operator

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,

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 another set of

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?

Re: RFC: -Wall by default

2012-04-12 Thread Gabriel Dos Reis
On Thu, Apr 12, 2012 at 3:56 PM, Dave Korn dave.korn.cyg...@gmail.com 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

Re: RFC: -Wall by default

2012-04-12 Thread Gabriel Dos Reis
On Thu, Apr 12, 2012 at 4:00 PM, Dave Korn dave.korn.cyg...@gmail.com 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

Re: RFC: -Wall by default

2012-04-12 Thread Gabriel Dos Reis
On Thu, Apr 12, 2012 at 4:30 PM, Jonathan Wakely jwakely@gmail.com 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

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:38 PM, Robert Dewar de...@adacore.com 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

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

Re: RFC: -Wall by default

2012-04-12 Thread Gabriel Dos Reis
On Thu, Apr 12, 2012 at 4:42 PM, Robert Dewar de...@adacore.com 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
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-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. Indeed,

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 Dos Reis

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

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 de...@adacore.com 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

Re: RFC: -Wall by default

2012-04-11 Thread Ian Lance Taylor
Andrew Haley a...@redhat.com writes: On 04/05/2012 01:28 PM, Michael Veksler wrote: As for specific warnings, I hate that the the code (ab || cd), 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

Re: RFC: -Wall by default

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

Re: RFC: -Wall by default

2012-04-11 Thread Peter Bigot
On Wed, Apr 11, 2012 at 11:18 AM, Ian Lance Taylor i...@google.com wrote: Andrew Haley a...@redhat.com writes: On 04/05/2012 01:28 PM, Michael Veksler wrote: As for specific warnings, I hate that the the code (ab || cd), which did not cause a warning on older gcc version now gives a

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-10 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 section of

Re: RFC: -Wall by default

2012-04-10 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-10 Thread Miles Bader
2012年4月10日15:26 Eric Botcazou ebotca...@adacore.com: 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

Re: RFC: -Wall by default

2012-04-10 Thread Gabriel Dos Reis
On Tue, Apr 10, 2012 at 2:07 AM, Miles Bader mi...@gnu.org wrote: 2012年4月10日15:26 Eric Botcazou ebotca...@adacore.com: 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,

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 :) used

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 a...@redhat.com 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

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 as I wrote a

Re: RFC: -Wall by default

2012-04-10 Thread Miles Bader
Andrew Haley a...@redhat.com 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

Re: RFC: -Wall by default

2012-04-10 Thread Gabriel Dos Reis
On Tue, Apr 10, 2012 at 7:40 AM, Michael Matz m...@suse.de 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 against

Re: RFC: -Wall by default

2012-04-10 Thread Gabriel Dos Reis
On Tue, Apr 10, 2012 at 7:40 AM, Michael Matz m...@suse.de 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 against

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 (ab || cd), 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 ((ab)||(cd)) which

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-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 understood

Re: RFC: -Wall by default

2012-04-09 Thread Gabriel Dos Reis
On Mon, Apr 9, 2012 at 11:29 AM, Gerald Pfeifer ger...@pfeifer.com 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

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 Pfeiferger...@pfeifer.com 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

Re: RFC: -Wall by default

2012-04-09 Thread Gabriel Dos Reis
On Mon, Apr 9, 2012 at 12:15 PM, Robert Dewar de...@adacore.com wrote: On 4/9/2012 1:08 PM, Gabriel Dos Reis wrote: On Mon, Apr 9, 2012 at 11:29 AM, Gerald Pfeiferger...@pfeifer.com  wrote: On Sun, 8 Apr 2012, Robert Dewar wrote: Do you really want me to file hundreds of bug reports that

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 yet

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 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,

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: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 Gabriel Dos Reis
On Mon, Apr 9, 2012 at 12:36 PM, Jonathan Wakely jwakely@gmail.com 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

Re: RFC: -Wall by default

2012-04-09 Thread Gabriel Dos Reis
On Mon, Apr 9, 2012 at 12:44 PM, Robert Dewar de...@adacore.com 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

Re: RFC: -Wall by default

2012-04-09 Thread Andreas Schwab
Gabriel Dos Reis g...@integrable-solutions.net writes: On Mon, Apr 9, 2012 at 12:44 PM, Robert Dewar de...@adacore.com 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

Re: RFC: -Wall by default

2012-04-08 Thread James Cloos
MB == Miles Bader mi...@gnu.org writes: MB [Or, perhaps, not -Wall perse, but maybe a new option which MB is a little more conservative, -Wstandard or something...] Sure. Making a few more of the -W flags on by default may be OK, depending on the chosen list. It is the idea of turing all

Re: RFC: -Wall by default

2012-04-08 Thread Gabriel Dos Reis
On Sun, Apr 8, 2012 at 10:16 AM, James Cloos cl...@jhcloos.com wrote: MB == Miles Bader mi...@gnu.org writes: MB [Or, perhaps, not -Wall perse, but maybe a new option which MB is a little more conservative, -Wstandard or something...] Sure.  Making a few more of the -W flags on by default

Re: RFC: -Wall by default

2012-04-08 Thread Dave Korn
On 07/04/2012 23:58, Gabriel Dos Reis wrote: On Sat, Apr 7, 2012 at 5:41 PM, Dave Korn wrote: -Wunused-function -Wunused-label -Wunused-value -Wunused-variable IMHO we should move the -Wunused ones into -Wextra if we're going to turn on -Wall by default. The rest seem pretty reasonable

Re: RFC: -Wall by default

2012-04-08 Thread Jonathan Wakely
On 8 April 2012 16:16, James Cloos wrote: Sure.  Making a few more of the -W flags on by default may be OK, depending on the chosen list.  It is the idea of turing all possible warning options on by default which is unreasonable. Noone's suggested doing that. As Gaby said, -Wall doesn't turn

Re: RFC: -Wall by default

2012-04-08 Thread Robert Dewar
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. On the contrary, I would guess that if -Wall is set by

Re: RFC: -Wall by default

2012-04-08 Thread Gabriel Dos Reis
On Sun, Apr 8, 2012 at 1:51 PM, Robert Dewar de...@adacore.com 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

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. On the

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 Dewarde...@adacore.com 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

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

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 really want me

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

Re: RFC: -Wall by default

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

Re: RFC: -Wall by default

2012-04-08 Thread Gabriel Dos Reis
On Sun, Apr 8, 2012 at 2:54 PM, Robert Dewar de...@adacore.com 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

Re: RFC: -Wall by default

2012-04-08 Thread Gabriel Dos Reis
On Sun, Apr 8, 2012 at 3:13 PM, Robert Dewar de...@adacore.com 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

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

  1   2   3   >