[sldev] -Werror (was: Notes from a Mac Build)

Boroondas Gupte sllists at boroon.dasgupta.ch
Wed Nov 4 06:52:04 PST 2009


Lillian Yiyuan wrote:
> You can tell the nice people developing the gcc that they made a
> mistake enforcing type checking then. However, you've provided no
> evidence that your position is based on any kind of knowledge.
>
> On Wed, Nov 4, 2009 at 5:55 AM, Argent Stonecutter
> <secret.argent at gmail.com> wrote:
>   
>> Which is why it should be left as a *warning* until someone actually
>> traces down what the correct fix is, rather than hiding it or creating
>> a memory leak.
g++-4.4.x by default only warns about it. It's the -Werror option that
turns the warning (all enabled warnings, actually) into an error.
-Werror is useful to ensure the code compiles without any warnings at
all. Though, as here, it might cause a project stop building when the
compiler changes what it warns about by default and the new default
warning isn't disabled manually.

Unfortunately, there doesn't seem to be a way to exclude only specific
warnings from becoming fatal and still have them displayed as warnings,
so if you cannot fix the code, either removing -Werror or turning off
the warning are probably your only options.

Boroondas


More information about the SLDev mailing list