diff options
author | Zack Weinberg <zack@wolery.stanford.edu> | 2001-02-07 18:32:42 +0000 |
---|---|---|
committer | Zack Weinberg <zack@gcc.gnu.org> | 2001-02-07 18:32:42 +0000 |
commit | 7d4918a2d96f1512bd71b00d1deae61fbd4a6ab9 (patch) | |
tree | c4639b8fbbd99fcc0eb642f020f8787aad421122 /gcc/cppinit.c | |
parent | 7acfb19e402f6ec59f2efc0f8fe6d462615f6b5d (diff) | |
download | gcc-7d4918a2d96f1512bd71b00d1deae61fbd4a6ab9.zip gcc-7d4918a2d96f1512bd71b00d1deae61fbd4a6ab9.tar.gz gcc-7d4918a2d96f1512bd71b00d1deae61fbd4a6ab9.tar.bz2 |
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: r39523
Diffstat (limited to 'gcc/cppinit.c')
-rw-r--r-- | gcc/cppinit.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/cppinit.c b/gcc/cppinit.c index 845d35b..5393666 100644 --- a/gcc/cppinit.c +++ b/gcc/cppinit.c @@ -203,7 +203,7 @@ append_include_chain (pfile, dir, path, cxx_aware) cpp_reader *pfile; char *dir; int path; - int cxx_aware; + int cxx_aware ATTRIBUTE_UNUSED; { struct cpp_pending *pend = CPP_OPTION (pfile, pending); struct file_name_list *new; @@ -554,6 +554,8 @@ cpp_create_reader (lang) s = &pfile->spec_nodes; s->n_L = cpp_lookup (pfile, DSC("L")); s->n_defined = cpp_lookup (pfile, DSC("defined")); + s->n_true = cpp_lookup (pfile, DSC("true")); + s->n_false = cpp_lookup (pfile, DSC("false")); s->n__Pragma = cpp_lookup (pfile, DSC("_Pragma")); s->n__STRICT_ANSI__ = cpp_lookup (pfile, DSC("__STRICT_ANSI__")); s->n__CHAR_UNSIGNED__ = cpp_lookup (pfile, DSC("__CHAR_UNSIGNED__")); |