Article View: gnu.gcc.help
Article #51509Re: Looking for technique for 'non-destructive' use of gcc
From: Fergus James HENDERSON
Date: Thu, 13 May 1993 13:17
Date: Thu, 13 May 1993 13:17
26 lines
1972 bytes
1972 bytes
lwv26@cas.org (Larry W. Virden) writes:
>I would love to have a way to call gcc with some 'noise' flags to tell gcc
>to do lots of error checking but to produce no .o or a.out type file.
>
>I would like to have at least -Wall -pedantic -traditional (or -ansi) and
>if there are a few other good 'noise' flags that would be great. Note
>that I DO want to know though if the arguments are mismatched between
>modules - does that require me to produce .o files? If so, can I tell
>gcc to put them in some other directory?
You can use the -fsyntax-only option to suppress creating of an object
file, but I don't know if that also suppresses some warnings.
To get warning about uninitialized variables, you have to compile with -O.
In addition to -ansi -pedantic -Wall, I use the following options:
-Wshadow -Wwrite-strings -Wcast-qual
-Wtraditional -Wcast-align -Wstrict-prototypes -Wmissing-prototypes
-Wenum-clash -Woverloaded-virtual # C++ options
Check the man page.
--
Fergus Henderson This .signature virus might be
fjh@munta.cs.mu.OZ.AU getting old, but you still can't
consistently believe it unless you
Linux: Choice of a GNU Generation copy it to your own .signature file!
Technical Details
Message-ID:
<9313323.29891@mulga.cs.mu.OZ.AU>Path:
arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!howland.reston.ans.net!usc!cs.utexas.edu!uunet!munnari.oz.au!cs.mu.OZ.AU!munta.cs.mu.OZ.AU!fjhReferences:
<1993May12.171712.3171@cas.org>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,2604bba567268280 X-Google-Attributes: gid11318c,public X-Google-ArrivalTime: 1993-05-13 06:31:11 PST Newsgroups: gnu.gcc.help Path: arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!howland.reston.ans.net!usc!cs.utexas.edu!uunet!munnari.oz.au!cs.mu.OZ.AU!munta.cs.mu.OZ.AU!fjh From: fjh@munta.cs.mu.OZ.AU (Fergus James HENDERSON) Subject: Re: Looking for technique for 'non-destructive' use of gcc Message-ID: <9313323.29891@mulga.cs.mu.OZ.AU> Sender: news@cs.mu.OZ.AU Organization: Computer Science, University of Melbourne, Australia References: <1993May12.171712.3171@cas.org> Date: Thu, 13 May 1993 13:17:10 GMT Lines: 26