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]

assembly name collisions in C++


Ken Raeburn <raeburn@raeburn.org> writes:

  Ken> I don't know the C++ standard well enough to say with
  Ken> authority whether namespaces and classes are supposed to have
  Ken> distinct, uh, name spaces

I believe that your code sample is illegal -- you can't declare both a
class and a namespace foo in the same scope.  The problem isn't in the
mangling; however, it is a bug that gcc doesn't catch the double
declaration of foo.

Regards
Alex Samuel
CodeSourcery LLC

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