Date: Wed, 30 Dec 1998 10:51:27 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Stuart Hall cc: djgpp AT delorie DOT com Subject: Re: -pedantic, -ansi --> not really recommended in GNU CC/RHIDE Help? In-Reply-To: <36893f93.7126974@news> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com On Tue, 29 Dec 1998, Stuart Hall wrote: > What I wonder is, what are the useful flags to use for a newbie > programmer? The best combination of flags is "-Wall -O" (that's a capital o, not a zero). The reason for -O is that some sophisticated tests are only performed by the compiler as part of optimizing the code, so you could miss some warnings if you compile without -O. -Wall catches a lot of dubious (aka: buggy) code. If you want even more diagnostics, add these switches to -Wall: -W -Wbad-function-cast -Wcast-qual -Wmissing-declarations -Wmissing-prototypes -Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings