]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[PR c++/84789] adjust testcase for -fconcepts
authoraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 28 Mar 2018 05:05:30 +0000 (05:05 +0000)
committeraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 28 Mar 2018 05:05:30 +0000 (05:05 +0000)
When compiling with -fconcepts,
cp_parser_template_declaration_after_export calls
cp_parser_template_introduction and that preparses qualified-ids not
preceded by typename in such a way that, when we get to
cp_parser_parse_and_diagnose_invalid_type_name and then
cp_parser_diagnose_invalid_type_name, the nested name specifier no
longer carries the previous template-dependent context, so we don't
stand a chance to suggest the use of 'typename' any more.  Thus,
tolerate in the testcase the poorer error messages we get.

for  gcc/testsuite/ChangeLog

PR c++/84789
* g++.dg/template/pr84789.C: Adjust for testing with
-fconcepts too.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@258915 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/template/pr84789.C

index 252854e34c805fd075c5c6e79b4b807c4ebc0be5..0fea41898605bde28a06b8cfb61903c0ffcf7123 100644 (file)
@@ -1,5 +1,9 @@
 2018-03-28  Alexandre Oliva <aoliva@redhat.com>
 
+       PR c++/84789
+       * g++.dg/template/pr84789.C: Adjust for testing with
+       -fconcepts too.
+
        PR c++/84973
        * g++.dg/template/pr84973.C: New.
        * g++.dg/template/pr84973-2.C: New.
index bc1567f3fe77a373565ea50d1d905187b17d2bf3..63b9832fecf885f233d4647b60f165e81bc240c1 100644 (file)
@@ -9,5 +9,5 @@ template<typename> struct B : A {};
 
 template<typename T> struct C : B<T>
 {
-  B<T>::A::I::I i; // { dg-error "typename" }
+  B<T>::A::I::I i; // { dg-error "not a class type|does not name a type|typename" }
 };