OSDN Git Service

* cpphash.c (struct arg, struct arglist): Const-ify strings.
authorzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 21 Apr 2000 17:18:50 +0000 (17:18 +0000)
committerzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 21 Apr 2000 17:18:50 +0000 (17:18 +0000)
commit2c63d6c8260dedcc5162773e2121cbb2448c9db5
tree21832fd028eb53eea53190faa67b40ac42811fbf
parent7fdc504b710c98bd35cc6435af26eac7994516d7
* cpphash.c (struct arg, struct arglist): Const-ify strings.
(warn_trad_stringify, duplicate_arg_p): New helper functions.
(collect_expansion): Rewrite to scan over a token list.
Remove -traditional support.
(collect_formal_parameters): Rename to collect_params; rewrite
to scan over a token list.
(_cpp_create_definition): Adjust to scan a token list.
(_cpp_macroexpand): Remove -traditional support.
(_cpp_compare_defs): Whitespace is now canonicalized.
(comp_def_part): Delete function.

* cpphash.h: Update prototypes.
* cpplex.c (init_token_list): Don't set lineno if there is no
buffer.
(pedantic_whitespace): New function.
(_cpp_scan_line): Mark tokens that had hspace before.  Don't
consume a newline.  Use pedantic_whitespace.
(_cpp_lex_token): Remove support for -traditional macros.
(_cpp_get_define_token): Delete.
(_cpp_get_directive_token): Do the real work here.  Use
pedantic_whitespace.
(_cpp_init_input_buffer): Initialize pfile->directbuf.

* cpplib.c (get_macro_name): Delete.
(do_define): Read the entire line into pfile->directbuf, then
feed the token list to _cpp_create_definition.
* cpplib.h (HSPACE_BEFORE): new define.
(struct cpp_reader): Add a toklist member, "directbuf".

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@33309 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/cpphash.c
gcc/cpphash.h
gcc/cpplex.c
gcc/cpplib.c
gcc/cpplib.h