cpphash.h (struct spec_nodes): Add n_true and n_false.

* cpphash.h (struct spec_nodes): Add n_true and n_false.
	* cppinit.c (cpp_create_reader): Initialize them.
	(append_include_chain): cxx_aware arg might be unused.
	* cppexp.c (lex): In C++ mode, recognize 'true' and 'false'
	keywords and give them their phase 7 meaning.  Pedwarn about
	this unless '__bool_true_false_are_defined' is defined.

	* g++.dg/stdbool-if.C: New test.

From-SVN: r39530
This commit is contained in:
Zack Weinberg 2001-02-07 23:13:46 +00:00
parent a4c6d37356
commit 037313ae8d

View File

@ -156,6 +156,8 @@ struct spec_nodes
{
cpp_hashnode *n_L; /* L"str" */
cpp_hashnode *n_defined; /* defined operator */
cpp_hashnode *n_true; /* C++ keyword true */
cpp_hashnode *n_false; /* C++ keyword false */
cpp_hashnode *n__Pragma; /* _Pragma operator */
cpp_hashnode *n__STRICT_ANSI__; /* STDC_0_IN_SYSTEM_HEADERS */
cpp_hashnode *n__CHAR_UNSIGNED__; /* plain char is unsigned */