This is the mail archive of the
mailing list for the GCC project.
Re: RFC: -Wall by default
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 perfectly legal C program, and gcc spewed out
>>>> a ton of messages."
>>> What's a "legal C program"?
>> It's generally used to mean one that is fully defined by the
>> specifications in effect, often some combination of POSIX and ISO C,
>> with perhaps some vendor extensions. Why do you ask?
> Because: What if the specifications in effect say (as some vendor
> extension) that some construct will generate some warning?
Interesting. I had not considered that, but I have never seen such a
specification. Usually warnings are for things that are permitted by
a specification, but not "good" in some way. That's why warnings are
usually optional, AFAIK; the program is well-defined, but has some
properties that are, in the opinion of the compiler writer,
> Note that warnings in general are not forbidden by ISO C, so that
> there is nothing wrong as far as ISO C is concerned.
No, but ISO C only talks about diagnostics anyway: there is no real
distinction between warnings and errors.