Newer gccs produce a warning in struct __attribute__((visibility("hidden"))) foo { }; struct bar { foo x; // bar has default visibility, but foo is hidden }; struct zed : public foo { // zed has default visibility, but foo is hidden }; I think it is a reasonable warning because * If the type has a hidden member or base, that member or base was created locally (in the same DSO), so the type could also be hidden. * If there is something strange going on, the warning is really easy to avoid, just make the visibility of bar and zed explicit.