aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2008-01-25 14:47:28 -0500
committerJason Merrill <jason@gcc.gnu.org>2008-01-25 14:47:28 -0500
commit1d555e263297673f544484d6f9dd82ee50958bd7 (patch)
treef70cbf1b0c3ced8128573b39c7db89231bb79dff /gcc
parentb6219f420890d1f8e4eb4bc586499c75f4612f38 (diff)
downloadgcc-1d555e263297673f544484d6f9dd82ee50958bd7.zip
gcc-1d555e263297673f544484d6f9dd82ee50958bd7.tar.gz
gcc-1d555e263297673f544484d6f9dd82ee50958bd7.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/decl2.c9
2 files changed, 11 insertions, 3 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 9383ccd..22afe19 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,4 +1,9 @@
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>
PR c++/31780
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index 550d0bc..fa8d28a 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;