3.4, recent CVS, alpha Linux, bad code generation with "warning: the address ... will always be `true'"
James W. McKelvey
mckelvey@maskull.com
Sun Jun 1 02:01:00 GMT 2003
This code compiles fine with the HP/Compaq cxx compiler, so I believe it is
OK. The code does not execute properly on g++, and gets the warning:
the address of `const PatternMaster::Pattern
look(PatternMaster::LookAheadPattern)', will always be `true'
alpha1:gcc-obj>uname -a
Linux alpha1 2.4.9-40 #1 Mon Sep 23 08:14:02 EDT 2002 alpha unknown
RedHat 7.1
Reading specs from
/usr/local/lib/gcc-lib/alphaev56-unknown-linux-gnu/3.4/specs
Configured with: ../gcc/configure --enable-languages=c++
Thread model: posix
gcc version 3.4 20030531 (experimental)
/usr/local/lib/gcc-lib/alphaev56-unknown-linux-gnu/3.4/cc1plus -E -quiet -v
bad.cc -ansi -pedantic-errors -Wall -W -Wold-style-cast -Wsign-promo
-Wpointer-arith -Wcast-qual -Wconversion -Wundef -Wwrite-strings -Winline
-Woverloaded-virtual -fno-elide-constructors -fno-common -fstrict-aliasing
-fimplicit-templates -o bad.ii
ignoring nonexistent directory "NONE/include"
ignoring nonexistent directory
"/usr/local/alphaev56-unknown-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/local/include/c++/3.4
/usr/local/include/c++/3.4/alphaev56-unknown-linux-gnu
/usr/local/include/c++/3.4/backward
/usr/local/include
/usr/local/lib/gcc-lib/alphaev56-unknown-linux-gnu/3.4/include
/usr/include
End of search list.
/usr/local/lib/gcc-lib/alphaev56-unknown-linux-gnu/3.4/cc1plus
-fpreprocessed bad.ii -quiet -dumpbase bad.cc -ansi -auxbase bad -g
-pedantic-errors -Werror -Wall -W -Wold-style-cast -Wsign-promo
-Wpointer-arith -Wcast-qual -Wconversion -Wundef -Wwrite-strings -Winline
-Woverloaded-virtual -ansi -version -fno-elide-constructors -fno-common
-fstrict-aliasing -fimplicit-templates -o bad.s
GNU C++ version 3.4 20030531 (experimental) (alphaev56-unknown-linux-gnu)
compiled by GNU C version 3.4 20030531 (experimental).
GGC heuristics: --param ggc-min-expand=64 --param ggc-min-heapsize=63731
bad.cc: In function `int main()':
bad.cc:15: warning: the address of `const PatternMaster::Pattern
look(PatternMaster::LookAheadPattern)', will always be `true'
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bad.ii.bz2
Type: application/x-bzip2
Size: 113130 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-bugs/attachments/20030601/d737d30f/attachment.bz2>
More information about the Gcc-bugs
mailing list