diff gcc/testsuite/g++.dg/cpp0x/desig1.C @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children 1830386684a0
line wrap: on
line diff
--- a/gcc/testsuite/g++.dg/cpp0x/desig1.C	Fri Oct 27 22:46:09 2017 +0900
+++ b/gcc/testsuite/g++.dg/cpp0x/desig1.C	Thu Oct 25 07:37:49 2018 +0900
@@ -1,12 +1,13 @@
 // PR c++/58882
 // { dg-do compile { target c++11 } }
+// { dg-options "-pedantic" }
 
 struct A
 {
   constexpr operator int() const { return 0; }
 };
 
-int a[] = { [A()] = 0 };
+int a[] = { [A()] = 0 };	// { dg-warning "does not allow C99 designated initializers" }
 
 enum E { e0 };
 
@@ -15,7 +16,7 @@
   constexpr operator E() const { return E::e0; }
 };
 
-int b[] = { [B()] = 0 };
+int b[] = { [B()] = 0 };	// { dg-warning "does not allow C99 designated initializers" }
 
 enum class SE { se0 };
 
@@ -25,3 +26,4 @@
 };
 
 int c[] = { [C()] = 0 }; // { dg-error "integral constant-expression" }
+			 // { dg-warning "does not allow C99 designated initializers" "" { target *-*-* } .-1 }