How to enable all warnings of all warnings of GCCs?
Tom Browder
tom.browder@gmail.com
Sat Dec 1 12:38:00 GMT 2007
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
More information about the Gcc-help
mailing list