This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/11284] New: Bad code generation with "warning: the address ... will always be `true'"
- From: "falk at debian dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 Jun 2003 14:51:50 -0000
- Subject: [Bug c++/11284] New: Bad code generation with "warning: the address ... will always be `true'"
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11284
Summary: Bad code generation with "warning: the address ... will
always be `true'"
Product: gcc
Version: 3.4
Status: UNCONFIRMED
Keywords: wrong-code
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: falk at debian dot org
CC: gcc-bugs@gcc.gnu.org
GCC build triplet: alphaev56-unknown-linux-gnu
GCC host triplet: alphaev56-unknown-linux-gnu
GCC target triplet: alphaev56-unknown-linux-gnu
Reported by James W. McKelvey (mckelvey at maskull com) on gcc-bugs, but doesn't
seem to be in the database.
He writes:
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'
I can confirm this:
% g++ --version
g++ (GCC) 3.4 20030614 (experimental)
% g++ -c bad.ii
bad.cc: In function `int main()':
bad.cc:15: warning: the address of `const PatternMaster::Pattern
look(PatternMaster::LookAheadPattern)', will always be `true'
I can't check right now whether it is a regression, because 3.3 gets
a parse error in the headers.