gcc-patches@gcc.gnu.org
[Top] [All Lists]

Re: PATCH: Add -fsystem-header-visibility=

Subject: Re: PATCH: Add -fsystem-header-visibility=
From: Geoffrey Keating
Date: 26 Aug 2005 13:34:04 -0700
"H. J. Lu" <hjl@xxxxxxxxx> 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.)

<Prev in Thread] Current Thread [Next in Thread>