From 7d4918a2d96f1512bd71b00d1deae61fbd4a6ab9 Mon Sep 17 00:00:00 2001 From: Zack Weinberg Date: Wed, 7 Feb 2001 18:32:42 +0000 Subject: 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 --- gcc/cppinit.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'gcc/cppinit.c') 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__")); -- cgit v1.1