Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Apr 1996 08:49:48 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        msmith@atrad.adelaide.edu.au, terry@lambert.org
Cc:        bde@zeta.org.au, freebsd-hackers@freebsd.org, jmacd@CS.Berkeley.EDU
Subject:   Re: GNU binutils port
Message-ID:  <199604242249.IAA24720@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>> gcc -Wall is _pedantic_.  Consider how many of the above are 

Nah.  It's not even pedantic.

``gcc \
	-Wall -ansi -pedantic \
	-Wbad-function-cast \
	-Wcast-align \
	-Wcast-qual \
	-Wchar-subscripts \
	-Wconversion \
	-Werror \
	-Winline \
	-Wmissing-declarations \
	-Wmissing-prototypes \
	-Wnested-externs \
	-Wpointer-arith \
	-Wredundant-decls \
	-Wshadow \
	-Wstrict-prototypes \
	-Wwrite-strings

# Use these for code that has to be compilable with K&R compilers:
# -Waggregate-return -Wid-clash-7 -Wtraditional''

is _pedantic_.  I use something like the above in my gccw script.

>> "Consider parentheses around assignment used as truth value", or

I like this.  OTOH, I hate the one about && vs || and always turn it off
in my local cc1 binaries.

>> "Integer used as pointer without a cast" (for use of '0' as a [legitimate]
>> substitute for NULL.

I haven't seen this.  ANSI defines null pointer constants quite well and gcc
implements them quite well.

Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199604242249.IAA24720>