diff options
author | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-04-24 15:12:50 +0000 |
---|---|---|
committer | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-04-24 15:12:50 +0000 |
commit | 05d0bce1eec69ee6910e8bca31dbdd2fc9259510 (patch) | |
tree | ad3bc7d8920f0e15f07d9b1c681e7409ab134707 /gcc | |
parent | 0b3f3aa4117b85502ef33bc680fffe6a741230ac (diff) | |
download | gcc-05d0bce1eec69ee6910e8bca31dbdd2fc9259510.tar.gz |
2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
* doc/cpp.texi: Document __GXX_EXPERIMENTAL_CXX1Y__.
/c-family
2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
* c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
/testsuite
2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
* g++.dg/cpp1y/cxx1y_macro.C: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@198249 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/c-family/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/c-family/c-cppbuiltin.c | 4 | ||||
-rw-r--r-- | gcc/doc/cpp.texi | 7 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/cpp1y/cxx1y_macro.C | 5 |
6 files changed, 27 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2a6d864b5f8..1a27d7cd01e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2013-04-24 Paolo Carlini <paolo.carlini@oracle.com> + + * doc/cpp.texi: Document __GXX_EXPERIMENTAL_CXX1Y__. + 2013-04-24 Marek Polacek <polacek@redhat.com> * tree-scalar-evolution.h (analyze_scalar_evolution): Remove. diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index 96cf7bd1de0..a768499591d 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,7 @@ +2013-04-24 Paolo Carlini <paolo.carlini@oracle.com> + + * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__. + 2013-04-12 Jakub Jelinek <jakub@redhat.com> * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table, diff --git a/gcc/c-family/c-cppbuiltin.c b/gcc/c-family/c-cppbuiltin.c index 3e210d90e0b..255a90ae134 100644 --- a/gcc/c-family/c-cppbuiltin.c +++ b/gcc/c-family/c-cppbuiltin.c @@ -713,8 +713,10 @@ c_cpp_builtins (cpp_reader *pfile) cpp_define (pfile, "__DEPRECATED"); if (flag_rtti) cpp_define (pfile, "__GXX_RTTI"); - if (cxx_dialect >= cxx0x) + if (cxx_dialect == cxx0x) cpp_define (pfile, "__GXX_EXPERIMENTAL_CXX0X__"); + if (cxx_dialect >= cxx1y) + cpp_define (pfile, "__GXX_EXPERIMENTAL_CXX1Y__"); } /* Note that we define this for C as well, so that we know if __attribute__((cleanup)) will interface with EH. */ diff --git a/gcc/doc/cpp.texi b/gcc/doc/cpp.texi index 4e7b05cd159..71979eefe5f 100644 --- a/gcc/doc/cpp.texi +++ b/gcc/doc/cpp.texi @@ -2319,6 +2319,13 @@ features likely to be included in C++0x are available. Note that these features are experimental, and may change or be removed in future versions of GCC. +@item __GXX_EXPERIMENTAL_CXX1Y__ +This macro is defined when compiling a C++ source file with the option +@option{-std=c++1y} or @option{-std=gnu++1y}. It indicates that some +features likely to be included in C++1y are available. Note that these +features are experimental, and may change or be removed in future +versions of GCC. + @item __GXX_WEAK__ This macro is defined when compiling a C++ source file. It has the value 1 if the compiler will use weak symbols, COMDAT sections, or diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 7be7560d133..59f5b1af9b6 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,9 @@ 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com> + * g++.dg/cpp1y/cxx1y_macro.C: New. + +2013-04-24 Paolo Carlini <paolo.carlini@oracle.com> + PR c++/56970 * g++.dg/cpp0x/sfinae45.C: New. diff --git a/gcc/testsuite/g++.dg/cpp1y/cxx1y_macro.C b/gcc/testsuite/g++.dg/cpp1y/cxx1y_macro.C new file mode 100644 index 00000000000..35783b24e47 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp1y/cxx1y_macro.C @@ -0,0 +1,5 @@ +// { dg-options "-std=c++1y" } + +#ifndef __GXX_EXPERIMENTAL_CXX1Y__ +#error +#endif |