This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/9432: [3.4 regression] [New parser] ICE in validate_nonmember_using_decl, at cp/decl2.c:4152
- From: "Giovanni Bajo" <giovannibajo at libero dot it>
- To: <gcc-gnats at gcc dot gnu dot org>,<rguenth at tat dot physik dot uni-tuebingen dot de>,<gcc-bugs at gcc dot gnu dot org>,<nobody at gcc dot gnu dot org>,<gcc-prs at gcc dot gnu dot org>
- Date: Fri, 24 Jan 2003 23:59:14 +0100
- Subject: Re: c++/9432: [3.4 regression] [New parser] ICE in validate_nonmember_using_decl, at cp/decl2.c:4152
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&p
r=9432
Using declarations to 'import' symbols from base classes are legal only at
class definition scope, not member function scope. You can use using
declarations at function scope to import from other namespaces, that's
perfectly legal:
namespace A
{ int a; }
struct Foo {
void Bar(void)
{
using A::a;
a = 5;
}
};
I agree that the proposed code should not compile.
Giovanni Bajo