C++: INHERITED_VALUE_BINDING_P

Mark Mitchell mark@codesourcery.com
Mon Oct 27 11:51:00 GMT 2003


> | In particular, this code:
> | 
> | struct A {
> |   struct B {};
> | };
> | 
> | struct C : public A {
> |   void B();
> | };
> | 
> | struct C::B b;
> | 
> | is legal.
> 
> I do not believe the program is well-formed for the reasons explained
> in 10.2/2

Neither G++ nor the EDG front end agree with you.

Both consider the tag-type and ordinary namespaces separately; a
declaration hides only those entities from base classes that are of the
same kind.

I can't say definitively whether that's correct or not, but before we
change G++ we should have an opinion from the commitee.

-- 
Mark Mitchell <mark@codesourcery.com>
CodeSourcery, LLC



More information about the Gcc mailing list