Bug #15914: *lots* of compiler warnings...
| From: | temp201 at hotmail dot com | Date: | Wed, 06 Mar 2002 20:42:22 +0000 |
| Subject: | Bug #15914: *lots* of compiler warnings... | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-1829@lists.php.net to get a copy of this message | ||
From: temp201@hotmail.com
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