[cfe-dev] clang trunk: extern "C"/static problem
Richtarsky, Martin
martin.richtarsky at sap.com
Thu Mar 14 06:34:01 PDT 2013
Hi,
it seems there is a bug in current trunk with regards to the symbols that are generated. At least clang 3.1, gcc 4.3.4 and gcc 4.8 behave differently here.
test.cpp:
extern "C"
{
static void __attribute__((__used__)) func(char *a, char b)
{
}
}
clang++ test.cpp
nm -C test*.o shows these generated symbols for the different compilers:
test_clang31.o:
0000000000000000 t func
test_clang33.o:
0000000000000000 t func(char*, char)
test_gcc43.o:
U __gxx_personality_v0
0000000000000000 t func
test_gcc48.o:
0000000000000000 t func
It looks like the static in conjunction with the extern "C" is causing a problem here. Should I file a bug?
Best regards,
Martin
More information about the cfe-dev
mailing list