summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2019-02-18 16:35:48 -0500
committerJason Merrill <jason@gcc.gnu.org>2019-02-18 16:35:48 -0500
commit802813eab9ab6f05a7a81161f372ac5be0b120a4 (patch)
tree4f00a5a579cba57de7870560d4c60a2bb6a99b84 /gcc/testsuite/g++.old-deja
parentab7b72e10002e96c0a092a6a2ef6ba2a9ec25f2b (diff)
Improve diagnostic for redundant template arguments in declaration.
* pt.c (check_explicit_specialization): If the declarator is a template-id, only check whether the arguments are dependent. From-SVN: r268997
Diffstat (limited to 'gcc/testsuite/g++.old-deja')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.robertl/eb82.C3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb82.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb82.C
index fc2bf7866fe..d4c5985cd8c 100644
--- a/gcc/testsuite/g++.old-deja/g++.robertl/eb82.C
+++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb82.C
@@ -2,7 +2,8 @@
#include <stdio.h>
template <int n1>
-double val <int> () // { dg-error "" } bogus code
+double val <int> () // { dg-error "expected" "" { target c++17_down } } bogus code
+// { dg-error "template-id .val<int>. in declaration of primary template" "" { target c++2a } .-1 }
{
return (double) n1;
}