This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: How to enable all warnings of all warnings of GCCs?
- From: "Tom Browder" <tom dot browder at gmail dot com>
- To: "J.C. Pizarro" <jcpiza at gmail dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Sat, 1 Dec 2007 06:38:31 -0600
- Subject: Re: How to enable all warnings of all warnings of GCCs?
- References: <998d0e4a0712010157h278c63cl11ec6ead6ea0eb65@mail.gmail.com>
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