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: RFC: -Wall by default


On 12/04/2012 16:06, Gabriel Dos Reis wrote:
> On Thu, Apr 12, 2012 at 10:01 AM, Dave Korn <dave.korn.cygwin@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.cygwin@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 another set of confusion.
>>>>  What's the problem?  The greater the number, the more warnings you get.  Simple.
>>> Not necessarily.
>>  Your argument makes no sense.
> 
> Do you think that assertion makes sens when no evidence is
> provided to support it?

  My assertion was backed up by the sentences immediately after it, you can't
just take it out of context and expect it to stand by yourself.  Here's the
evidence coming up right now:

>> You said that there was a problem because
>> people will expect numbered -W options to be ordinal.
> 
> What is nonsensical there?

  Well stop interrupting and let me finish!  The very next sentence points out
what is nonsensical about your statement:

>> But they *are* ordinal.
> 
> Now?  What is the order?

  Zero, then one, then two, then three.  Are we having a language difficulty
here?  You can't really be asking me what the ordinal sequence of the integers is.

>>  So people's expectations will be correct.  You haven't said anything about
>> where the problem is yet, you've just asserted that there will be one without
>> demonstration or evidence, so again I ask: What's the problem?
> 
> You said the greater the number the more warnings you get, but you did not
> show that would happen, so you have not shown that would necessarily happen.
> What is nonsensical there?

  You appear to have forgotten what we're talking about, so let me remind you:

>>>>> -W0: no warnings (equivalent to -w)
>>>>> -W1: default
>>>>> -W2: equivalent to the current -Wall
>>>>> -W3: equivalent to the current -Wall -Wextra

  There will be more warnings the greater the number because that is how it
was defined to work.  The "default" will be the suggestion we've been
discussing so far, i.e. effectively -Wall with a few of the less useful
warnings removed.

>>  It works just fine for -O,
> 
> Exactly what happens with -O?  -On does not necessarily
> generate faster or better code when n is higher.

  Exactly, just like how it would be with warnings.  -On when n is higher uses
more optimisations, some of which may be problematic - we're warned that -O3
may be unstable, and similarly -W3 may turn on warnings that are more of a
hinderance than a help.

    cheers,
      DaveK



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