diff options
| author | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-05-13 19:32:22 +0000 |
|---|---|---|
| committer | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-05-13 19:32:22 +0000 |
| commit | 34cd73ce1055f23c70ed57a80fabbe3fe5a770fc (patch) | |
| tree | 282fdf17032ad973af388a3c82d84ed112fd72aa | |
| parent | f74907e3e35cb7d188d1d9a3ef52a2a06477cf39 (diff) | |
| download | ppe42-gcc-34cd73ce1055f23c70ed57a80fabbe3fe5a770fc.tar.gz ppe42-gcc-34cd73ce1055f23c70ed57a80fabbe3fe5a770fc.zip | |
PR c++/57253
* decl.c (grokdeclarator): Apply ref-qualifier
in the TYPENAME case.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@198842 138bc75d-0d04-0410-961f-82ee72b054a4
| -rw-r--r-- | gcc/cp/ChangeLog | 4 | ||||
| -rw-r--r-- | gcc/cp/decl.c | 2 | ||||
| -rw-r--r-- | gcc/testsuite/g++.dg/cpp0x/ref-qual11.C | 10 |
3 files changed, 15 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index eab529a1831..e1eda6a0fad 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 0df3ae86a29..67e67e6079f 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 00000000000..15dd049f22a --- /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() +{} |

