From: Jason Merrill Date: Fri, 25 Jan 2008 19:47:28 +0000 (-0500) Subject: decl2.c (is_late_template_attribute): Don't defer attribute visibility just because... X-Git-Tag: releases/gcc-4.3.0~402 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1d555e263297673f544484d6f9dd82ee50958bd7;p=thirdparty%2Fgcc.git 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 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 9383ccd95e66..22afe1941f40 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2008-01-25 Jason Merrill + + * decl2.c (is_late_template_attribute): Don't defer attribute + visibility just because the type is dependent. + 2008-01-25 Jason Merrill Mark Mitchell diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index 550d0bcebab7..fa8d28a25426 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -1014,9 +1014,12 @@ is_late_template_attribute (tree attr, tree decl) || code == BOUND_TEMPLATE_TEMPLATE_PARM || code == TYPENAME_TYPE) return true; - /* Also defer attributes on dependent types. This is not necessary - in all cases, but is the better default. */ - else if (dependent_type_p (type)) + /* Also defer most attributes on dependent types. This is not + necessary in all cases, but is the better default. */ + else if (dependent_type_p (type) + /* But attribute visibility specifically works on + templates. */ + && !is_attribute_p ("visibility", name)) return true; else return false;