]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
c-family/
authoremsr <emsr@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 20 Dec 2014 01:21:15 +0000 (01:21 +0000)
committeremsr <emsr@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 20 Dec 2014 01:21:15 +0000 (01:21 +0000)
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@218986 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/c-family/ChangeLog
gcc/c-family/c-cppbuiltin.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp1y/feat-cxx11-neg.C
gcc/testsuite/g++.dg/cpp1y/feat-cxx14.C
gcc/testsuite/g++.dg/cpp1y/feat-cxx98-neg.C
gcc/testsuite/g++.dg/cpp1y/feat-sized-dealloc-neg.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp1y/feat-sized-dealloc.C [new file with mode: 0644]

index 7c0538d5da4de5dc5118ce4343f6b08faaf393f6..47aa690dae7d94ca3b94044428508b5c6158cc76 100644 (file)
@@ -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.
index 057776ff5045970cddc8a91468d3e51542ba22db..6cdb32ceebec93690510dd75cd5f97083b32a1fa 100644 (file)
@@ -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.  */
index fd6c398ef8827eef44788578ddafa0e570b5193c..85d11d015071232654f255cee75effecd987eb39 100644 (file)
@@ -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.
index ec931891173ec47910d64e5699fd9b7e1c538bfc..81daa04b4de9a22c194062c9b3a5eb1c9377208e 100644 (file)
 #  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:
index 36e11354fb77a1c1aab145accdd6dbebd6ef7543..129296664c12cf26e19005f7926109773795f51d 100644 (file)
 #  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:
index 54f42e1841a4cd9771eba991068c27e6dd7bbc19..9c25fc3780ad390e696590ed59f37db0ac5f44ce 100644 (file)
 #  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 (file)
index 0000000..b1a3dc5
--- /dev/null
@@ -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 (file)
index 0000000..a91246f
--- /dev/null
@@ -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