* cpphash.h: (TOKEN_SPELL) Pulled from cpplex.c.
* cpplex.c (TOKEN_SPELL) Move to cpphash.h.
* cpphash.c: (struct macro_info, alloc_macro, free_macro,
struct toklist_dummy): New.
(cpp_free_definition): Free macros with free_macro.
(count_params): Don't save paramter spellings. Save macro
information in a struct macro_info.
(parse_define): Don't allocate a token list.
(save_expansion): Allocate the macro's token list, and
save parameter spellings if necessary. Use TOKEN_SPELL.
(cpp_create_definition): Make list const.
From-SVN: r34985
2000-07-11 Zack Weinberg <zack@wolery.cumb.org>
* 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.
From-SVN: r34972
* gensupport.c (process_rtx): Make rtl checking stop
complaining about the define_insn while it is being
converted from a define_insn_and_split.
From-SVN: r34968
* cppinit.c: (cpp_reader_init): Allow digraphs by default.
(handle_option): Set digraphs according to standard.
Merge OPT_lang_c89 handler with OPT_std_c89.
* cpplex.c: (lex_line, can_paste): Honour digraphs in
accordance with the digraphs flag.
* cpplib.h: (struct cpp_options): New option digraphs.
From-SVN: r34956
* stl_function.h (bind1st, bind2nd): Rename __opr to __oper,
as __opr is used internally by egcs.
* stl_numeric.h (__power, power): Likewise.
* stl_algo.h (transform): Rename __opr to __oper, as __opr is used
internally by egcs.
Reported by Harri Porten <porten@tu-harburg.de>
From-SVN: r34949
* config/ia64/ia64.c (got_symbolic_operand): New.
(symbolic_operand, move_operand): Revert 0701 change.
* config/ia64/ia64.h (PREDICATE_CODES): Update.
* config/ia64/ia64-protos.h (got_symbolic_operand): Declare.
* config/ia64/ia64.md (movdi): Revert 0701 wrt symbolic_operand;
split the offset into a 14-bit low part instead of a 13-bit low part.
(load_fptr): Mark the mem as unchanging.
(load_symptr): Use got_symbolic_operand.
From-SVN: r34948
* init.c (build_new_1): Bail early if the call to new fails.
* decl.c (compute_array_index_type): Check specifically for
an INTEGER_CST, not just TREE_CONSTANT.
* decl.c (duplicate_decls): Don't call duplicate_decls on
the DECL_TEMPLATE_RESULT.
(decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
codes.
* error.c (dump_template_bindings): Don't crash if we had an
invalid argument list.
* typeck.c (c_expand_start_case): Do narrowing here.
* semantics.c (finish_switch_cond): Not here.
* parse.y (asm_clobbers): Do string concatenation.
From-SVN: r34938
* decl.c (pushtag): Don't put local classes in template functions
on the local_classes list.
* decl2.c (get_guard): Add missing return for old ABI local
variable case.
From-SVN: r34937
2000-07-10 Gabriel Dos Reis <gdr@codesourcery.com>
* diagnostic.c (wrap_text): New function.
(maybe_wrap_text): Likewise.
(output_add_string): Use it.
(output_format): Likewise.
(count_error): Use verbatim instead of notice.
(report_error_function): Likewise. Don't use plain fprintf.
(finish_diagnostic): New function.
(output_do_verbatim): Tweak. Commonalize functionalities in
output_verbatim and verbatim.
(output_verbatim): Adjust.
(verbatim): Likewise.
(report_diagnostic): Define.
* diagnostic.h (report_diagnostic): Prototype.
From-SVN: r34935