PATCH: Add -fsystem-header-visibility=

Geoffrey Keating geoffk@geoffk.org
Fri Aug 26 20:34:00 GMT 2005


"H. J. Lu" <hjl@lucon.org> writes:

> The current visibility scheme doesn't work too well with symbols from
> system headers. In most cases, symbols from system headers are defined
> in libraries which always have default visibility. But when
> -fvisibililty= or "#pragma GCC visibililty push" is used, symbols from
> system headers may have non-default visibility. This leads to link-time
> or run-time problems. This patch adds -fsystem-header-visibility=. It
> can be used to set the symbols from system headers with different
> visibility.

I think this would be better dealt with in another way, for instance
by changing the headers in question.  Otherwise I see that this is the
first in a long line of patches which end up with command-line options
to control visibility for everything individually.

(In particular, I don't see why 'system' headers should be treated
specially.)



More information about the Gcc-patches mailing list