This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

proper use of __attribute__((visibility("hidden")))


I found the following #define artifact on http://gcc.gnu.org/wiki/Visibility.

This suggests that while the Microsoft standard requires an using/building concept, but gcc doesn't.

However, I've found an email on this newsgroup that suggests that the "using" code should see a macro that is empty, not "__attribute__ ((visibility("hidden")))".

Which is correct?


#ifdef _MSC_VER #ifdef BUILDING_DLL #define DLLEXPORT __declspec(dllexport) #else #define DLLEXPORT __declspec(dllimport) #endif #define DLLLOCAL #else #ifdef HAVE_GCCVISIBILITYPATCH #define DLLEXPORT __attribute__ ((visibility("default"))) #define DLLLOCAL __attribute__ ((visibility("hidden"))) #else #define DLLEXPORT #define DLLLOCAL #endif #endif


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]