c-cppbuiltin.c (c_cpp_builtins): Define __cpp_enumerator_attributes...
* c-cppbuiltin.c (c_cpp_builtins): Define __cpp_enumerator_attributes, __cpp_fold_expressions, __cpp_unicode_characters. From-SVN: r229017
This commit is contained in:
parent
a36b732a76
commit
13b380a325
|
@ -1,3 +1,9 @@
|
|||
2015-10-19 Jason Merrill <jason@redhat.com>
|
||||
|
||||
* c-cppbuiltin.c (c_cpp_builtins): Define
|
||||
__cpp_enumerator_attributes, __cpp_fold_expressions,
|
||||
__cpp_unicode_characters.
|
||||
|
||||
2015-10-13 Jakub Jelinek <jakub@redhat.com>
|
||||
Aldy Hernandez <aldyh@redhat.com>
|
||||
|
||||
|
|
|
@ -833,7 +833,8 @@ c_cpp_builtins (cpp_reader *pfile)
|
|||
if (cxx_dialect >= cxx11)
|
||||
{
|
||||
/* Set feature test macros for C++11. */
|
||||
cpp_define (pfile, "__cpp_unicode_characters=200704");
|
||||
if (cxx_dialect <= cxx14)
|
||||
cpp_define (pfile, "__cpp_unicode_characters=200704");
|
||||
cpp_define (pfile, "__cpp_raw_strings=200710");
|
||||
cpp_define (pfile, "__cpp_unicode_literals=200710");
|
||||
cpp_define (pfile, "__cpp_user_defined_literals=200809");
|
||||
|
@ -869,9 +870,12 @@ c_cpp_builtins (cpp_reader *pfile)
|
|||
if (cxx_dialect > cxx14)
|
||||
{
|
||||
/* Set feature test macros for C++1z. */
|
||||
cpp_define (pfile, "__cpp_unicode_characters=201411");
|
||||
cpp_define (pfile, "__cpp_static_assert=201411");
|
||||
cpp_define (pfile, "__cpp_namespace_attributes=201411");
|
||||
cpp_define (pfile, "__cpp_enumerator_attributes=201411");
|
||||
cpp_define (pfile, "__cpp_nested_namespace_definitions=201411");
|
||||
cpp_define (pfile, "__cpp_fold_expressions=201411");
|
||||
}
|
||||
if (flag_concepts)
|
||||
/* Use a value smaller than the 201507 specified in
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
// { dg-options "-std=c++1z" }
|
||||
|
||||
#ifndef __cpp_enumerator_attributes
|
||||
#error __cpp_enumerator_attributes not defined
|
||||
#endif
|
||||
|
||||
#if __cpp_enumerator_attributes != 201411
|
||||
#error Wrong value for __cpp_enumerator_attributes
|
||||
#endif
|
|
@ -0,0 +1,5 @@
|
|||
// This macro should not be defined without -std=c++1z.
|
||||
|
||||
#ifdef __cpp_enumerator_attributes
|
||||
#error __cpp_enumerator_attributes defined
|
||||
#endif
|
|
@ -0,0 +1,9 @@
|
|||
// { dg-options "-std=c++1z" }
|
||||
|
||||
#ifndef __cpp_fold_expressions
|
||||
#error __cpp_fold_expressions not defined
|
||||
#endif
|
||||
|
||||
#if __cpp_fold_expressions != 201411
|
||||
#error Wrong value for __cpp_fold_expressions
|
||||
#endif
|
|
@ -0,0 +1,5 @@
|
|||
// This macro should not be defined without -std=c++1z.
|
||||
|
||||
#ifdef __cpp_fold_expressions
|
||||
#error __cpp_fold_expressions defined
|
||||
#endif
|
|
@ -0,0 +1,9 @@
|
|||
// { dg-options "-std=c++1z" }
|
||||
|
||||
#ifndef __cpp_unicode_characters
|
||||
#error __cpp_unicode_characters not defined
|
||||
#endif
|
||||
|
||||
#if __cpp_unicode_characters != 201411
|
||||
#error Wrong value for __cpp_unicode_characters
|
||||
#endif
|
|
@ -0,0 +1,5 @@
|
|||
// This macro should not be 201411 without -std=c++1z.
|
||||
|
||||
#if __cpp_unicode_characters == 201411
|
||||
#error Wrong value for __cpp_unicode_characters
|
||||
#endif
|
Loading…
Reference in New Issue