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 Thu, Apr 5, 2012 at 11:32 AM, Gabriel Dos Reis
<gdr@integrable-solutions.net> wrote:
> On Thu, Apr 5, 2012 at 3:58 AM, Pedro Alves <palves@redhat.com> wrote:
>> On 04/04/2012 10:44 AM, Gabriel Dos Reis wrote:
>>
>>> Hi,
>>>
>>> For GCC-4.8, I would like to turn on -Wall by default.
>>> Comments?
>>
>>
>> I'd just like to explicitly mention (the obvious fact that)
>> that this has the effect of breaking builds of projects that carefully
>> craft their warning set to be able to use -Werror, such as e.g., GDB.
>>
>> Certainly not insurmountable (just add a -Wno-all), but does
>> require actively tweaking the build system. ?I'm sure there
>> are many projects affected similarly.
>
> Be assured that I fully appreciate that projects do use -Werror.
> In fact, I do personally encourage people to use -Werror.
>
> However, the issue is very specific: we talking about -Wall.
> If something there is wrong as a default we should have a look
> at it whether it should be there at all, should it be improved, etc.

Btw, it would be more reasonable to enable a subset of warnings that
we enable at -Wall by default.  Notably those that if they were not
false positives, would lead to undefined behavior at runtime.  Specifically
I don't think we should warn about unused static functions or variables
by default.

Richard.

> -- Gaby


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