http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51930

--- Comment #14 from Philipp <s...@s-e-f-i.de> 2012-02-27 11:06:20 UTC ---
The new behaviour makes it pretty much impossible for me to retain the
visibility gcc has been giving me with the old behaviour.

It is impossible to only give every type that is somehow involved in a template
instantiation (and a lot of them happen to be simple typedef helper structs)
default visibility. A lot of them come from external libraries I have no
control over. I have tried and gave up after some hours.

The push/pop visibility can be done, if one is very careful. Doing this on a
fine grained level is out of the question. You know how C++ includes and their
include guards work. You have to put the push/pop macros around the first
inclusion of such a header, which is almost never possible. If you decide to go
for a wider push/pop scope (for example all the headers in the TU that does the
explicit instantiation(s)) then you might end up giving a lot of stuff default
visibility that you don't want to.
Even if this method would succeed, it would still mean a lot of extra macro
invocations just for gcc-4.7.

Please, I don't know how to properly deal with this, and would like the old
behaviour to be restored.

Reply via email to