This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix P0634R3 - Down with typename! testsuite fallout


Hi!

I've noticed these two tests now FAIL with -std=c++2a, they don't print
any diagnostics.  As I believe that was the point of the P0634R3 changes,
this patch adjusts the testcases.  Tested on x86_64-linux, ok for trunk?

2018-12-04  Jakub Jelinek  <jakub@redhat.com>

	* g++.old-deja/g++.oliva/typename1.C: Don't expect any diagnostics
	for C++2a.
	* g++.old-deja/g++.oliva/typename2.C: Likewise.

--- gcc/testsuite/g++.old-deja/g++.oliva/typename1.C.jj	2008-09-05 12:54:51.000000000 +0200
+++ gcc/testsuite/g++.old-deja/g++.oliva/typename1.C	2018-12-04 09:36:46.137087008 +0100
@@ -12,5 +12,5 @@ template <class T> struct bar {
 };
 
 template <class T> struct baz {
-  typedef bar<T>::foo foo; // { dg-error "" } missing typename
+  typedef bar<T>::foo foo; // { dg-error "need 'typename' before" "" { target c++17_down } }
 };
--- gcc/testsuite/g++.old-deja/g++.oliva/typename2.C.jj	2008-09-05 12:54:51.000000000 +0200
+++ gcc/testsuite/g++.old-deja/g++.oliva/typename2.C	2018-12-04 09:37:27.069419970 +0100
@@ -23,6 +23,6 @@ template <class T> struct bar {
 };
 
 template <class T> struct baz {
-  typedef bar<T>::foo foo; // { dg-error "" } implicit typename
+  typedef bar<T>::foo foo; // { dg-error "need 'typename' before" "" { target c++17_down } }
   void m(foo); 
 };

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]