This is the mail archive of the gcc-patches@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]

Re: [patch] Fix mismatched #pragma GCC visibility


> 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.

It doesn't. As far as I can tell, in the absence of templates clang
produces the same results as gcc on any valid case. I was trying to
improve the error messages and found this.

Just to make sure I get the more fun corner cases right. This is invalid:

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

namespace foo __attribute__((visibility("hidden"))) {
  int a;
#pragma GCC visibility pop
  int b;
}
--------------------------------------

But removing the attribute makes it valid. Correct?

> 	Jakub

Cheers,
Rafael


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