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]

[Bug c++/11284] New: Bad code generation with "warning: the address ... will always be `true'"


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.


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