Re: extern c in cpp file`

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Eljay Love-Jensen wrote:
Hi Yamin,

The consequences of declaring a function as extern "C" are...

1) the name will be mangled according to your platform's C mangling convention*.
2) I recall (and I may be mistaken) that such a function acts as a "C barrier", and thus exceptions do not propagate through such a function.
you are mistaken. when compiled by a C++ compiler, you'll get all the C++
exception semantics. When compiled by a C compiler, you might or might not
get unwind info emitted (with gcc -fexceptions, you will IIRC).

nathan

--
Nathan Sidwell    ::   http://www.codesourcery.com   ::     CodeSourcery LLC
         The voices in my head said this was stupid too
nathan@xxxxxxxxxxxxxxxx    ::     http://www.planetfall.pwp.blueyonder.co.uk



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux