aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorEdward Smith-Rowland <3dw4rd@verizon.net>2014-12-20 01:21:15 +0000
committerEdward Smith-Rowland <emsr@gcc.gnu.org>2014-12-20 01:21:15 +0000
commita7fa8d1819c55bfb78993eac3aabc38bbc225f69 (patch)
tree91dae2664c4bf4da7b40f355d728accd028ab2b7 /gcc
parent768952be25c2fc50bce51a5658377934d49f473f (diff)
downloadgcc-a7fa8d1819c55bfb78993eac3aabc38bbc225f69.zip
gcc-a7fa8d1819c55bfb78993eac3aabc38bbc225f69.tar.gz
gcc-a7fa8d1819c55bfb78993eac3aabc38bbc225f69.tar.bz2
c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
c-family/ 2014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net> * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro. Control macro with flag_sized_deallocation. testsuite/ 2014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net> * g++.dg/cpp1y/feat-cxx98-neg.C: Enable __cpp_sized_deallocation test. * g++.dg/cpp1y/feat-cxx14.C: Ditto. * g++.dg/cpp1y/feat-cxx11-neg.C: Ditto and move tests for consistent order. * g++.dg/cpp1y/feat-sized-dealloc-neg.C: New. * g++.dg/cpp1y/feat-sized-dealloc.C: New. From-SVN: r218986
Diffstat (limited to 'gcc')
-rw-r--r--gcc/c-family/ChangeLog5
-rw-r--r--gcc/c-family/c-cppbuiltin.c3
-rw-r--r--gcc/testsuite/ChangeLog9
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/feat-cxx11-neg.C8
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/feat-cxx14.C5
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/feat-cxx98-neg.C7
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/feat-sized-dealloc-neg.C6
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/feat-sized-dealloc.C10
8 files changed, 44 insertions, 9 deletions
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog
index 7c0538d..47aa690 100644
--- a/gcc/c-family/ChangeLog
+++ b/gcc/c-family/ChangeLog
@@ -1,3 +1,8 @@
+2014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
+
+ * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
+ Control macro with flag_sized_deallocation.
+
2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
* c.opt (Wdiscarded-array-qualifiers): New option.
diff --git a/gcc/c-family/c-cppbuiltin.c b/gcc/c-family/c-cppbuiltin.c
index 057776f..6cdb32c 100644
--- a/gcc/c-family/c-cppbuiltin.c
+++ b/gcc/c-family/c-cppbuiltin.c
@@ -866,8 +866,9 @@ c_cpp_builtins (cpp_reader *pfile)
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. */
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index fd6c398..85d11d0 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,12 @@
+2014-12-19 Edward Smith-Rowland <3dw4rd@verizon.net>
+
+ * g++.dg/cpp1y/feat-cxx98-neg.C: Enable __cpp_sized_deallocation test.
+ * g++.dg/cpp1y/feat-cxx14.C: Ditto.
+ * g++.dg/cpp1y/feat-cxx11-neg.C: Ditto and move tests for consistent
+ order.
+ * g++.dg/cpp1y/feat-sized-dealloc-neg.C: New.
+ * g++.dg/cpp1y/feat-sized-dealloc.C: New.
+
2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
* gcc.dg/Wwrite-strings-1.c: Change dg-warning.
diff --git a/gcc/testsuite/g++.dg/cpp1y/feat-cxx11-neg.C b/gcc/testsuite/g++.dg/cpp1y/feat-cxx11-neg.C
index ec93189..81daa04 100644
--- a/gcc/testsuite/g++.dg/cpp1y/feat-cxx11-neg.C
+++ b/gcc/testsuite/g++.dg/cpp1y/feat-cxx11-neg.C
@@ -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:
diff --git a/gcc/testsuite/g++.dg/cpp1y/feat-cxx14.C b/gcc/testsuite/g++.dg/cpp1y/feat-cxx14.C
index 36e1135..1292966 100644
--- a/gcc/testsuite/g++.dg/cpp1y/feat-cxx14.C
+++ b/gcc/testsuite/g++.dg/cpp1y/feat-cxx14.C
@@ -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:
diff --git a/gcc/testsuite/g++.dg/cpp1y/feat-cxx98-neg.C b/gcc/testsuite/g++.dg/cpp1y/feat-cxx98-neg.C
index 54f42e1..9c25fc3 100644
--- a/gcc/testsuite/g++.dg/cpp1y/feat-cxx98-neg.C
+++ b/gcc/testsuite/g++.dg/cpp1y/feat-cxx98-neg.C
@@ -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:
diff --git a/gcc/testsuite/g++.dg/cpp1y/feat-sized-dealloc-neg.C b/gcc/testsuite/g++.dg/cpp1y/feat-sized-dealloc-neg.C
new file mode 100644
index 0000000..b1a3dc5
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/feat-sized-dealloc-neg.C
@@ -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
diff --git a/gcc/testsuite/g++.dg/cpp1y/feat-sized-dealloc.C b/gcc/testsuite/g++.dg/cpp1y/feat-sized-dealloc.C
new file mode 100644
index 0000000..a91246f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/feat-sized-dealloc.C
@@ -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