> While we can change it, it is certainly valid as is, #pragma GCC visibility
> can happen in lots of places and just marks where the default visibility
> is adjusted.  If clang errors on this, it is broken.

Sorry, one more case that gcc accepts where it is not clear what the
result should be:

-----------------------------
#pragma GCC visibility push(protected)

int x;
class  __attribute__((visibility("hidden"))) foo {
  static int a;
#pragma GCC visibility pop
  static int b;
};
int y;

int foo::a;
int foo::b;
-----------------------------

Should this be reject (as happens with namespaces)? If not what is the
expected result? Currently we get

x -> protected
y -> default
a -> hidden
b -> hidden

>       Jakub

Cheers,
Rafael

Reply via email to