This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Mangled names different for typedef'ed functions
- To: egcs-bugs at cygnus dot com
- Subject: Mangled names different for typedef'ed functions
- From: Martin Buchholz <martin at xemacs dot org>
- Date: Sat, 25 Apr 1998 17:37:44 -0700 (PDT)
- Reply-To: martin at xemacs dot org
egcs-2.91.24, Linux-i386, C++
Apparently a change in the latest snapshot.
If two functions have identical signatures except that one uses a
typedef, they should have identical mangled names. This only happens
when the typedef'ed arg occurs repeatedly, so this looks like a simple
bug, not an attempt at stricter type-checking.
The new behavior is much more likely to cause unwarranted link errors.
shell transcript follows:
(martin@lasker) ~/src $ egcs -c -x c++ typed.c && nm typed.o | grep 'foo\|bar'
00000018 T bar1__Fi
00000024 T bar2__Fi
00000000 T foo1__Fii
0000000c T foo2__FiT0
(martin@lasker) ~/src $ cat typed.c
typedef int intptr_t;
void foo1 ( int i, int j) {}
void foo2 (intptr_t i, intptr_t j) {}
void bar1 (int i) {}
void bar2 (intptr_t i) {}
(martin@lasker) ~/src $ egcs --version
egcs-2.91.24
I am not on this mailing list.