This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

3.4, recent CVS, alpha Linux, bad code generation with "warning: the address ... will always be `true'"


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'

Attachment: bad.ii.bz2
Description: BZip2 compressed data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]