From:             [EMAIL PROTECTED]
Operating system: 
PHP version:      4.1.2
PHP Bug Type:     Compile Warning
Bug description:  *lots* of compiler warnings...

Compiler warnings ?
You mean you want to see compiler warnings ?

Well if youv'e got gcc, try compiling with
-Wall -Wshadow -Wpointer-arith -Wcast-qual -W


Just to give a few serious examples here:

cast discards qualifiers from pointer target type
comparison between signed and unsigned
comparison of unsigned expression < 0 is always false
signed and unsigned type in conditional expression
declaration of `foo' shadows previous local
declaration of `foo' shadows global declaration
`foo' defined but not used
implicit declaration of function `foo'
left-hand operand of comma expression has no effect
missing initializer
passing arg 1 of `foo' discards qualifiers from pointer target type
`foo' declared `bar' but never defined
`register' is not at beginning of declaration
statement with no effect
`static' is not at beginning of declaration
unused parameter `foo'


Mind you, some of these, like "comparison between signed and unsigned" or
"signed and unsigned type in conditional expression" are even considered
FATAL or ILLEGAL by some compilers, instead of 'just' warnings...


May I even dare suggest the developers (the ones using gcc at least)
include the following:

CFLAGS="-Wall -Wshadow -Wpointer-arith -Wcast-qual -W"
CPPFLAGS="-Wall -Wshadow -Wpointer-arith -Wcast-qual -W"
export CFLAGS CPPFLAGS

to their .profiles ?

-- 
Edit bug report at http://bugs.php.net/?id=15914&edit=1
-- 
Fixed in CVS:        http://bugs.php.net/fix.php?id=15914&r=fixedcvs
Fixed in release:    http://bugs.php.net/fix.php?id=15914&r=alreadyfixed
Need backtrace:      http://bugs.php.net/fix.php?id=15914&r=needtrace
Try newer version:   http://bugs.php.net/fix.php?id=15914&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=15914&r=support
Expected behavior:   http://bugs.php.net/fix.php?id=15914&r=notwrong
Not enough info:     http://bugs.php.net/fix.php?id=15914&r=notenoughinfo
Submitted twice:     http://bugs.php.net/fix.php?id=15914&r=submittedtwice

Reply via email to