This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]