* cpplib.h (TTYPE_TABLE): Move CPP_MIN and CPP_MAX into block
authorzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 19 Jul 2000 20:18:08 +0000 (20:18 +0000)
committerzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 19 Jul 2000 20:18:08 +0000 (20:18 +0000)
commit316744619de1b120399985e6b8f5ae475da07ed4
treefb27fc4ef85133963af7127518d36e07b5e1d021
parent91d4291d407bed3bc47e9dca4af564a601e1c0b2
* 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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@35137 138bc75d-0d04-0410-961f-82ee72b054a4
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