This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Way to look up a C++ function name?
On Fri, 2011-10-14 at 13:39 -0500, Kevin P. Fleming wrote:
>
> It would probably be much easier and more reliable to wrap these
> function declaration in 'extern "C"' wrappers to give them C calling
> semantics...
That's what I am doing now. However, there are cases where other
programmers keep trying to put the functions into namespaces, and then
either a) they don't resolve at run time, or b) the put them inside a
namespace, but then add 'extern "C"', not realizing the functions won't
be modified with the namespace, with the result of collisions at run
time between different modules.
It would be nice if g++ would throw a warning if it sees an extern "C"
within a namespace...