1. 10 Aug, 2000 1 commit
  2. 02 Aug, 2000 1 commit
    • zack's avatar
      * cppexp.c, cppinit.c, cpplex.c, cpplib.c, cppmacro.c, · e0a859f1
      zack authored
      	cppspec.c: Do not use 'legal' or 'illegal' in error messages
      	and comments.
      
      	* cppmain.c (cb_define, cb_undef): Don't generate any output
      	if not done_initializing.
      	* cpplex.c (maybe_paste_with_next): When the token after a ##
      	is an omitted rest argument, only delete the token before it
      	if that token is a comma.  Do not warn about bogus token
      	pastes for , ## rest_arg.
      
      	* cpp.texi: Update.
      	* cpp.1: Regenerate.
      
      	* gcc.dg/cpp/macsyntx.c: Fix error regexp.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@35421 138bc75d-0d04-0410-961f-82ee72b054a4
      e0a859f1
  3. 24 Jul, 2000 1 commit
  4. 19 Jul, 2000 1 commit
    • zack's avatar
      * cpplib.h (TTYPE_TABLE): Move CPP_MIN and CPP_MAX into block · 31674461
      zack authored
      	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
      31674461
  5. 18 Jul, 2000 1 commit
    • zack's avatar
      * cpplib.h (TTYPE_TABLE): Rearrange to use only two per-entry · 7e842f95
      zack authored
                macros, not five.
      
      	* cpphash.h (TOKEN_NAME): New macro.
      	(_cpp_spell_operator): Deleted.
      	(token_spellings): Now _cpp_token_spellings.
      
      	* cppexp.c: Use TOKEN_NAME or TYPE_NAME, not _cpp_spell_operator.
      	* cpplex.c: Use OP and TK macros when expanding the
      	TTYPE_TABLE.  Eliminate token_names.  For non-OPERATOR tokens,
      	store the stringification of the enumeration name (CPP_CHAR,
      	etc.) in the name slot of token_spellings.
      	Use TOKEN_NAME and/or TOKEN_SPELL, do not reference
      	token_spellings directly.
      	* cpplib.c: Use TOKEN_SPELL.
      
      	* cpplex.c (_cpp_push_token): If the token being pushed back
      	is the previous token in this context, just subtract one from
      	context->posn.
      	* cppmacro.c (save_expansion): Clear aux field when storing a
      	placemarker.
      
      	* gcc.dg/cpp/paste5.c: New test.
      	* gcc.dg/cpp/vararg1.c: New test.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@35124 138bc75d-0d04-0410-961f-82ee72b054a4
      7e842f95
  6. 13 Jul, 2000 1 commit
    • zack's avatar
      * cppexp.c, cpphash.c, cpphash.h, cppinit.c, cpplex.c, · 241e762e
      zack authored
      	cpplib.c, cpplib.h: Eradicate all traces of code dependent on
      	traditional, lang_chill, or lang_fortran.
      
      	* cppfiles.c: #undef strcmp to suppress warning about macros
      	used without arguments.
      	(_cpp_execute_include): Use f, not fname, in "No include path"
      	error.
      	(_cpp_pop_file_buffer): New function.
      	* cpplib.c: Don't include <sys/mman.h>.
      	(cpp_push_buffer): Set line_base and lineno in new buffer.
      	(cpp_pop_buffer): Use _cpp_pop_file_buffer.
      
      	* cpplex.c: Move all prototypes and structure declarations to the
      	top of the file.  Properly parenthesise some macro arguments.
      	(cpp_scan_line): New function.
      	(special_symbol [case T_INCLUDE_DEPTH]): Use pfile->include_depth,
      	don't need to walk up the stack counting.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@35003 138bc75d-0d04-0410-961f-82ee72b054a4
      241e762e
  7. 12 Jul, 2000 1 commit
    • zack's avatar
      * cppexp.c (LOGICAL): Delete macro. · c3e4ce9b
      zack authored
      	(_cpp_parse_expr): Do not use UNARY for unary +.  Implement ||
      	and && directly.
      
      	* cpphash.c (HASHSIZE): Increase to 4096.
      	(struct hashdummy): Add hash field.
      	(eq_HASHNODE): Compare unreduced hashes, then lengths, then
      	the string values using memcmp.
      	(cpp_lookup): Set dummy.hash.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@34994 138bc75d-0d04-0410-961f-82ee72b054a4
      c3e4ce9b
  8. 11 Jul, 2000 1 commit
    • zack's avatar
      2000-07-11 Zack Weinberg <zack@wolery.cumb.org> · deb356cf
      zack authored
      	* cpplex.c (parse_name): No longer inline (premature optimization).
      	(do_pop_context): Fold into pop_context.
      	(pop_context): Returns int.
      	(lex_next): Hoist test for end of directive into pop_context.
      	(push_macro_context): Returns int; takes just reader and token.
      	Hoist test for excessive nesting to caller.
      	(push_arg_context): Returns void; takes just reader and token.
      	Do not call stringify_arg or get_raw_token.
      	(get_raw_token): Convert tail recursion through	push_arg_context
      	to a loop at this level.  Call stringify_arg here if appropriate.
      	(maybe_paste_with_next): Convert tail recursion to a while loop.
      	Hoist test of paste_level to caller.
      
      	(stringify_arg): Push arg context at beginning.
      	(cpp_get_token): Split out core into _cpp_get_token.  Call
      	process_directive here.  Throw away CPP_PLACEMARKER tokens.
      	(_cpp_get_token): Convert tail recursion through
      	push_macro_context to a loop at this level.
      	(_cpp_glue_header_name, is_macro_disabled, stringify_arg,
      	_cpp_get_raw_token): Use _cpp_get_token.
      	(_cpp_skip_rest_of_line): Drop the context stack directly; do
      	not call pop_context.
      	(_cpp_run_directive): Call lex_next directly.
      
      	* cpphash.h: Prototype _cpp_get_token.
      	* cppexp.c (lex): Use it.
      	* cpphash.c (parse_define): Use it.
      	* cpplib.c (get_define_node, do_undef, parse_include,
      	read_line_number, do_line, do_ident, do_pragma, do_pragma_gcc,
      	do_pragma_implementation, do_pragma_poison, do_pragma_dependency,
      	parse_ifdef, validate_else): Use it.
      	(cpp_push_buffer): Tweak error message; abort if anyone tries
      	to push a buffer while macro expansions are stacked.
      
      2000-07-11  Donn Terry  <donnte@microsoft.com>
      
      	* cpplex.c (free_macro_args, save_token): Cast arg of free
      	and/or xrealloc to PTR.
      	(_cpp_init_input_buffer): Clear all fields of the base context.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@34972 138bc75d-0d04-0410-961f-82ee72b054a4
      deb356cf
  9. 09 Jul, 2000 1 commit
  10. 08 Jul, 2000 2 commits
    • zack's avatar
      * cpplib.h (struct cpp_name): Now struct cpp_string. · 76faa4c0
      zack authored
      	(CPP_INT, CPP_FLOAT, CPP_NUMBER, CPP_COMMENT,
      	CPP_HEADER_NAME): Change to type S.
      	(struct cpp_token): Rename 'name' field to 'str'.  Add 'node'
      	field, a cpp_hashnode *.  All references to val.name updated
      	to use val.str or val.node as appropriate.
      	(struct cpp_reader): Add spec_nodes field.
      	(cpp_idcmp): Now cpp_ideq; takes a token * and a char *.
      
      	* cpphash.h (struct spec_nodes): New.
      	(enum spell_type): Reorder.  Only SPELL_STRING tokens use
      	val.str.  All references to 'spelling > SPELL_NONE' updated to
      	match.
      
      	(CPP_IN_SYSTEM_HEADER): Check pfile->buffer and
      	pfile->buffer->inc are not NULL before dereferencing them.
      
      	* cpplex.c (parse_name): Take a pointer to the current token,
      	plus current position and limit as args; return the new
      	position; don't copy the text of a name into the string
      	buffer, instead call cpp_lookup and store the node pointer.
      	If extending a token, copy out the text of the old into a
      	scratch buffer, append the new, look that up and store the new
      	node pointer.  Inline.
      	(maybe_paste_with_next): If the result of paste is a NAME,
      	then look up the pasted text and store its node pointer.
      	(lex_line): Adjust for new parse_name interface.
      	Check for L"str", L'str' using spec_nodes->n_L.
      	(spell_token): SPELL_IDENT tokens have their spelling in
      	val.node->name.  Handle SPELL_STRING tokens that don't have
      	string delimiters.
      	(_cpp_expand_name_space,
      	(can_paste): Check for L ## "str" using spec_nodes->n_L.
      	(cpp_get_token, special_symbol): No need to call cpp_lookup.
      	(cpp_idcmp): Now cpp_ideq; take a token * and a const char *;
      	return 1=equal 0=not, not a tristate.
      
      	* cpphash.c (var_args_str): Delete.
      	(find_param): Compare node fields directly.
      	(is__va_args__): Use CPP_PEDANTIC.  Just compare
      	token->val.node with spec_nodes->n__VA_ARGS__.
      	(dump_funlike_macro): Don't use var_args_str.
      
      	* cpplib.c (_cpp_check_directive): Just walk through
      	spec_nodes->dirs comparing pointers.
      	(get_define_node, do_pragma_poison, detect_if_not_defined,
      	parse_ifdef): The identifier has already been looked up.
      	(do_ifdef, do_ifndef): parse_ifdef won't return a poisoned
      	node.
      	(do_if): Only call detect_if_not_defined at beginning of file.
      	(_cpp_parse_assertion): Only copy string pointers for
      	SPELL_STRING tokens.
      	(pragma_dispatch): Take a node pointer and examine its name
      	field.
      	(_cpp_init_stacks): Also initialize the spec_nodes structure.
      
      	* cppinit.c (cpp_reader_init): Call _cpp_init_stacks after
      	_cpp_init_macros.
      	(cpp_cleanup): Free pfile->spec_nodes.  Call _cpp_cleanup_* in
      	reverse order from the corresponding _cpp_init_* routines.
      
      	* cppexp.c (parse_number, parse_charconst, parse_defined,
      	lex): Check val.node->type instead of calling cpp_defined.
      	Use spec_nodes entries where appropriate.
      
      	* fix-header.c, scan-decls.c: Update for interface changes.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@34926 138bc75d-0d04-0410-961f-82ee72b054a4
      76faa4c0
    • zack's avatar
      * cppexp.c: Update all code for new lexer interface. · c5ea33a8
      zack authored
      	(op_t, operator codes, struct token, tokentab2, op_to_str): Remove.
      	(struct suffix, vsuf_1, vsuf_2, vsuf_3, op_to_prio): New.
      	* cpplex.c (token_names): Trim leading CPP_ from names; make
      	the strings unsigned.
      	(_cpp_spell_operator): New.
      	(is_macro_disabled): Disable all macros if rescanning
      	preprocessed text.
      	(_cpp_get_directive_token): Remove.
      
      	* cppinit.c: Don't set no_macro_expand.
      	* cpplib.c (read_line_number, do_line): Check only for EOF,
      	not VSPACE.
      	* cpphash.h: Update prototypes.
      	* cpplib.h (CPP_VSPACE): Remove.
      	(struct cpp_reader): Remove no_macro_expand.
      
      testsuite:
      	* gcc.dg/cpp/19951227-1.c, gcc.dg/cpp/assert2.c,
      	gcc.dg/cpp/if-1.c, gcc.dg/cpp/if-4.c: Tweak error regexps.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@34920 138bc75d-0d04-0410-961f-82ee72b054a4
      c5ea33a8
  11. 05 Jul, 2000 1 commit
    • zack's avatar
      toplevel: · f51c2148
      zack authored
      	* cpplex.c: Don't include sys/mman.h.
      	(cpp_push_buffer, cpp_pop_buffer): Moved to cpplib.c.
      
      	* cpplib.c: Include sys/mman.h and obstack.h.
      	(cpp_push_buffer): Moved from cpplex.c; allocate buffers on an
      	obstack.
      	(cpp_pop_buffer): Moved from cpplex.c; free buffers from an obstack.
      	(_cpp_unwind_if_stack): Now static, unwind_if_stack.  Don't
      	bother freeing if stack entries (they will be freed with their buffer).
      	(do_endif): Free if stack entries from the buffer obstack.
      	(push_conditional): Allocate if stack entries from the buffer obstack.
      
      	(find_answer): Rename to _cpp_find_answer.
      	(do_assert, do_unassert): Update.
      
      	* cpphash.h: Update prototypes.
      	(xobnew): New convenience macro.
      	* cpplib.h (struct cpp_reader): Add hash_ob and buffer_ob fields.
      	Update comments.
      	(struct cpp_hashnode): Remove disabled field.
      
      	* cppinit.c: Don't include hashtab.h or splay-tree.h.
      	(report_missing_guard): Moved to cppfiles.c.
      	(cpp_reader_init): Call cpp_init_stacks, cpp_init_macros,
      	cpp_init_includes.
      	(cpp_cleanup): Call cpp_cleanup_stacks, cpp_cleanup_macros,
      	cpp_cleanup_includes.  Don't destroy hashtab or
      	all_include_files here.
      	(cpp_finish): Use _cpp_report_missing_guards.
      
      	* cppfiles.c (report_missing_guard): Moved from cppinit.c.
      	(_cpp_init_include_table): Rename _cpp_init_includes.
      	(_cpp_cleanup_includes, _cpp_report_missing_guards): New.
      
      	* cppexp.c (parse_assertion): Update for new name of
      	find_answer.
      
      	* Makefile.in (cpplib.o, cpphash.o, cppinit.o): Update deps.
      
      	* cpplib.c (do_ident): s/VSPACE/EOF/
      
      testsuite:
      	* gcc.dg/cpp/ident.c: New test.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@34870 138bc75d-0d04-0410-961f-82ee72b054a4
      f51c2148
  12. 04 Jul, 2000 1 commit
    • zack's avatar
      top level: · f80e83a9
      zack authored
      2000-07-03  Zack Weinberg  <zack@wolery.cumb.org>
      
      	* fix-header.c (struct partial_proto): Remove unnecessary fields.
      	(recognized_extern, recognized_function, read_scan_file):
      	Update for new scheme.
      	(check_protection): It's still a multiple include guard even
      	if it doesn't always trigger.
      	* scan-decls.c (skip_to_closing_brace, scan_decls): Update for
      	new scheme.
      	* scan.h: Declare struct cpp_token.  Update prototypes.
      
      2000-07-03  Neil Booth  <neilb@earthling.net>
      	    Zack Weinberg  <zack@wolery.cumb.org>
      
      	Complete overhaul of the lexer and macro expander.
      
      	* cpphash.c (object_defn, funct_defn, push_macro_expansion,
      	arg, arglist, argdata, reflist, collect_objlike_expansion,
      	collect_funlike_expansion, collect_params,
      	warn_trad_stringify, trad_stringify, duplicate_arg_p, add_pat,
      	unsafe_chars, macarg, compare_defs, special_symbol,
      	scan_arguments, stringify, funlike_macroexpand,
      	_cpp_quote_string, monthnames): Delete.
      	(cpp_lookup, _cpp_free_definition, dump_funlike_macro,
      	_cpp_create_definition, _cpp_dump_definition,
      	dump_hash_helper): Adjust.
      	(find_param, count_params, parse_define, var_args_str,
      	check_macro_redefinition, save_expansion): New.
      
      	* cpplex.c (skip_block_comment, skip_line_comment, parse_name,
              parse_string, output_line_command, trigraph_replace,
              lex_line, cpp_push_buffer, cpp_pop_buffer, cpp_output_tokens,
              cpp_scan_buffer_nooutput, cpp_scan_buffer, cpp_free_toklist,
              cpp_idcmp, _cpp_get_directive_token, _cpp_init_input_buffer,
      	_cpp_skip_rest_of_line): Modify.
      
              (maybe_macroexpand, skip_comment, copy_comment, skip_string,
      	find_position, null_warning, bump_column, expand_name_space,
      	pedantic_whitespace, _cpp_output_list, _cpp_slice_toklist,
      	_cpp_squeeze_toklist, _cpp_scan_until, _cpp_skip_hspace,
      	_cpp_parse_name, _cpp_lex_token, cpp_get_non_space_token,
      	_cpp_prescan): Delete.
      
      	(dump_param_spelling, process_directive, lex_next,
              is_macro_disabled, stringify_arg, expand_context_stack,
              output_token, make_string_token, alloc_number_token,
              special_symbol, duplicate_token, maybe_paste_with_next,
              can_paste, prevent_macro_expansion, restore_macro_expansion,
              get_temp_token, release_temp_tokens, quote_string,
              token_names, token_spellings, _cpp_expand_name_space,
              _cpp_glue_header_name, _cpp_reserve_name_space,
              digraph_spellings, trigraph_ok, skip_whitespace, save_comment,
              placemarker_token, eof_token, cpp_context, macro_args,
              get_raw_token, parse_arg, parse_args, save_token,
              push_arg_context, push_macro_context, pop_context,
              do_pop_context, free_macro_args, _cpp_get_line,
              _cpp_run_directive): New.
      
      	* cpplib.c (validate_else, parse_include, push_conditional,
      	pass_thru_directive, read_line_number, parse_ifdef,
      	detect_if_not_defined, _cpp_check_directive, do_define,
      	do_undef, do_include, do_import, do_include_next, do_error,
      	do_warning, do_ident, do_pragma, pragma_dispatch, gcc_pragmas,
      	top_pragmas, do_pragma_gcc, do_pragma_implementation,
      	do_pragma_poison, do_pragma_system_header,
      	do_pragma_dependency, do_sccs, do_ifdef, do_ifndef, do_else,
      	dl_elif, do_endif, _cpp_unwind_if_stack, do_assert,
      	do_unassert, cpp_define, cpp_undef, cpp_assert, cpp_unassert,
      	cpp_defined): Update for new scheme.
      	(strtoul_for_line, get_define_node, dump_macro_name,
      	_cpp_check_linemarker, _cpp_parse_assertion): New.
      	(_cpp_handle_directive, do_pragma_default): Delete.
      
      	* cpphash.h (struct predicate): Now struct answer.
      	(enum spell_type, struct token_spelling, struct directive,
      	directive_handler): New.
      	Update prototypes.  Remove unused macros.
      	* cpplib.h: Update prototypes.  Remove unused macros,
      	structure definitions, and fields.
      
      	* cpperror.c (print_containing_files, v_message): Adjust.
      	* cppexp.c (parse_assertion, lex, parse_escape,
      	_cpp_parse_expr): Adjust.
      	* cppfiles.c (open_include_file, _cpp_execute_include,
      	_cpp_compare_file_date, cpp_read_file, read_include_file):
      	Adjust.
      	* cppinit.c (dump_special_to_buffer): Delete.
      	(append_include_chain, merge_include_chains, cpp_reader_init,
      	cpp_cleanup, initialize_builtins, builtin_array, cpp_start_read,
      	cpp_finish, handle_option, print_help): Adjust.
      	* cppmain.c (main): Adjust.
      
      testsuite:
      2000-07-03  Zack Weinberg  <zack@wolery.cumb.org>
      
      	* testsuite/gcc.dg/cpp/19951025-1.c: Adjust regexps.
      	* testsuite/gcc.dg/cpp/19990703-1.c: Likewise.
      	* testsuite/gcc.dg/cpp/20000625-1.c: Likewise.
      	* testsuite/gcc.dg/cpp/20000625-2.c: Likewise.
      
      	* testsuite/gcc.dg/cpp/macro1.c,
      	testsuite/gcc.dg/cpp/paste1.c, testsuite/gcc.dg/cpp/paste2.c,
      	testsuite/gcc.dg/cpp/paste3.c, testsuite/gcc.dg/cpp/paste4.c,
      	testsuite/gcc.dg/cpp/strify1.c,
      	testsuite/gcc.dg/cpp/strify2.c: New tests.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@34859 138bc75d-0d04-0410-961f-82ee72b054a4
      f80e83a9
  13. 30 May, 2000 1 commit
  14. 28 May, 2000 1 commit
    • zack's avatar
      * cppfiles.c: Read files in, using mmap if possible, then · c4abf88d
      zack authored
      	prescan them separately.
      	(read_file, read_with_read): New functions.
      	* cpplex.c: Don't define UCHAR_MAX.
      	(_cpp_read_and_prescan): Rename to _cpp_prescan.  Don't read
      	the file here.
      
      	* cppinit.c (handle_option): Automatically define __cplusplus,
      	__OBJC__, __ASEEMBLER__, _LANGUAGE_FORTRAN here when we see
      	the respective -lang switch.
      
      	* cpphash.h (enum node_type, struct hashnode, _cpp_lookup
      	prototype): Move to...
      	* cpplib.h: ... here.  Rename struct hashnode to struct
      	cpp_hashnode and give it a typedef.  Rename _cpp_lookup to
      	cpp_lookup.  Add 'fe_value' slot, a union tree_node *.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@34228 138bc75d-0d04-0410-961f-82ee72b054a4
      c4abf88d
  15. 27 May, 2000 1 commit
    • neil's avatar
      * cppexp.c (parse_assertion): Supply extra argument to · d2efb5ed
      neil authored
      	_cpp_init_toklist.
      	* cpplib.c (do_assert, do_unassert): Similarly.
      	* cpphash.h (_cpp_init_toklist) Update.
      	(_cpp_expand_token_space): New.
      	(DUMMY_TOKEN, NO_DUMMY_TOKEN): New.
      	* cpplex.c (_cpp_init_toklist): New argument.
      	(parse_string2): New argument multiline_ok.
      	(spell_token): Take a const cpp_token *.
      	(INIT_NAME): Replace with INIT_TOKEN_NAME.  Update tokens_used.
      	(SPELL_ macros): Replace with enum.
      	(expand_token_space): Replace with _cpp_expand_token_space.
      	Take COUNT argument.
      	(IS_DIRECTIVE): Update.
      	(_cpp_lex_line): Update token structure before parsing number.
      	Don't assume start at beginning of token list.
      	(save_comment): Use INIT_TOKEN_NAME.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@34214 138bc75d-0d04-0410-961f-82ee72b054a4
      d2efb5ed
  16. 18 May, 2000 1 commit
    • zack's avatar
      * cppexp.c (parse_assertion): New. · bce8e0c0
      zack authored
      	(lex): Call it for CPP_HASH.  Remove CPP_ASSERTION case.
      	(_cpp_parse_expr): Remove case '#'.  Don't set
      	parsing_if_directive.
      	* cpphash.c (collect_objlike_expansion,
      	collect_funlike_expansion, collect_params,
      	_cpp_create_definition): The list no longer has a trailing
      	VSPACE token.
      	* cpphash.h (enum node_type): Add T_ASSERTION.
      	(struct hashnode): Remove aschain, add pred.
      	(struct predicate): New.
      	Update prototypes.
      
      	* cpplex.c (expand_token_space): Handle both offset and
      	nonoffset lists.
      	(init_token_list, _cpp_free_token_list, _cpp_parse_assertion): Delete.
      	(_cpp_init_toklist, _cpp_clear_toklist, _cpp_free_toklist,
      	_cpp_slice_toklist, _cpp_squeeze_toklist, _cpp_equiv_tokens,
      	_cpp_equiv_toklists): New.
      	(_cpp_scan_line): Rename to _cpp_scan_until; add ability to
      	stop at any single-character token, not just newline.
      	(_cpp_lex_token): Remove special cases for #define and #if.
      	(cpp_get_token): Expect # as a separate token type.  Remove
      	DIRECTIVE case.
      	(_cpp_get_directive_token): Remove DIRECTIVE case.
      	(_cpp_lex_line, _cpp_lex_file, _cpp_init_input_buffer): Update.
      
      	* cpplib.c (_cpp_check_directive): Set dirno and
      	SYNTAX_INCLUDE bit of flags, not dir_handler and dir_flags.
      	(_cpp_handle_directive): Run # <number> through the same logic
      	as normal directives.
      	(do_define): Don't set parsing_define_directive.  Use
      	_cpp_scan_until.  The list does not have a VSPACE at the end.
      	(do_if): Save, clear, and restore only_seen_white around
      	_cpp_parse_expr.
      	(skip_if_group): s/CPP_DIRECTIVE/CPP_HASH/
      	(do_assert, do_unassert): Rewrite.
      
      	* cpplib.h (TTYPE_TABLE): Remove CPP_ASSERTION.
      	(LIST_OFFSET): New flag.
      	(struct cpp_toklist): Replace dir_handler and dir_flags with
      	dirno and flags.
      	(struct cpp_reader): Remove parsing_if_directive and
      	parsing_define_directive.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@33984 138bc75d-0d04-0410-961f-82ee72b054a4
      bce8e0c0
  17. 10 May, 2000 1 commit
  18. 04 May, 2000 1 commit
    • zack's avatar
      gcc: · e057cf7c
      zack authored
      	* cpphash.h (U): New define, to correct type of string constants.
      	(ustrcmp, ustrncmp, ustrlen, uxstrdup, ustrchr): New wrapper
      	routines, to do casts when passing unsigned strings to libc.
      	* cppexp.c, cppfiles.c, cpphash.c, cppinit.c, cpplib.c: Use them.
      
      	* cppfiles.c (_cpp_execute_include): Make filename an U_CHAR *.
      	* cpphash.c (_cpp_quote_string): Make string an U_CHAR *.
      	* cppinit.c (dump_special_to_buffer): Make macro name an U_CHAR *.
      	* cpplex.c (parse_ifdef, parse_include, validate_else): Make
      	second argument an U_CHAR *.
      
      	* cppinit.c (builtin_array): Make name and value U_CHAR *, add
      	length field, clean up initializer.
      	(ISTABLE): Add __extension__ to designated-
      	initializers version.
      	* cpplex.c (CHARTAB): Likewise.
      
      	* mbchar.c: Add dummy external declaration to the !MULTIBYTE_CHARS
      	case so the file won't be empty.
      
      include:
      	* symcat.h: Remove #endif label.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@33657 138bc75d-0d04-0410-961f-82ee72b054a4
      e057cf7c
  19. 03 May, 2000 1 commit
  20. 01 May, 2000 1 commit
    • zack's avatar
      * cpphash.c (_cpp_make_hashnode): Rename make_HASHNODE, now · 3ba8b497
      zack authored
      	static.  Allocate the hashnode and its string in the same
      	block of memory.
      	(del_HASHNODE): Don't free h->name.
      	(_cpp_lookup): If there is no entry for this string, create
      	one, of type T_VOID.
      	(_cpp_lookup_slot): Delete.
      	* cpphash.h: Update prototypes.
      
      	* cpplex.c (maybe_macroexpand): Check for hp->type == T_VOID,
      	not hp == NULL.
      	* cpplib.c (do_define, do_undef, do_pragma_poison, do_assert,
      	do_unassert, cpp_defined): Use _cpp_lookup.  Don't create a
      	node here, just fill in the value field properly.  "Delete"
      	entries by setting the value field to T_VOID.  Check for
      	hp->type == T_VOID, not hp == NULL.
      
      	* Makefile.in (cpplib.o): Don't depend on $(HASHTAB_H).
      	* cpperror.c, cppexp.c, cpplex.c, cpplib.c:  Don't include
      	hashtab.h.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@33581 138bc75d-0d04-0410-961f-82ee72b054a4
      3ba8b497
  21. 20 Apr, 2000 1 commit
    • zack's avatar
      * cpplib.h (enum cpp_ttype): Add token types for all · 50fd6b48
      zack authored
      	punctuators.  Distinguish pp-numbers from valid C numbers.
      	Give some tokens better names.  Initialize from macro.
      	(struct cpp_name, cpp_token, cpp_toklist): New data
      	structures.
      	Update prototypes.
      	* cpplex.c (bump_column, expand_name_space,
      	expand_token_space, init_token_list, cpp_output_list,
      	_cpp_scan_line):  New functions.
      	(output_line_command): Add third argument, new line number.
      	* cpphash.h: Update prototypes.
      	* cppexp.c, cpphash.c, cpplib.c, scan-decls.c: Update for new
      	token names.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@33289 138bc75d-0d04-0410-961f-82ee72b054a4
      50fd6b48
  22. 18 Apr, 2000 2 commits
    • kenner's avatar
      * gcc/conflict.c (conflict_graph_add): Pass enum type to · 2b3dbc20
      kenner authored
      	htab_find_slot.
      	* gcc/cpperror.c (hashtab.h): Now include.
      	* gcc/cppexp.c (hashtab.h): Likewise.
      	* gcc/cpplex.c (hashtab.h): Likewise.
      	* gcc/cppfiles.c (hashtab.h): Likewise.
      	(find_include_file, _cpp_calc_hash, cpp_read_file): Pass enum type
      	to htab_find_slot_with_hash.
      	* gcc/cpphash.c (hashtab.h): Now include.
      	(_cpp_lookup_slot): INSERT is now enum insert_option.
      	* gcc/cpphash.h (_cpp_lookup_slot): Likewise.
      	* gcc/cppinit.c (hashtab.h): Include earlier.
      	(initialize_builtins): Pass enum to htab_find_slot.
      	* gcc/cpplib.c (hashtab.h): Now include.
      	(do_define, do_undef): Pass enum type to _cpp_lookup_slot.
      	(do_pragma_poison, do_assert): Likewise.
      	* gcc/emit-rtl.c (gen_rtx_CONST_INT): Pass enum to
      	htab_find_slot_with_hash.
      	* gcc/simplify-rtx.c (cselib_lookup_mem, cselib_lookup): Likewise.
      	* gcc/tree.c (type_hash_add): Likewise.
      	(build1): Minor cleanup.
      	* include/hashtab.h (enum insert_option): New type.
      	(htab_find_slot, htab_find_slot_with_hash): Use it.
      	* libiberty/hashtab.c: Various minor cleanups.
      	(htab_find_slot_with_hash): INSERT is now enum insert_option.
      	(htab_find_slot): Likewise.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@33236 138bc75d-0d04-0410-961f-82ee72b054a4
      2b3dbc20
    • zack's avatar
      * cppexp.c (lex): Don't assume tokens are NUL terminated. · 1a8af608
      zack authored
      	* cpplib.c (do_include, do_import, do_include_next,
      	read_line_number, detect_if_not_defined): Likewise.
      	* cpphash.c (collect_expansion): Likewise.
      	(special_symbol, _cpp_macroexpand): Check return from
      	cpp_file_buffer.
      	* cpphash.h (CPP_NUL_TERMINATE, CPP_NUL_TERMINATE_Q): Delete
      	macros.  Delete all uses.
      
      	* gcc.dg/cpp-mi.c: Add two more test cases.
      	* gcc.dg/cpp-mind.h, gcc.dg/cpp-mindp.h: New files.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@33223 138bc75d-0d04-0410-961f-82ee72b054a4
      1a8af608
  23. 11 Apr, 2000 1 commit
    • zack's avatar
      * cppexp.c, cpphash.c, cpphash.h, cpplex.c, cpplib.c, · 82831e19
      zack authored
      	cpplib.h, cppmain.c, fix-header.c, scan-decls.c: Replace
      	cpp_token with cpp_ttype everywhere.
      	* cpperror.c, cpphash.c, cpplex.c, cpplib.c, scan-decls.c:
      	Replace cpp_buf_line_and_col with CPP_BUF_LINE and/or
      	CPP_BUF_COL.  Line and column numbers are unsigned int, not
      	long.
      	* cpplex.c (cpp_buf_line_and_col): Delete.
      	* cpplib.h (struct cpp_buffer, struct cpp_reader): Change
      	'long lineno' to 'unsigned int lineno'.
      	(CPP_BUF_LINE, CPP_BUF_COL): New macros.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@33076 138bc75d-0d04-0410-961f-82ee72b054a4
      82831e19
  24. 08 Apr, 2000 1 commit
  25. 03 Apr, 2000 1 commit
  26. 02 Apr, 2000 3 commits
    • zack's avatar
      * cppinit.c (cpp_start_read): Turn off -Wtraditional if · b93c7be0
      zack authored
      	processing C++.
      	* cpplib.c (_cpp_handle_directive): Improve warnings for
      	traditional C and indented directives.
      
      	* enquire.c, gsyslimits.h, limity.h, config/convex/fixinc.convex,
      	fixinc/fixinc.irix, fixinc/fixinc.sco, fixinc/fixinc.wrap,
      	fixinc/inclhack.def: Indent the # of #include_next one space.
      	* cp/rtti.c: Un-indent #if and #endif.
      
      	* cppexp.c (_cpp_parse_expr): If lex returns '#', it's a
      	syntax error, but an error has already been printed.
      	* cpplex.c (_cpp_parse_assertion): Give a more specific error
      	message when called with nothing remaining on the line.
      	(_cpp_lex_token): If _cpp_parse_assertion fails, return an
      	OTHER token, not an ASSERTION.
      	* cpplib.c (do_assert): When we create a 'base' node, clear
      	its aschain pointer.
      
      	* gcc.c-torture/compile/981211-1.c: Move to...
      	* gcc.dg/cpp-as1.c: ...here.
      	* gcc.dg/cpp-as2.c: New file.
      
      	* gcc.dg/cpp-tradwarn1.c: Change warning regexps to match the
      	compiler.
      
      
      git-svn-id: svn+ssh://g...
      b93c7be0
    • neil's avatar
      * cppexp.c: New typedef op_t. struct operation and struct · 19a641b9
      neil authored
      	token updated to use it.
      	(op_to_str): New function.
      	(_cpp_parse_expr): Error messages modified to use op_to_str.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@32869 138bc75d-0d04-0410-961f-82ee72b054a4
      19a641b9
    • neil's avatar
      * cppexp.c: New FINISHED dummy token. Combine operator initial · 1840c529
      neil authored
      	flags and initial priority into a single constant.  New
      	EQUALITY macro.  New operator flag SHORT_CIRCUIT.
      	(_parse_cpp_expr): Implement new constants.  Take left operand
      	checks out of reduction loop.  Handle SHORT_CIRCUIT.  End of
      	parse indicated by reducing FINISHED token.  Remove new lines
      	from cpp_error messages.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@32863 138bc75d-0d04-0410-961f-82ee72b054a4
      1840c529
  27. 01 Apr, 2000 2 commits
  28. 31 Mar, 2000 2 commits
    • zack's avatar
      * cpplib.h: Merge struct cpp_options into struct cpp_reader. · 2ff3ad1d
      zack authored
      	Reorder struct cpp_options and struct cpp_reader for better
      	packing.  Replace CPP_OPTIONS macro with CPP_OPTION which
      	takes two args.  Change all 'char' flags to 'unsigned char'.
      	Move show_column flag into struct cpp_options.  Don't
      	prototype cpp_options_init.
      	* cpphash.h, cpperror.c, cppexp.c, cppfiles.c, cpphash.c,
      	cppinit.c, cpplex.c, cpplib.c:
      	Replace CPP_OPTIONS (pfile)->whatever with
      	CPP_OPTION (pfile, whatever), and likewise for
      	opts = CPP_OPTIONS (pfile); ... opts->whatever;
      
      	* cppinit.c (merge_include_chains): Take a cpp_reader *.
      	Extract CPP_OPTION (pfile, pending) and work with that
      	directly.
      	(cpp_options_init): Delete.
      	(cpp_reader_init): Turn on on-by-default options here.
      	Allocate the pending structure here.
      	(cl_options, enum opt_code): Define these from the same table,
      	kept in a large macro.  Add -fshow-column and -fno-show-column
      	options.
      
      	* cpperror.c (v_message): If show_column is off, don't print
      	the column number.
      
      	* cppmain.c: Update for new interface.
      	* fix-header.c: Likewise.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@32850 138bc75d-0d04-0410-961f-82ee72b054a4
      2ff3ad1d
    • neil's avatar
      * cppexp.c: Delete SKIP_OPERAND. Correct priority · e60ec180
      neil authored
      	PAREN_INNER_PRIO.
      	(_cpp_parse_expr): Check for multiple unary +/- operators.
      	Correct priorities of ':' and '?'.  Treat ')' as having a
      	value.	Ensure conditional expression is not void.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@32848 138bc75d-0d04-0410-961f-82ee72b054a4
      e60ec180
  29. 13 Mar, 2000 1 commit
    • zack's avatar
      * Makefile.in (LIBCPP_OBJS): Add cpplex.o. · 0578f103
      zack authored
      	(cpplex.o): New target.
      	* po/POTFILES.in: Add cpplex.c.
      
      	* cpplex.c (_cpp_grow_token_buffer, null_cleanup,
      	cpp_push_buffer, cpp_pop_buffer, cpp_scan_buffer,
      	cpp_expand_to_buffer, cpp_buf_line_and_col, cpp_file_buffer,
      	skip_block_comment, skip_line_comment, skip_comment,
      	copy_comment, _cpp_skip_hspace, _cpp_skip_rest_of_line,
      	_cpp_parse_name, skip_string, parse_string,
      	_cpp_parse_assertion, cpp_get_token, cpp_get_non_space_token,
      	_cpp_get_directive_token, find_position,
      	_cpp_read_and_prescan, _cpp_init_input_buffer): Move here.
      	(maybe_macroexpand, _cpp_lex_token): New functions.
      
      	* cpplib.c (SKIP_WHITE_SPACE, eval_if_expr, parse_set_mark,
      	parse_goto_mark): Delete.
      	(_cpp_handle_eof): New function.
      	(_cpp_handle_directive): Rename from handle_directive.
      	(_cpp_output_line_command): Rename from output_line_command.
      	(do_if, do_elif): Call _cpp_parse_expr directly.
      	* cppfiles.c (_cpp_read_include_file): Don't call
      	init_input_buffer here.
      	* cpphash.c (quote_string): Move here, rename _cpp_quote_string.
      	* cppexp.c (_cpp_parse_expr): Diddle parsing_if_directive
      	here; pop the token_buffer and skip the rest of the line here.
      	* cppinit.c (cpp_start_read): Call _cpp_init_input_buffer
      	here.
      
      	* cpphash.h (CPP_RESERVE, CPP_IS_MACRO_BUFFER, ACTIVE_MARK_P):
      	Define here.
      	(CPP_SET_BUF_MARK, CPP_GOTO_BUF_MARK, CPP_SET_MARK,
      	CPP_GOTO_MARK): New macros.
      	(_cpp_quote_string, _cpp_parse_name, _cpp_skip_rest_of_line,
      	_cpp_skip_hspace, _cpp_parse_assertion, _cpp_lex_token,
      	_cpp_read_and_prescan, _cpp_init_input_buffer,
      	_cpp_grow_token_buffer, _cpp_get_directive_token,
      	_cpp_handle_directive, _cpp_handle_eof,
      	_cpp_output_line_command): Prototype them here.
      	* cpplib.h (enum cpp_token): Add CPP_MACRO.
      	(CPP_RESERVE, get_directive_token, cpp_grow_buffer,
      	quote_string, output_line_command): Remove.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@32513 138bc75d-0d04-0410-961f-82ee72b054a4
      0578f103
  30. 08 Mar, 2000 1 commit
    • zack's avatar
      * Makefile.in (LIBCPP_DEPS): New macro. · 1e8b9746
      zack authored
      	(cpplib.o, cpphash.o, cpperror.o, cppexp.o, cppfiles.o): Use
      	it to declare deps.
      	* cpperror.c: Include cpphash.h.
      	* cppexp.c: Include cpphash.h.  Remove MULTIBYTE_CHARS
      	dingleberry.
      	(lex): Don't use CPP_WARN_UNDEF.
      	(_cpp_parse_expr): Return an int, the truth value.
      	* cppfiles.c: Include cpphash.h.
      	(_cpp_merge_include_chains): Move to cppinit.c and make static.
      	* cppinit.c (include_defaults_array): Disentangle.
      	(cpp_cleanup): Don't free the if stack here.
      	(cpp_finish): Pop off all buffers, not just one.
      	* cpplib.c (eval_if_expr): Return int.
      	(do_xifdef): Rename do_ifdef.
      	(handle_directive): Don't use CPP_PREPROCESSED.
      	(cpp_get_token): Don't use CPP_C89.
      	* fix-header.c: Don't use CPP_OPTIONS.
      
      	* cpplib.h: Move U_CHAR, enum node_type, struct
      	file_name_list, struct ihash, is_idchar, is_idstart,
      	is_numchar, is_numstart, is_hspace, is_space, CPP_BUF_PEEK,
      	CPP_BUF_GET, CPP_FORWARD, CPP_PUTS, CPP_PUTS_Q, CPP_PUTC,
      	CPP_PUTC_Q, CPP_NUL_TERMINATE, CPP_NUL_TERMINATE_Q,
      	CPP_BUMP_BUFFER_LINE, CPP_BUMP_LINE, CPP_PREV_BUFFER,
      	CPP_PRINT_DEPS, CPP_TRADITIONAL, CPP_PEDANTIC, and prototypes
      	of _cpp_simplify_pathname, _cpp_find_include_file,
      	_cpp_read_include_file, and _cpp_parse_expr to cpphash.h.
      	Move struct if_stack to cpplib.c.  Move struct cpp_pending to
      	cppinit.c.
      	Change all uses of U_CHAR to be unsigned char instead.
      	Delete CPP_WARN_UNDEF, CPP_C89, and CPP_PREPROCESSED.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@32435 138bc75d-0d04-0410-961f-82ee72b054a4
      1e8b9746
  31. 07 Mar, 2000 2 commits
    • zack's avatar
      2000-03-07 Neil Booth <NeilB@earthling.net> · bcc40c63
      zack authored
      	* cppexp.c (struct operation, left_shift, right_shift,
      	cpp_parse_expr): Change some "char"s to "U_CHAR"s, and some
      	"int"s to "unsigned int"s.
      	* cpplib.c (detect_if_not_defined, do_assert, do_unassert):
      	Similarly.
      	* cpplib.h: Update for above.
      	* mkdeps.c (deps_init, deps_calc_target): Cast pointers
      	returned from allocations.
      
      	* cppinit.c (opt_comp, parse_options): New functions.
      	(handle_option): Use parse_option to parse a single command
      	line option, that possibly takes an argument.
      	(cpp_handle_options): Sort the array of command line options on
      	first invocation (non-ASCII hosts only).
      	(print_help): Update.
      
      2000-03-07  Zack Weinberg  <zack@wolery.cumb.org>
      
      	* mkdeps.c (munge): Fix off-by-one bug and inconsistencies in
      	backslash counting loops.  Problem noted by Matt Kraai <kraai@ghs.com>.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@32394 138bc75d-0d04-0410-961f-82ee72b054a4
      bcc40c63
    • zack's avatar
      * cppfiles.c (_cpp_find_include_file): Make sure ih->name is · 94221a92
      zack authored
      	initialized.
      	* cppinit.c (cpp_cleanup): Free imp->nshort also.
      
      	* cpperror.c (cpp_print_containing_files,
      	cpp_print_file_and_line, v_cpp_message): Rename to
      	print_containing_files, print_file_and_line, and v_message.
      	* cppexp.c (cpp_parse_expr, cpp_parse_escape, cpp_lex): Rename
      	to _cpp_parse_expr, parse_escape, and lex.
      	(parse_charconst): Remove broken multibyte support.
      	* cppfiles.c (include_hash): Make static.
      	(cpp_included): New function.
      	(merge_include_chains, find_include_file, finclude,
      	simplify_pathname): Rename to _cpp_merge_include_chains,
      	_cpp_find_include_file, _cpp_read_include_file, and
      	_cpp_simplify_pathname.
      	* cpphash.c (cpp_lookup, free_definition, delete_macro,
      	cpp_install, create_definition, macroexpand, compare_defs,
      	dump_definition): Rename to _cpp_lookup, _cpp_free_definition,
      	_cpp_delete_macro, _cpp_install, _cpp_create_definition,
      	_cpp_macroexpand, _cpp_compare_defs, and _cpp_dump_definition.
      	* cppinit.c (cpp_handle_option): Rename to handle_option, make
      	static.
      	* cpplib.c: Remove extern prototype of cpp_parse_expr.
      
      	* cpphash.h: Update prototypes.
      	* cpplib.h: Likewise.  Prototype _cpp_parse_expr here.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@32390 138bc75d-0d04-0410-961f-82ee72b054a4
      94221a92
  32. 04 Mar, 2000 1 commit
    • zack's avatar
      * cpplib.h (_dollar_ok): New macro. · 4f98874d
      zack authored
      	(is_idchar, is_idstart): Use it.
      	(IStable): Rename to _cpp_IStable.  Declare it const if
      	gcc >=2.7 or C99.  Delete all references to FAKE_CONST.
      	(is_idchar, is_idstart, is_numchar, is_numstart, is_hspace,
      	is_space): Update for renamed IStable.
      
      	* cppinit.c: Delete all references to FAKE_CONST and CAT
      	macros. Define init_IStable as empty macro if gcc >=2.7 or
      	C99. Change TABLE() to ISTABLE and hardcode name of table.
      	(cpp_start_read): Don't change the IStable based on
      	dollars_in_ident.
      
      	* cpphash.c (unsafe_chars): Add pfile argument.  All callers
      	changed.  Handle '$' for char1 correctly.
      	* cpplib.c (cpp_get_token): Use is_numchar when parsing numbers.
      
      	* cppexp.c (tokentab2): Make const.
      	(cpp_lex): Make toktab const.
      	* cppinit.c (include_defaults_array): Make const.
      	(initialize_standard_includes): Make default_include const.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@32321 138bc75d-0d04-0410-961f-82ee72b054a4
      4f98874d
  33. 01 Mar, 2000 1 commit
    • zack's avatar
      * cpplib.h (CPP_ASSERTION, CPP_STRINGIZE, CPP_TOKPASTE): New · 05dba164
      zack authored
      	token types.
      	(struct cpp_reader): Add parsing_if_directive and
      	parsing_define_directive flags.
      	(struct cpp_options): Remove output_conditionals flag.
      	(check_macro_name): Delete prototype.
      
      	* cpphash.h (struct macrodef): Delete.
      	(struct reflist): Separate from struct definition.
      	(struct definition): Remove unused fields.  Add column number.
      	(create_definition): Returns a DEFINITION *.  Takes a
      	cpp_reader * and an int.
      
      	* cpphash.c (SKIP_WHITE_SPACE): Delete.
      	(PEEKC): Copy defn from cpplib.c.
      	(rest_extension, REST_EXTENSION_LENGTH): Delete.
      	(struct arg): New.
      	(struct arglist): Simplify.
      	(collect_expansion): Rewrite.  Get tokens by calling
      	cpp_get_token.  Add more error checking.
      	(collect_formal_parameters): New function, broken out of
      	create_definition and reworked to use get_directive_token.
      	(create_definition): All real work is now in collect_expansion
      	and collect_formal_parameters.  do_define handles finding the
      	macro name.  Return a DEFINITION, not a MACRODEF.
      	(macroexpand): Replace bcopy with memcpy throughout.  Replace
      	character-at-a-time copy loop with memcpy and pointer increments.
      	(compare-defs): d1->argnames / d2->argnames might be null.
      
      	* cpplib.c (copy_rest_of_line): Delete function.
      	(skip_rest_of_line): Do all the work ourselves.
      	(skip_string): New function.
      	(parse_string): Use skip_string.
      	(get_macro_name): New function.
      	(check_macro_name): Delete.
      	(copy_comment): Use CPP_RESERVE and CPP_PUTC_Q.
      	(cpp_skip_hspace): Use CPP_BUMP_LINE.
      	(handle_directive): ICE if we're called on a macro buffer.
      	(do_define): Determine macro name and type (funlike/objlike)
      	here.  Expunge all uses of MACRODEF.
      	(cpp_push_buffer): Set line_base to NULL.
      	(do_undef, read_line_number): Don't worry about getting a POP token.
      	(eval_if_expression): Set/reset parsing_if_directive around
      	cpp_parse_expr. Don't clear only_seen_white.
      	(skip_if_group): Remove output_conditionals logic.  Use
      	skip_rest_of_line.
      	(cpp_get_token): Return ASSERTION, STRINGIZE, and TOKPASTE
      	tokens under appropriate conditions.
      	(cpp_unassert): Call do_unassert not do_assert.  Oops.
      
      	* cppexp.c (parse_defined): New function, break out of
      	cpp_lex.
      	(cpp_lex): We now get CPP_ASSERTION tokens and can check them
      	ourselves, with cpp_defined.
      	* cppinit.c (cpp_handle_option, print_help): Delete -ifoutput.
      
      	* gcc.dg/20000209-2.c: Turn off -pedantic-errors.
      	* gcc.dg/strpaste-2.c: New.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@32274 138bc75d-0d04-0410-961f-82ee72b054a4
      05dba164