Commit 26f0e1d6 by Edward Smith-Rowland Committed by Edward Smith-Rowland

feat-cxx11.C: Commentary and rearrangement of tests.

testsuite/

2014-11-01  Edward Smith-Rowland  <3dw4rd@verizon.net>

	* g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
	* g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
	Commentary and rearrangement of tests.
	* g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
	Commentary and rearrangement of tests.
	* g++.dg/cpp1y/feat-cxx98-neg.C: Ditto
	* g++.dg/cpp1y/feat-cxx98.C: Commentary.

c-family/

2014-11-01  Edward Smith-Rowland  <3dw4rd@verizon.net>

	* c-cppbuiltin.c: Define __cpp_aggregate_nsdmi.

From-SVN: r217012
parent 38083ac2
2014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
* g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
* g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
Commentary and rearrangement of tests.
* g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
Commentary and rearrangement of tests.
* g++.dg/cpp1y/feat-cxx98-neg.C: Ditto
* g++.dg/cpp1y/feat-cxx98.C: Commentary.
2014-10-29 Richard Sandiford <richard.sandiford@arm.com> 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
* c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
......
...@@ -841,7 +841,7 @@ c_cpp_builtins (cpp_reader *pfile) ...@@ -841,7 +841,7 @@ c_cpp_builtins (cpp_reader *pfile)
//cpp_undef (pfile, "__cpp_constexpr"); //cpp_undef (pfile, "__cpp_constexpr");
//cpp_define (pfile, "__cpp_constexpr=201304"); //cpp_define (pfile, "__cpp_constexpr=201304");
cpp_define (pfile, "__cpp_decltype_auto=201304"); cpp_define (pfile, "__cpp_decltype_auto=201304");
//cpp_define (pfile, "__cpp_aggregate_nsdmi=201304"); cpp_define (pfile, "__cpp_aggregate_nsdmi=201304");
cpp_define (pfile, "__cpp_variable_templates=201304"); cpp_define (pfile, "__cpp_variable_templates=201304");
cpp_define (pfile, "__cpp_digit_separators=201309"); cpp_define (pfile, "__cpp_digit_separators=201309");
//cpp_define (pfile, "__cpp_sized_deallocation=201309"); //cpp_define (pfile, "__cpp_sized_deallocation=201309");
......
2014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
* g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
* g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
Commentary and rearrangement of tests.
* g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
Commentary and rearrangement of tests.
* g++.dg/cpp1y/feat-cxx98-neg.C: Ditto
* g++.dg/cpp1y/feat-cxx98.C: Commentary.
2014-10-31 Jakub Jelinek <jakub@redhat.com> 2014-10-31 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/63659 PR rtl-optimization/63659
......
// { dg-do compile { target c++11_only } } // { dg-do compile { target c++11_only } }
// { dg-options "-pedantic-errors" } // { dg-options "-pedantic-errors" }
// These *are* defined in C++14 onwards. // C++14 features:
#ifndef __cpp_binary_literals #ifndef __cpp_binary_literals
# error "__cpp_binary_literals" // { dg-error "error" } # error "__cpp_binary_literals" // { dg-error "error" }
...@@ -31,11 +31,19 @@ ...@@ -31,11 +31,19 @@
# error "__cpp_digit_separators" // { dg-error "error" } # error "__cpp_digit_separators" // { dg-error "error" }
#endif #endif
// Attribute [[deprecated]] is allowed in C++11 as an extension (with pedwarn). #ifndef __cpp_aggregate_nsdmi
//#ifndef __cpp_attribute_deprecated # error "__cpp_aggregate_nsdmi" // { dg-error "error" }
//# error "__cpp_attribute_deprecated" #endif
//#endif
// Array TS features:
#ifndef __cpp_runtime_arrays #ifndef __cpp_runtime_arrays
# error "__cpp_runtime_arrays" // { dg-error "error" } # error "__cpp_runtime_arrays" // { dg-error "error" }
#endif #endif
// Attribute checks:
// Attribute [[deprecated]] is allowed in C++11 as an extension (with pedwarn).
//#ifndef __cpp_attribute_deprecated
//# error "__cpp_attribute_deprecated"
//#endif
// { dg-do compile } // { dg-do compile }
// { dg-options "-std=gnu++11" } // { dg-options "-std=gnu++11" }
// C++11 features:
#ifndef __cpp_unicode_characters #ifndef __cpp_unicode_characters
# error "__cpp_unicode_characters" # error "__cpp_unicode_characters"
#elif __cpp_unicode_characters != 200704 #elif __cpp_unicode_characters != 200704
...@@ -73,13 +75,17 @@ ...@@ -73,13 +75,17 @@
# error "__cpp_alias_templates != 200704" # error "__cpp_alias_templates != 200704"
#endif #endif
// These C++14 features are allowed in C++11 in non-ANSI modes. // C++14 features allowed in C++11 in non-ANSI modes:
#ifndef __cpp_binary_literals #ifndef __cpp_binary_literals
# error "__cpp_binary_literals" # error "__cpp_binary_literals"
#elif __cpp_binary_literals != 201304 #elif __cpp_binary_literals != 201304
# error "__cpp_binary_literals != 201304" # error "__cpp_binary_literals != 201304"
#endif #endif
// Attribute checks:
// Attribute [[deprecated]] is allowed in C++11 as an extension (with pedwarn).
#ifndef __cpp_attribute_deprecated #ifndef __cpp_attribute_deprecated
# error "__cpp_attribute_deprecated" # error "__cpp_attribute_deprecated"
#elif __cpp_attribute_deprecated != 201309 #elif __cpp_attribute_deprecated != 201309
......
// { dg-do compile { target c++14 } } // { dg-do compile { target c++14 } }
// { dg-options "-I${srcdir}/g++.dg/cpp1y -I${srcdir}/g++.dg/cpp1y/testinc" } // { dg-options "-I${srcdir}/g++.dg/cpp1y -I${srcdir}/g++.dg/cpp1y/testinc" }
// Begin C++11 tests. // C++11 features:
#ifndef __cpp_unicode_characters #ifndef __cpp_unicode_characters
# error "__cpp_unicode_characters" # error "__cpp_unicode_characters"
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
# error "__cpp_alias_templates != 200704" # error "__cpp_alias_templates != 200704"
#endif #endif
// Begin C++14 tests. // C++14 features:
#ifndef __cpp_binary_literals #ifndef __cpp_binary_literals
# error "__cpp_binary_literals" # error "__cpp_binary_literals"
...@@ -114,15 +114,10 @@ ...@@ -114,15 +114,10 @@
# error "__cpp_return_type_deduction != 201304" # error "__cpp_return_type_deduction != 201304"
#endif #endif
#ifndef __cpp_runtime_arrays #ifndef __cpp_aggregate_nsdmi
# error "__cpp_runtime_arrays"
#elif __cpp_runtime_arrays != 201304
# error "__cpp_runtime_arrays != 201304"
#endif
// Aggregate initializers not in yet.
#ifdef __cpp_aggregate_nsdmi
# error "__cpp_aggregate_nsdmi" # error "__cpp_aggregate_nsdmi"
#elif __cpp_aggregate_nsdmi != 201304
# error "__cpp_aggregate_nsdmi != 201304"
#endif #endif
#ifndef __cpp_variable_templates #ifndef __cpp_variable_templates
...@@ -137,18 +132,28 @@ ...@@ -137,18 +132,28 @@
# error "__cpp_digit_separators != 201309" # error "__cpp_digit_separators != 201309"
#endif #endif
// Sized deallocation not in yet.
#ifdef __cpp_sized_deallocation
# error "__cpp_sized_deallocation"
#endif
// Array TS features:
#ifndef __cpp_runtime_arrays
# error "__cpp_runtime_arrays"
#elif __cpp_runtime_arrays != 201304
# error "__cpp_runtime_arrays != 201304"
#endif
// Attribute checks:
#ifndef __cpp_attribute_deprecated #ifndef __cpp_attribute_deprecated
# error "__cpp_attribute_deprecated" # error "__cpp_attribute_deprecated"
#elif __cpp_attribute_deprecated != 201309 #elif __cpp_attribute_deprecated != 201309
# error "__cpp_attribute_deprecated != 201309" # error "__cpp_attribute_deprecated != 201309"
#endif #endif
// Sized deallocation not in yet. // Include checks:
#ifdef __cpp_sized_deallocation
# error "__cpp_sized_deallocation"
#endif
// Begin include checks.
// Check for __has_include macro. // Check for __has_include macro.
#ifndef __has_include #ifndef __has_include
......
// { dg-do compile { target c++98_only } } // { dg-do compile { target c++98_only } }
// { dg-options "-ansi" } // { dg-options "-ansi" }
// C++11 features:
#ifndef __cpp_runtime_arrays #ifndef __cpp_runtime_arrays
# error "__cpp_runtime_arrays" // { dg-error "error" } # error "__cpp_runtime_arrays" // { dg-error "error" }
#endif #endif
...@@ -53,9 +55,9 @@ ...@@ -53,9 +55,9 @@
# error "__cpp_alias_templates" // { dg-error "error" } # error "__cpp_alias_templates" // { dg-error "error" }
#endif #endif
// C++14 // C++14 features:
// C++98 gets binary literals. // C++98 gets binary literals in non-ANSI modes.
//#ifndef __cpp_binary_literals //#ifndef __cpp_binary_literals
//# error "__cpp_binary_literals" //# error "__cpp_binary_literals"
//#endif //#endif
...@@ -76,10 +78,9 @@ ...@@ -76,10 +78,9 @@
# error "__cpp_return_type_deduction" // { dg-error "error" } # error "__cpp_return_type_deduction" // { dg-error "error" }
#endif #endif
// Aggregate initializers not in yet. #ifndef __cpp_aggregate_nsdmi
//#ifdef __cpp_aggregate_nsdmi # error "__cpp_aggregate_nsdmi" // { dg-error "error" }
//# error "__cpp_aggregate_nsdmi" #endif
//#endif
#ifndef __cpp_variable_templates #ifndef __cpp_variable_templates
# error "__cpp_variable_templates" // { dg-error "error" } # error "__cpp_variable_templates" // { dg-error "error" }
...@@ -89,11 +90,13 @@ ...@@ -89,11 +90,13 @@
# error "__cpp_digit_separators" // { dg-error "error" } # error "__cpp_digit_separators" // { dg-error "error" }
#endif #endif
#ifndef __cpp_attribute_deprecated
# error "__cpp_attribute_deprecated" // { dg-error "error" }
#endif
// Sized deallocation not in yet. // Sized deallocation not in yet.
//#ifdef __cpp_sized_deallocation //#ifdef __cpp_sized_deallocation
//# error "__cpp_sized_deallocation" //# error "__cpp_sized_deallocation"
//#endif //#endif
// Attribute checks:
#ifndef __cpp_attribute_deprecated
# error "__cpp_attribute_deprecated" // { dg-error "error" }
#endif
// { dg-do compile { target c++98_only } } // { dg-do compile { target c++98_only } }
// { dg-options "" } // { dg-options "" }
// These C++14 features are allowed in C++98 in non-ANSI modes. // C++14 features allowed in C++98 in non-ANSI modes:
#ifndef __cpp_binary_literals #ifndef __cpp_binary_literals
# error "__cpp_binary_literals" # error "__cpp_binary_literals"
#elif __cpp_binary_literals != 201304 #elif __cpp_binary_literals != 201304
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment