The visibility type attribute
With the visibility type attributes, you can control whether and how a structure/union/class or an enumeration that is defined in one module can be referenced or used in other modules. Visibility attributes affect only types with external linkage. By using this feature, you can make a shared library smaller and decrease the possibility of symbol collision. For details, see Using visibility attributes.
Example
In the following example, the visibility
attribute of class A is protected, and that of enumeration E is
hidden:
class __attribute__((visibility("protected"))) A {};
enum __attribute__((visibility("hidden"))) E {e1,e2} e;