This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/7740] builtins, and functions marked as extern "C++" with incorrect "C" linkage
- From: "joerg dot richter at pdv-fs dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Nov 2004 08:20:52 -0000
- Subject: [Bug c++/7740] builtins, and functions marked as extern "C++" with incorrect "C" linkage
- References: <20020827142601.7740.gccfeature@yahoo.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From joerg dot richter at pdv-fs dot de 2004-11-03 08:20 -------
In a recent discussion on comp.lang.c++.moderated was this example to give
bar "C++" linkage and foo "C" linkage. But g++ gives them both "C" linkage. It
might be anonther instance of this problem.
extern "C++" {
typedef void (cpp_func)(int);
}
extern "C" void foo(int a){
cpp_func bar;
bar(a);
}
> nm x.o
U bar
00000000 T foo
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |joerg dot richter at pdv-fs
| |dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7740