This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
setting default error/warning options for gcc/g++?
- To: gcc-bugs at gcc dot gnu dot org
- Subject: setting default error/warning options for gcc/g++?
- From: gjertsen at us dot ibm dot com
- Date: Wed, 26 Jul 2000 12:07:46 -0400
My basic question is whether there is any way you can configure the
gcc/g++ compiler default behavior with respect to warnings and errors other
than changing the source code (assuming nothing is specified by the user
via -W arguments)?
The context for the question is the following:
I am finding that the g++ compiler from Cygnus on IA64 Linux is very
strict,
which is OK, although it is annoying that it ignores anything that I
specify
on the command line to change warning/error options (-fpermissive,
-Wno-error, etc).
So, I would like to be able to get the same behavior on the i386 with gcc.
I don't want to use "-Wall -Werror", though, because this
brings out some warnings that aren't that important.
It appears that -Wall is the default setting on the i386 (or in general).
I would like to be able to do something where I could
selectively choose some warnings that the build would
also break on for the i386, eg,
"-w -Wimplicit -Wreturn-type -Wpointer-arith -Wbad-function-cast
-Werror"
But it look like -w toggles off warnings regardless of what you put
after it and I've confirmed this by looking at the source file toplev.c.
It looks like I'll need to change this file to get something like the above
to work the way I'd like it to, but I was hoping that there is a
configuration
file somewhere that I am not aware of that would allow you to set defaults
for
warnings and whether error should be flagged on the warnings.
Thanks,
--Rob