diff mbox series

Fix P0634R3 - Down with typename! testsuite fallout

Message ID 20181204084251.GF12380@tucnak
State New
Headers show
Series Fix P0634R3 - Down with typename! testsuite fallout | expand

Commit Message

Jakub Jelinek Dec. 4, 2018, 8:42 a.m. UTC
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.


	Jakub

Comments

Marek Polacek Dec. 4, 2018, 1:19 p.m. UTC | #1
On Tue, Dec 04, 2018 at 09:42:51AM +0100, Jakub Jelinek wrote:
> 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.

The patch is fine, sorry for missing that.  Apparently I only ran c++2a
with dg.exp.

Marek
diff mbox series

Patch

--- 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); 
 };