Commit 1d555e26 by Jason Merrill Committed by Jason Merrill

decl2.c (is_late_template_attribute): Don't defer attribute visibility just…

decl2.c (is_late_template_attribute): Don't defer attribute visibility just because the type is dependent.

        * decl2.c (is_late_template_attribute): Don't defer attribute
        visibility just because the type is dependent.

From-SVN: r131833
parent b6219f42
2008-01-25 Jason Merrill <jason@redhat.com> 2008-01-25 Jason Merrill <jason@redhat.com>
* decl2.c (is_late_template_attribute): Don't defer attribute
visibility just because the type is dependent.
2008-01-25 Jason Merrill <jason@redhat.com>
Mark Mitchell <mark@codesourcery.com> Mark Mitchell <mark@codesourcery.com>
PR c++/31780 PR c++/31780
......
...@@ -1014,9 +1014,12 @@ is_late_template_attribute (tree attr, tree decl) ...@@ -1014,9 +1014,12 @@ is_late_template_attribute (tree attr, tree decl)
|| code == BOUND_TEMPLATE_TEMPLATE_PARM || code == BOUND_TEMPLATE_TEMPLATE_PARM
|| code == TYPENAME_TYPE) || code == TYPENAME_TYPE)
return true; return true;
/* Also defer attributes on dependent types. This is not necessary /* Also defer most attributes on dependent types. This is not
in all cases, but is the better default. */ necessary in all cases, but is the better default. */
else if (dependent_type_p (type)) else if (dependent_type_p (type)
/* But attribute visibility specifically works on
templates. */
&& !is_attribute_p ("visibility", name))
return true; return true;
else else
return false; return false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment