This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: C++: INHERITED_VALUE_BINDING_P
> | 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