On Thu, 21 Feb 2008 16:58:07 +0000 Nick Treleaven email@example.com wrote:
On Tue, 19 Feb 2008 13:41:16 -0500 "Daniel Richard G." skunk@iSKUNK.ORG wrote:
I have a standard set of flags:
CFLAGS = -O0 -g3 -pedantic -fno-common -pipe -W -Wall -Wcast-align \ -Wcast-qual -Wconversion -Wformat=2 -Winline -Wpointer-arith \ -Wshadow -Wundef -Wno-unused-parameter -Waggregate-return \ -Wnested-externs -Wstrict-prototypes
Some of those -W... flags may be too much, but at a mininum everything up to and including -Wall. I particularly recommend -fno-common; that one will catch multiply-defined symbols.
Thanks, I'll update my flags soon.
I've tried the -pedantic option but I think I'll have to avoid that for my default CFLAGS until the C++-style comments are gone everywhere. This is because I like to use the -Werror option and there seems to be no way to turn off C++-style comment warnings, (because they are not part of ISO C90).
Still, if the Scintilla project agrees to this for their C headers I'll always use it. For now, I'll try to do some builds with -pedantic every now and then to catch portability problems.