This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/8964: [3.3 regression] [ABI] different mangling of names
- From: bangerth at dealii dot org
- To: catherin at ca dot ibm dot com, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org
- Date: 16 Dec 2002 21:10:08 -0000
- Subject: Re: c++/8964: [3.3 regression] [ABI] different mangling of names
- Reply-to: bangerth at dealii dot org, catherin at ca dot ibm dot com, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org, gcc-gnats at gcc dot gnu dot org
Old Synopsis: 2 different templates mangled with the same name
New Synopsis: [3.3 regression] [ABI] different mangling of names
State-Changed-From-To: closed->analyzed
State-Changed-By: bangerth
State-Changed-When: Mon Dec 16 13:10:07 2002
State-Changed-Why:
This little code
---------------------------
template < class T,int I > struct A {
typedef int X;
};
template<class T> struct A<T,3> {
typedef char X;
};
template <template <class B,int I> class XX>
void foo(typename XX<int,3>::X a){}
int main() {
foo<A>('x');
}
-------------------------------
yields different mangled names with 3.2 and 3.3, which
is an ABI change that should probably not be there unless
guarded by -fabi-version:
tmp/g> /home/bangerth/bin/gcc-3.2.2-pre/bin/c++ -c x.cc
tmp/g> nm x.o | grep foo
00000000 W _Z3fooI1AEvN2XX1XE
tmp/g> nm x.o | /home/bangerth/bin/gcc-3.2/bin/c++filt | grep foo
00000000 W void foo<A>(XX::X)
tmp/g> /home/bangerth/bin/gcc-3.3-pre/bin/c++ -c x.cc
tmp/g> nm x.o | grep foo
00000000 W _Z3fooI1AEvN2XXIiLi3EE1XE
tmp/g> nm x.o | /home/bangerth/bin/gcc-3.2/bin/c++filt | grep foo
00000000 W void foo<A>(XX<int, (int)3>::X)
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8964