[cfe-dev] clang symbol visibility question

Rafael EspĂ­ndola rafael.espindola at gmail.com
Mon Oct 25 08:23:38 PDT 2010


> And so the question:
>
> Is this a bug in clang++, or am I doing something wrong with visibility. And if I'm doing something wrong, what should I do instead.

It looks like you found an interesting bug in clang's handling of
visibility in C++. I reduce the test a bit:


struct AudioTimeStamp { int field; };
void  __attribute__((visibility("default"))) Foo  (struct
AudioTimeStamp *timeStamp) { }


Compile it as C++ code and you get a hidden function. Compile it as C
and you get one with default visibility. Both gcc and g++ will produce
a function with default visibility.

Would you mind adding this to bugzilla?

> Thanks
>
>
> -- Jean-Daniel

Thanks,
Rafael



More information about the cfe-dev mailing list