assembly name collisions in C++
Ken Raeburn
raeburn@raeburn.org
Wed Jul 26 12:28:00 GMT 2000
Alex Samuel <samuel@codesourcery.com> writes:
> 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.
Thanks. I just bought a copy of the spec from the ANSI web site (much
cheaper than hardcopies I've gotten before!), and after looking at
some bits in section 7, I agree. I still want to look further at how
far the prohibition against reusing the name of a namespace goes, but
clearly my example is invalid and should be caught by the compiler.
Ken
More information about the Gcc-bugs
mailing list