This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Where did the warning go?
"Eivind LM" <eivliste@online.no> writes:
> Next question: Does the -Wall flag have a long and complicated history?
No, though certainly the details have changed over time.
> The name indicates that it enables ... well, uh, ... *all* warnings. (Yes,
> i should have read the docs more carefully.)
As the docs say, -Wall enables all warnings which can be easily avoided
by changing the soure code.
> I would like to compile my code with absolutely as many compiler warnings
> enabled as possible, and then selectively deactivate the ones that I
> cannot avoid in a reasonable way.
That is pretty much the goal of -Wall.
The warnings which are not included in -Wall are either difficult to
avoid in some cases or are specific to certain programming styles.
> Is there a way to enable absolutely all? -Weverything? :)
No, that would not be useful. Nobody writes code in the intersection of
all the programming styles supported by all the warning options.
We are certainly open to changing the ways that the warnings are
aggregated into -Wall and -Wextra, including adding a new aggregation
warning if it seems useful. However, -Weverything is unlikely to be
accepted.
Ian