This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/7740] builtins, and functions marked as extern "C++" with incorrect "C" linkage


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]