[Bug c++/54883] Name mangling of types in an unnamed namespace

sebastian.huber@embedded-brains.de gcc-bugzilla@gcc.gnu.org
Tue Oct 30 14:16:00 GMT 2012


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54883

--- Comment #2 from Sebastian Huber <sebastian.huber@embedded-brains.de> 2012-10-30 14:16:05 UTC ---
Known to work GCC 4.0.4, 4.1.2, and 4.2.4:

echo "namespace { enum E { E1 }; } void f(E e) { }" | tee a.c b.c
namespace { enum E { E1 }; } void f(E e) { }
/scratch/install-gcc-4.2.4/bin/g++ -c a.c -o a.o
/scratch/install-gcc-4.2.4/bin/g++ -c b.c -o b.o
nm a.o b.o

a.o:
0000000000000000 T _Z1fN32_GLOBAL__N_a.c_00000000_287815161EE
                 U __gxx_personality_v0

b.o:
0000000000000000 T _Z1fN32_GLOBAL__N_b.c_00000000_BE213B141EE
                 U __gxx_personality_v0

Known to fail 4.3.6, 4.4.7, 4.5.4, 4.6.3, 4.7.2, and 4.8.0.

Is this a bug or a feature?

In the GCC 4.3 release notes there is nothing about namespaces
(http://gcc.gnu.org/gcc-4.3/changes.html).

It would be nice if someone can point out the future direction of this PR, e.g.
NEW or RESOLVED/WONTFIX.



More information about the Gcc-bugs mailing list