]> gcc.gnu.org Git - gcc.git/commit - libcpp/lex.c
cpplib.h (TTYPE_TABLE): Move CPP_MIN and CPP_MAX into block of operators allowed...
authorZack Weinberg <zack@gcc.gnu.org>
Wed, 19 Jul 2000 20:18:08 +0000 (20:18 +0000)
committerZack Weinberg <zack@gcc.gnu.org>
Wed, 19 Jul 2000 20:18:08 +0000 (20:18 +0000)
commit92936ecf1a27517ac0b96c5af6a5ae9664faf3f3
treefb27fc4ef85133963af7127518d36e07b5e1d021
parentb86db3ebc22f22aae3f7dddadc90c9b1841ebe1a
cpplib.h (TTYPE_TABLE): Move CPP_MIN and CPP_MAX into block of operators allowed in #if...

* cpplib.h (TTYPE_TABLE): Move CPP_MIN and CPP_MAX into block
of operators allowed in #if and having an _EQ variant.  Add
CPP_MIN_EQ, CPP_MAX_EQ, and CPP_DEFINED.
(cpp_token flags): Add NAMED_OP.
(enum node_type): Add T_OPERATOR.
(struct cpp_hashnode): Add code slot to value union.
* cpphash.h (spec_nodes): Remove n_defined.

* cpplex.c (lex_line): Convert T_OPERATOR nodes to their proper types.
(spell_token, can_paste, maybe_paste_with_next): Handle named operators.
(is_macro_disabled): Tweak error messages.

* cpplib.c (get_define_node): Disallow all named operators as
macro names.  Tweak error messages.
(_cpp_init_stacks): Don't set up spec_nodes->n_defined.

* cppinit.c (builtin_array): Add entries for the named operators.
* cppexp.c (lex): Check for CPP_DEFINED token.
(priority table): Add entries for CPP_MIN and CPP_MAX.
(_cpp_parse_expr): Handle CPP_MIN and CPP_MAX.

testsuite:
* gcc.dg/cpp/directiv.c, gcc.dg/cpp/macsyntx.c,
gcc.dg/cpp/undef1.c: Tweak error regexps.

From-SVN: r35137
gcc/ChangeLog
gcc/cppexp.c
gcc/cpphash.h
gcc/cppinit.c
gcc/cpplex.c
gcc/cpplib.c
gcc/cpplib.h
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/cpp/directiv.c
gcc/testsuite/gcc.dg/cpp/macsyntx.c
gcc/testsuite/gcc.dg/cpp/undef1.c
This page took 0.058932 seconds and 5 git commands to generate.