[Bug c++/48489] Invalid error message 'has no member named' when referring directly to the base class

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Apr 7 13:03:00 GMT 2011


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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |diagnostic
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2011.04.07 13:02:52
     Ever Confirmed|0                           |1

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-04-07 13:02:52 UTC ---
The attachment can be simplified to:

struct Base{ };

struct Concrete : Base
{
    void setValue();
};

int main()
{
    Concrete d;
    d.Base::setValue();
}


which gives the error:
error: 'struct Concrete' has no member named 'setValue'

expected:
error: 'struct Base' has no member named 'setValue'



More information about the Gcc-bugs mailing list