Implement SD-6: SG10 Feature Test Recommendations
authorEdward Smith-Rowland <3dw4rd@verizon.net>
Wed, 1 Oct 2014 11:49:23 +0000 (11:49 +0000)
committerEdward Smith-Rowland <emsr@gcc.gnu.org>
Wed, 1 Oct 2014 11:49:23 +0000 (11:49 +0000)
commita15f7cb8b8c124bb7c49ab9b8d29dfd62ea58d10
tree0305f88949de10054e322e52911e9a53306c454d
parent5fbb36f4a4e85956c241dafe603f1fc1be10472e
Implement SD-6: SG10 Feature Test Recommendations

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

Implement SD-6: SG10 Feature Test Recommendations
* internal.h (lexer_state, spec_nodes): Add in__has_include__.
* directives.c: Support __has_include__ builtin.
* expr.c (parse_has_include): New function to parse __has_include__
builtin; (eval_token()): Use it.
* files.c (_cpp_has_header()): New funtion to look for header;
(open_file_failed()): Not an error to not find a header file for
__has_include__.
* identifiers.c (_cpp_init_hashtable()): Add entry for __has_include__.
* pch.c (cpp_read_state): Lookup __has_include__.
* traditional.c (enum ls, _cpp_scan_out_logical_line()): Walk through
__has_include__ statements.

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

Implement SD-6: SG10 Feature Test Recommendations
* c-cppbuiltin.c (c_cpp_builtins()): Define language feature
macros and the __has_header macro.

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

Implement SD-6: SG10 Feature Test Recommendations
* include/bits/basic_string.h: Add __cpp_lib feature test macro.
* include/bits/stl_algobase.h: Ditto.
* include/bits/stl_function.h: Ditto.
* include/bits/unique_ptr.h: Ditto.
* include/std/chrono: Ditto.
* include/std/complex: Ditto.
* include/std/iomanip: Ditto.
* include/std/shared_mutex: Ditto.
* include/std/tuple: Ditto.
* include/std/type_traits: Ditto.
* include/std/utility: Ditto.
* testsuite/experimental/feat-cxx14.cc: New.
* testsuite/experimental/feat-lib-fund.cc: New.
* testsuite/20_util/declval/requirements/1_neg.cc: Adjust.
* testsuite/20_util/duration/literals/range.cc: Adjust.
* testsuite/20_util/duration/requirements/typedefs_neg1.cc: Adjust.
* testsuite/20_util/duration/requirements/typedefs_neg2.cc: Adjust.
* testsuite/20_util/duration/requirements/typedefs_neg3.cc: Adjust.
* testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust.
* testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Adjust.
* testsuite/23_containers/array/tuple_interface/get_neg.cc: Adjust.
* testsuite/23_containers/array/tuple_interface/tuple_element_neg.cc:
Adjust.

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

Implement SD-6: SG10 Feature Test Recommendations
* g++.dg/cpp1y/feat-cxx11-neg.C: New.
* g++.dg/cpp1y/feat-cxx11.C: New.
* g++.dg/cpp1y/feat-cxx14.C: New.
* g++.dg/cpp1y/feat-cxx98.C: New.
* g++.dg/cpp1y/feat-cxx98-neg.C: New.
* g++.dg/cpp1y/phoobhar.h: New.
* g++.dg/cpp1y/testinc/phoobhar.h: New.

From-SVN: r215752
41 files changed:
gcc/c-family/ChangeLog
gcc/c-family/c-cppbuiltin.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp1y/feat-cxx11-neg.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp1y/feat-cxx11.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp1y/feat-cxx14.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp1y/feat-cxx98-neg.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp1y/feat-cxx98.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp1y/phoobhar.h [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp1y/testinc/phoobhar.h [new file with mode: 0644]
libcpp/ChangeLog
libcpp/directives.c
libcpp/expr.c
libcpp/files.c
libcpp/identifiers.c
libcpp/internal.h
libcpp/pch.c
libcpp/traditional.c
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/basic_string.h
libstdc++-v3/include/bits/stl_algobase.h
libstdc++-v3/include/bits/stl_function.h
libstdc++-v3/include/bits/unique_ptr.h
libstdc++-v3/include/std/chrono
libstdc++-v3/include/std/complex
libstdc++-v3/include/std/iomanip
libstdc++-v3/include/std/shared_mutex
libstdc++-v3/include/std/tuple
libstdc++-v3/include/std/type_traits
libstdc++-v3/include/std/utility
libstdc++-v3/testsuite/20_util/declval/requirements/1_neg.cc
libstdc++-v3/testsuite/20_util/duration/literals/range.cc
libstdc++-v3/testsuite/20_util/duration/requirements/typedefs_neg1.cc
libstdc++-v3/testsuite/20_util/duration/requirements/typedefs_neg2.cc
libstdc++-v3/testsuite/20_util/duration/requirements/typedefs_neg3.cc
libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs_neg.cc
libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc
libstdc++-v3/testsuite/23_containers/array/tuple_interface/get_neg.cc
libstdc++-v3/testsuite/23_containers/array/tuple_interface/tuple_element_neg.cc
libstdc++-v3/testsuite/experimental/feat-cxx14.cc [new file with mode: 0644]
libstdc++-v3/testsuite/experimental/feat-lib-fund.cc [new file with mode: 0644]