aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2013-05-13 15:32:22 -0400
committerJason Merrill <jason@gcc.gnu.org>2013-05-13 15:32:22 -0400
commit18dc5657de4d850295c3c8662520b256b00ce1af (patch)
tree282fdf17032ad973af388a3c82d84ed112fd72aa /gcc
parentfab8f0b6c32ccb9784a95c5996c5be1ace128fec (diff)
downloadgcc-18dc5657de4d850295c3c8662520b256b00ce1af.zip
gcc-18dc5657de4d850295c3c8662520b256b00ce1af.tar.gz
gcc-18dc5657de4d850295c3c8662520b256b00ce1af.tar.bz2
re PR c++/57253 (GCC ignores ref-qualifiers of pseudo-function types in explicit specializations)
PR c++/57253 * decl.c (grokdeclarator): Apply ref-qualifier in the TYPENAME case. From-SVN: r198842
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog4
-rw-r--r--gcc/cp/decl.c2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/ref-qual11.C10
3 files changed, 15 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index eab529a..e1eda6a 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,5 +1,9 @@
2013-05-13 Jason Merrill <jason@redhat.com>
+ PR c++/57253
+ * decl.c (grokdeclarator): Apply ref-qualifier
+ in the TYPENAME case.
+
PR c++/57252
* decl.c (decls_match): Compare ref-qualifiers.
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 0df3ae8..67e67e6 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -10284,7 +10284,7 @@ grokdeclarator (const cp_declarator *declarator,
type = void_type_node;
}
}
- else if (memfn_quals)
+ else if (memfn_quals || rqual)
{
if (ctype == NULL_TREE
&& TREE_CODE (type) == METHOD_TYPE)
diff --git a/gcc/testsuite/g++.dg/cpp0x/ref-qual11.C b/gcc/testsuite/g++.dg/cpp0x/ref-qual11.C
new file mode 100644
index 0000000..15dd049
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/ref-qual11.C
@@ -0,0 +1,10 @@
+// PR c++/57253
+// { dg-require-effective-target c++11 }
+
+template<typename T> struct foo;
+
+template<> struct foo<void()&> {};
+template<> struct foo<void()> {};
+
+int main()
+{}