------- Comment #6 from mmitchel at gcc dot gnu dot org 2008-02-26 17:06 ------- We need to be careful about this. We have a lot of ways to specify visibility: dllimport/dllexport attributes, notshared attribute, visibility attributes on classes.
I actually think the compiler is behaving as intended here. To me: #pragma GCC push visibility(hidden) is equivalent to applying: __attribute__((visibility("hidden"))) to all declarations in the scope of the #pragma. And, a class with hidden visibility does have a hidden virtual table. Why do we think this is a bug? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35368