public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* setting default error/warning options for gcc/g++?
@ 2000-07-26  9:12 gjertsen
  0 siblings, 0 replies; only message in thread
From: gjertsen @ 2000-07-26  9:12 UTC (permalink / raw)
  To: gcc-bugs

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



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2000-07-26  9:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-07-26  9:12 setting default error/warning options for gcc/g++? gjertsen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).