http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51152

             Bug #: 51152
           Summary: error: X has no member named Y on code that seems
                    valid
    Classification: Unclassified
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: ca...@cs.stanford.edu


How to run:  g++ -c prog.cpp

prog.cpp is attached.

Diagnostic produced:

prog.cpp: In member function ‘void C::f()’:
prog.cpp:21:12: error: ‘struct B’ has no member named ‘a’

Version of g++ that produces this diagnostic:

Using built-in specs.
COLLECT_GCC=/home/cas43/new-gcc/inst/bin/g++
COLLECT_LTO_WRAPPER=/home/cas43/new-gcc/inst/libexec/gcc/x86_64-unknown-linux-gnu/4.7.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../current-gcc/configure --prefix=/home/cas43/new-gcc/inst
Thread model: posix
gcc version 4.7.0 20111116 (experimental) (GCC) 

Expected: should compile cleanly.  (Compiles cleanly with gcc version 4.4.3
(Ubuntu 4.4.3-4ubuntu5))

Reply via email to