[cfe-commits] r150128 - in /cfe/trunk: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaDecl.cpp test/SemaCXX/function-extern-c.cpp

Craig Silverstein csilvers at google.com
Thu Feb 9 13:16:24 PST 2012


} I'm confused, why does removing extern "C" not work? If no one calls
} or defines the function from C, why mangle the name that way?

This is probably getting a bit off the subject, but I can think of one
reason: you need to know the name for the linker but don't want to
have to deal with mangling-portability issues.

For instance, if the c++ function were part of a library interface,
you might need to put its name in a .def file on windows, and pass it
to -export-symbols-regex for libtool, and would be happy if it were
the same name in both places.

craig



More information about the cfe-commits mailing list