This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Fix mismatched #pragma GCC visibility
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Paolo Carlini <paolo dot carlini at oracle dot com>
- Cc: Rafael Ávila de Espíndola <rafael dot espindola at gmail dot com>, gcc-patches at gcc dot gnu dot org, Jason Merrill <jason at redhat dot com>
- Date: Tue, 24 Jan 2012 11:52:02 +0100
- Subject: Re: [patch] Fix mismatched #pragma GCC visibility
- References: <4F1E3810.30700@gmail.com> <4F1E8BE3.5070705@oracle.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Tue, Jan 24, 2012 at 11:45:55AM +0100, Paolo Carlini wrote:
> Hi,
> >While trying to improve clang's handling of "#pragma GCC visibility" I
> >found out that libstdc++-v3/libsupc++/typeinfo looks like
> >
> >#pragma GCC visibility push(default)
> >extern "C++" {
> >#pragma GCC visibility pop
> >}
> >
> >Is that supposed to work or just happens to? If desired, the attached
> >patch moves the pop after the closing }.
> Thanks for raising the issue. To me the above looks like a
> straightforward typo, which we should fix as soon as possible (not
> sure whether we could also diagnose it).
>
> Jason, Jakub, can you confirm?
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.
Jakub