===================================================================
@@ -866,8 +866,9 @@
cpp_define (pfile, "__cpp_aggregate_nsdmi=201304");
cpp_define (pfile, "__cpp_variable_templates=201304");
cpp_define (pfile, "__cpp_digit_separators=201309");
- //cpp_define (pfile, "__cpp_sized_deallocation=201309");
}
+ if (flag_sized_deallocation)
+ cpp_define (pfile, "__cpp_sized_deallocation=201309");
}
/* Note that we define this for C as well, so that we know if
__attribute__((cleanup)) will interface with EH. */
===================================================================
@@ -109,10 +109,9 @@
# error "__cpp_digit_separators" // { dg-error "error" }
#endif
-// Sized deallocation not in yet.
-//#ifdef __cpp_sized_deallocation
-//# error "__cpp_sized_deallocation"
-//#endif
+#ifndef __cpp_sized_deallocation
+# error "__cpp_sized_deallocation" // { dg-error "error" }
+#endif
// C++11 attributes:
===================================================================
@@ -175,9 +175,10 @@
# error "__cpp_digit_separators != 201309"
#endif
-// Sized deallocation not in yet.
-#ifdef __cpp_sized_deallocation
+#ifndef __cpp_sized_deallocation
# error "__cpp_sized_deallocation"
+#elif __cpp_sized_deallocation != 201309
+# error "__cpp_sized_deallocation != 201309"
#endif
// GNU VLA support:
===================================================================
@@ -22,6 +22,10 @@
# error "__cpp_return_type_deduction" // { dg-error "error" }
#endif
+#ifndef __cpp_aggregate_nsdmi
+# error "__cpp_aggregate_nsdmi" // { dg-error "error" }
+#endif
+
#ifndef __cpp_variable_templates
# error "__cpp_variable_templates" // { dg-error "error" }
#endif
@@ -30,8 +34,8 @@
# error "__cpp_digit_separators" // { dg-error "error" }
#endif
-#ifndef __cpp_aggregate_nsdmi
-# error "__cpp_aggregate_nsdmi" // { dg-error "error" }
+#ifndef __cpp_sized_deallocation
+# error "__cpp_sized_deallocation" // { dg-error "error" }
#endif
// Array TS features:
===================================================================
@@ -0,0 +1,6 @@
+// { dg-do compile { target c++14 } }
+// { dg-options "-fno-sized-deallocation" }
+
+#ifndef __cpp_sized_deallocation
+# error "__cpp_sized_deallocation" // { dg-error "error" }
+#endif
===================================================================
@@ -0,0 +1,10 @@
+// { dg-do compile { target c++11_only } }
+// { dg-options "-fsized-deallocation" }
+
+// C++14 features:
+
+#ifndef __cpp_sized_deallocation
+# error "__cpp_sized_deallocation"
+#elif __cpp_sized_deallocation != 201309
+# error "__cpp_sized_deallocation != 201309"
+#endif