This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: C++/c-common PATCH for c++/35688 (wrong visibility of template instantiation)
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Jason Merrill <jason at redhat dot com>
- Cc: gcc-patches List <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 7 Nov 2011 15:56:28 +0000 (UTC)
- Subject: Re: C++/c-common PATCH for c++/35688 (wrong visibility of template instantiation)
- References: <4EB75F14.3060400@redhat.com>
On Sun, 6 Nov 2011, Jason Merrill wrote:
> The function constrain_visibility_for_template tries to set the visibility of
> a template instantiation properly by giving it the minimum visibility of the
> template itself and the template arguments. But this PR points out that we
> were failing to do that in the case that the template is within a namespace
> with a visibility attribute, because then it gets DECL_VISIBILITY_SPECIFIED.
> This patch fixes that by re-using some of the C front end's visibility code,
> so that we can further constrain visibility on a decl with
> DECL_VISIBILITY_SPECIFIED so long as it doesn't actually have a visibility
> attribute.
>
> Joseph, I assume you have no objection to the c-common refactoring?
It's fine with me.
--
Joseph S. Myers
joseph@codesourcery.com