This is the mail archive of the gcc-help@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: How to enable all warnings of all warnings of GCCs?


On Dec 1, 2007 3:57 AM, J.C. Pizarro <jcpiza@gmail.com> wrote:
> -Wall doesn't enable all warnings.
>
> How to enable all warnings of all warnings of GCCs?

As far as I know, the only way to do it is add them all to the command
line.  I've made a file I call Makefile.warnings which I 'include' in
my main Makefile.  In it I define WARNINGS like so:

WARNINGS  = -Wall
WARNINGS += -Wconversion
(etc.)

Then, in Makefile I will do something like:

g++ [options...] [sources...] $(WARNINGS)

I can individually eliminate unneeded warnings by commenting them out
in Makefile.warnings.

-Tom

Tom Browder
Niceville, Florida
USA


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