aboutsummaryrefslogtreecommitdiff
path: root/gcc/toplev.h
AgeCommit message (Collapse)AuthorFilesLines
2001-11-06Clean up langhooksNeil Booth1-69/+0
* alias.c:: Include langhooks.h. * emit-rtl.c: Similarly. * toplev.c: Similarly. * tree-inline.c: Similarly. * langhooks-def.h: New, the old langhooks.h. Give the default hooks a common prefix. * langhooks.h: Contents extracted from toplev.h. * toplev.h: Move langhook stuff to langhooks.h. * langhooks.c: Give default hooks a common prefix. * c-lang.c: Include langhooks-def.h. * ada/misc.c: Similarly. * cp/cp-lang.c: Similarly. * f/com.c: Similarly. * java/lang.c: Similarly. * objc/objc-act.c: Similarly. * Makefile.in: Update. * ada/Makefile.in: Similarly. * cp/Make-lang.in: Similarly. * f/Make-lang.in: Similarly. * java/Make-lang.in: Similarly. * objc/Make-lang.in: Similarly. From-SVN: r46813
2001-10-25langhooks.c (lang_hook_default_clear_binding_stack): New.Zack Weinberg1-0/+3
* langhooks.c (lang_hook_default_clear_binding_stack): New. (lang_hook_default_get_alias_set): Move next to other alias hooks. * langhooks.h: Prototype lang_hook_default_clear_binding_stack. (LANG_HOOKS_CLEAR_BINDING_STACK): New macro. (LANG_HOOKS_INITIALIZER): Add it. * toplev.h (struct lang_hooks): Add clear_binding_stack. * toplev.c (compile_file): Call lang_hooks.clear_binding_stack instead of a loop calling poplevel. cp: * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to pop_everything. From-SVN: r46492
2001-10-23alias.c (can_address_p): Compnonents are not addressable if the containing ↵Richard Kenner1-2/+7
type has alias set 0. * alias.c (can_address_p): Compnonents are not addressable if the containing type has alias set 0. (get_alias_set): Rework to use STRIP_NOPS. Only call front-end routine on object, type, or object with NOPs stripped, not inner values. Use language hook to call front-end routine. * builtins.c (get_memory_rtx): Always call set_mem_attributes. (expand_builtin_apply): Call set_mem_align on MEMs we make. Don't pass alignment to emit_block_move. (expand_builtin_memcpy, expand_builtin_va_copy): Likewise. (expand_builtin_memset): Likewise, but for clear_storage. * c-common.c (lang_get_alias_set): Renamed to c_common_alias_set and remove C++ specific parts. * c-common.h (c_common_get_alias_set): Add declaration. * c-lang.c (LANG_HOOKS_GET_ALIAS_SET): New macro. * calls.c (emit_call_1): Fix typo in sibcall_pop case. (save_fixed_argument_area): Call set_mem_align. Remove alignment in call to emit_block_move. (emit_library_call_value_1, store_one_arg): Likewise. (target_for_arg): Remove; disabled long ago. * emit-rtl.c (set_mem_attributes): Rework to only call get_mem_attrs once and similar cleanups. (offset_address): Use proper introductory comment. * expr.c (emit_block_move): Use alignment from that of MEM args, not from explicit operand; all callers changed. (clear_storage): Likewise. (expand_assignment): Don't call set_mem_alias_set on to_rtx. (store_field): Remove kludge on alias set used for to_rtx. (highest_pow2_factor, case *_DIV_EXPR): Never return 0. (expand_expr_unaligned): Call set_mem_attributes instead of set_mem_alias_set. * expr.h (emit_block_move, clear_storage): Remove ALIGN argument. * function.c (assign_stack_temp_for_type): Set MEM alignment. (expand_function_end): Track MEM attributes of trampolines. * ifcvt.c (noce_try_cmove_arith): Set alignment of new MEM. * integrate.c (copy_rtx_and_substitute, case CALL): Copy memory attributes from original. * langhooks.c (lang_hook_default_get_alias_set): New function. (hook_get_alias_set_0): New function. * langhooks.h (hook_get_alias_set_0): New declaration. (lang_hook_default_get_alias_set): Likewise. (LANG_HOOKS_GET_ALIAS_SET): New macro; add to initializer. * reload1.c (alter_reg): Use adjust_address_nv. * rtl.c (get_mode_alignment): Moved to here. * rtl.h (MEM_ALIGN): Take default from mode, if not BLKmode, and change default if unknown from 1 to BITS_PER_UNIT. * stor-layout.c (get_mode_alignment): Remove from here. * toplev.h (struct lang_hoks): Add get_alias_set field. * tree.h (lang_get_alias_set): Delete declaration. * config/arc/arc.c (arc_setup_incoming_varags): Set MEM alignment. * config/i386/i386.c (ix86_setup_incoming_varargs): Likewise. (ix86_va_arg): Likewise. * config/i960/i960.c (i960_setup_incoming_varargs): Likewise. * config/pa/pa.c (hppa_builtin_saveregs): Likewise. * config/sparc/sparc.c (sparc_va_arg): Likewise. * config/rs6000/rs6000.c (setup_incoming_varargs): Likewise. (expand_block_move_mem): Remove dead code. * cp/cp-lang.c (cxx_get_alias_set): New function. Point LANG_HOOKS_GET_ALIAS_SET to it. * f/com.c (LANG_HOOKS_GET_ALIAS_SET): New macro. (lang_get_alias_set): Delete. * java/lang.c (lang_get_alias_set): Deleted. From-SVN: r46440
2001-10-21langhooks.c (lang_hook_default_do_nothing, [...]): New defaults.Neil Booth1-4/+2
* langhooks.c (lang_hook_default_do_nothing, lang_hook_default_decode_option): New defaults. * langhooks.h: Make hooks unconditional and non-NULL. * toplev.c (compile_file, toplev_main): Update. * toplev.h: Update comments. * objc/objc-act.c (lang_hooks): Update to new paradigm. From-SVN: r46396
2001-10-20toplev.h (struct lang_hooks): HONOR_READONLY now bool.Richard Kenner1-1/+1
* toplev.h (struct lang_hooks): HONOR_READONLY now bool. * main.c: Include config.h and system.h, but not ansidecl.h. * Makefile.in (main.o): Update accordingly. From-SVN: r46376
2001-10-19langhooks.h (LANG_HOOKS_HONOR_READONLY): New macro.Richard Kenner1-0/+3
* langhooks.h (LANG_HOOKS_HONOR_READONLY): New macro. * toplev.h (struct lang_hooks): New field HONOR_READONLY. * emit-rtl.c (set_mem_attributes): Set RTX_UNCHANGING_P from TREE_READONLY and TYPE_READONLY if lang_hooks.honor_readonly. Set alignment from type if INDIRECT_REF. (adjust_address_1, offset_address): Simplify alignment compuitation. * expr.c (expand_expr, case INDIRECT_REF): Don't set RTX_UNCHANGING_P here; done by set_mem_attributes. From-SVN: r46361
2001-10-08langhooks.h: New file.Alexandre Oliva1-0/+29
* langhooks.h: New file. * Makefile.in (OBJS): Added langhooks.o. (c-lang.o): Depend on langhooks.h. (c-common.o): Don't depend on tree-inline.h. (tree-inline.o): Depend on toplev.h. (langhooks.o): New rule. * c-common.c: Don't include tree-inline.h. (c_mark_lang_decl): Mark argument c as unused. (c_common_lang_init): Don't initialize hooks here. * c-lang.c: Include langhooks.h, then override some macros. (lang_hooks): Initialize with macros in langhooks.h. (c_init): Don't initialize hooks here. * toplev.c (struct lang_hooks_for_tree_inlining): New struct. (struct lang_hooks): Add tree_inlining. Refer to langhooks.h. * tree-inline.c: Include toplev.h. Don't define hook variables. * tree-inline.h: Don't define hook types nor declare hook variables. Move macros to... * langhooks.c: ... new file, as functions. Adjust all callers. From-SVN: r46096
2001-09-24top level:Zack Weinberg1-23/+15
* errors.h (warning, error, fatal, internal_error): Don't mark with ATTRIBUTE_PRINTF_n. * toplev.h (internal_error, fatal_io_error, warning, error, pedwarn, pedwarn_with_file_and_line, warning_with_file_and_line, error_with_file_and_line, sorry, error_for_asm, warning_for_asm): Likewise. cp: * Make-lang.in (CXX_OBJS): Take out cp/errfn.o. (cp/errfn.o): Delete rule. (cp/error.o): Depend on flags.h. * errfn.c: Delete file. * cp-tree.h: Declare warn_deprecated. Remove definitions of TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning, cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and internal_error respectively. Make cp_deprecated into a macro. Don't define cp_printer typedef or declare cp_printers. * error.c: Include flags.h. Delete: struct tree_formatting_info, print_function_argument_list, print_declaration, print_expression, print_function_declaration, print_function_parameter, print_type_id, print_cv_qualifier_seq, print_type_specifier_seq, print_simple_type_specifier, print_elaborated_type_specifier, print_rest_of_abstract_declarator, print_parameter_declaration_clause, print_exception_specification, print_nested_name_specifier, and definition of cp_printers. (locate_error): New function. (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and rewritten in terms of locate_error and diagnostic.c. (cp_tree_printer): Rename cp_printer; wire up to *_to_string instead of deleted print_* routines. Handle %C, %L, %O, %Q also. (init_error): Adjust to match. po: * POTFILES.in: Remove cp/errfn.c. From-SVN: r45765
2001-08-22Makefile.in, [...]: replace "GNU CC" with "GCC".Lars Brinkhoff1-12/+12
* Makefile.in, alias.c, basic-block.h, bb-reorder.c, bitmap.c, bitmap.h, builtin-types.def, builtins.c, builtins.def, c-aux-info.c, c-common.c, c-common.def, c-common.h, c-convert.c, c-decl.c, c-dump.c, c-dump.h, c-errors.c, c-format.c, c-lang.c, c-lex.c, c-lex.h, c-parse.in, c-pragma.c, c-pragma.h, c-semantics.c, c-tree.h, c-typeck.c, caller-save.c, calls.c, collect2.c, collect2.h, combine.c, conditions.h, config.gcc, configure.frag, configure.in, conflict.c, convert.c, convert.h, cppspec.c, crtstuff.c, cse.c, cselib.c, cselib.h, dbxout.c, dbxout.h, defaults.h, dependence.c, df.c, df.h, diagnostic.c, diagnostic.h, doloop.c, dominance.c, dwarf.h, dwarf2.h, dwarf2asm.c, dwarf2asm.h, dwarf2out.c, dwarf2out.h, dwarfout.c, emit-rtl.c, errors.c, errors.h, except.c, except.h, exgettext, explow.c, expmed.c, expr.c, expr.h, final.c, fixproto, flags.h, flow.c, fold-const.c, fp-test.c, function.c, function.h, gbl-ctors.h, gcc.c, gcc.h, gcc.hlp, gccspec.c, gcov-io.h, gcse.c, genattr.c, genattrtab.c, gencheck.c, gencodes.c, genconfig.c, genemit.c, genextract.c, genflags.c, gengenrtl.c, genmultilib, genopinit.c, genoutput.c, genpeep.c, genrecog.c, gensupport.c, gensupport.h, ggc-callbacks.c, ggc-common.c, ggc-none.c, ggc-page.c, ggc-simple.c, ggc.h, global.c, graph.c, graph.h, gthr-aix.h, gthr-dce.h, gthr-posix.h, gthr-rtems.h, gthr-single.h, gthr-solaris.h, gthr-vxworks.h, gthr-win32.h, gthr.h, haifa-sched.c, halfpic.c, halfpic.h, hard-reg-set.h, hwint.h, ifcvt.c, input.h, insn-addr.h, integrate.c, integrate.h, jump.c, lcm.c, libgcc2.c, libgcc2.h, lists.c, local-alloc.c, loop.c, loop.h, machmode.def, machmode.h, main.c, mbchar.c, mbchar.h, mips-tdump.c, mips-tfile.c, mklibgcc.in, mkmap-flat.awk, mkmap-symver.awk, optabs.c, output.h, params.c, params.def, params.h, predict.c, predict.def, predict.h, prefix.c, prefix.h, print-rtl.c, print-tree.c, profile.c, protoize.c, read-rtl.c, real.c, real.h, recog.c, recog.h, reg-stack.c, regclass.c, regmove.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, reorg.c, resource.c, resource.h, rtl.c, rtl.def, rtl.h, rtlanal.c, sbitmap.c, sbitmap.h, sched-deps.c, sched-ebb.c, sched-int.h, sched-rgn.c, sched-vis.c, sdbout.c, sdbout.h, sibcall.c, simplify-rtx.c, ssa-ccp.c, ssa-dce.c, ssa.c, ssa.h, stmt.c, stor-layout.c, stringpool.c, system.h, timevar.c, timevar.def, timevar.h, tlink.c, toplev.c, toplev.h, tree.c, tree.def, tree.h, tsystem.h, unroll.c, unwind-dw2-fde.c, unwind-dw2-fde.h, unwind-dw2.c, unwind-pe.h, unwind-sjlj.c, unwind.h, unwind.inc, varasm.c, varray.c, varray.h, xcoffout.c, xcoffout.h: replace "GNU CC" with "GCC". From-SVN: r45105
2001-08-12toplev.c (set_float_handler): Make static.Zack Weinberg1-3/+0
* toplev.c (set_float_handler): Make static. * toplev.h: Don't prototype set_float_handler. * simplify-rtx.c: Don't include setjmp.h. (simplify_unary_real, simplify_binary_real, simplify_binary_is2orm1): New functions. (simplify_unary_operation, simplify_binary_operation): Use them, via do_float_handler. * fold-const.c: Don't include setjmp.h. (exact_real_inverse_1): New function. (exact_real_inverse): Use it, via do_float_handler. * varasm.c: Don't include setjmp.h. (assemble_real_1): New function. (assemble_real): Use it, via do_float_handler. Call internal_error if we get a trap here. * c-parse.in, cse.c, cselib.c, ch/lex.c, config/i386/i386.c, config/pj/pj.c, config/s390/s390.c: Don't include setjmp.h. * java/lex.h: Don't include setjmp.h. Don't define SET_FLOAT_HANDLER or prototype set_float_handler. From-SVN: r44815
2001-07-19Makefile.in (emit-rtl.o, c-decl.o): Depend on debug.h.Neil Booth1-3/+0
* Makefile.in (emit-rtl.o, c-decl.o): Depend on debug.h. (final.o): Don't depend on xcoffout.h, dbxout.h or sdbout.h. (toplev.o): Don't depend on xcoffout.h. * c-decl.c: Include debug.h (duplicate_decls): Use debug hook. * dbxout.c (dbxout_source_file, dbxout_args): Make static. (dbx_debug_hooks, xcoff_debug_hooks): Update. (dbxout_types): Remove. * dbxout.h (dbxout_source_file, dbxout_types, dbxout_args): Remove. * debug.c (do_nothing_debug_hooks): Update. (debug_true_tree, debug_nothing_rtx): New. * debug.h (struct rtx_def): New. (struct gcc_debug_hooks): New hooks ignore_block, outlining_inline_function and label. (debug_true_tree, debug_nothing_rtx, dwarf2out_frame_init, dwarf2out_frame_finish): New. * dwarf2out.c (dwarf2out_ignore_block, dwarf2out_abstract_function): Make static, update prototype. (dwarf2_debug_hooks): Update. * dwarf2out.h (dwarf2out_ignore_block, dwarf2out_abstract_function, dwarf2out_frame_init, dwarf2out_frame_finish): Remove. * dwarfout.c (dwarf_debug_hooks): Update. * emit-rtl.c: Include debug.h. (remove_unnecessary_notes): Use debug hook. * final.c: Don't include dbxout.h, xcoffout.h or sdbout.h. (final_scan_insn): Use debug hook. * integrate.c (output_inline_function): Use debug hook. * sdbout.c (sdbout_toplevel_data, sdbout_label): Make static. (sdb_debug_hooks): Update. * sdbout.h (sdbout_label, sdbout_toplevel_data): Remove. * toplev.c: Don't include xcoffout.h. (note_outlining_of_inline_function, debug_ignore_block): Remove. * toplev.h (note_outlining_of_inline_function, debug_ignore_block): Remove. * tree.h (dwarf2out_do_frame): Remove. From-SVN: r44163
2001-07-19Makefile.in (toplev.o, [...]): Don't depend on dwarfout.h.Neil Booth1-2/+0
* Makefile.in (toplev.o, dwarfout.o, final.o): Don't depend on dwarfout.h. * dbxout.c (dbxout_function): Rename dbxout_funciton_decl, move to conditionally compiled block. (dbx_debug_hooks, xcoff_debug_hooks): Update. * dbxout.h (dbxout_function): Remove. * debug.c (do_nothing_debug_hooks): Update. * debug.h (struct gcc_debug_hooks): New hooks function_decl, global_decl, deferred_inline_function. * dwarf2out.c (dwarf2_debug_hooks): Update. (dwarf2out_global_decl): New. * dwarfout.c: Don't include dwarfout.h. (dwarfout_global_decl, dwarfout_function_decl, dwarfout_deferred_inline_function): New. (dwarf_debug_hooks): Update. * dwarfout.h: Remove. * final.c: Don't include dwarfout.h. * sdbout.c (sdbout_global_decl): New. (sdbout_debug_hooks): Update. * toplev.c: Don't include dwarfout.h. (check_global_declarations, rest_of_compilation): Use new debug hooks. (note_deferral_of_defined_inline_function): Remove. * toplev.h (note_deferral_of_defined_inline_function): Remove. * ch/Makefile.in (lex.o): No dependence on dwarfout.h. * ch/lex.c: Don't include dwarfout.h. * cp/Make-lang.in (decl2.o): No dependence on dwarfout.h, dwarf2out.h. (semantics.o, optimize.o): Depend on debug.h not dwarfout.h. * cp/decl2.c: Don't include dwarfout.h and dwarf2out.h. * cp/optimize.c: Include debug.h. (maybe_clone_body): Use debug hook. * cp/semantics.c: Include debug.h. (expand_body): Use debug hook. * po/POTFILES.in: Remove dwarfout.h. From-SVN: r44145
2001-07-11Makefile.in (c-lex.o): Wrap long lines.Neil Booth1-4/+0
* Makefile.in (c-lex.o): Wrap long lines. Depend on debug.h. * c-lex.c (cb_file_change, cb_define, cb_undef): Use debug hooks directly. * dbxout.c (dbx_debug_hooks): Add new hooks. (dbxout_start_new_source_file): Rename dbxout_start_source_file, make static. (dbxout_resume_previous_source_file): Rename dbxout_end_source_file, make static. * dbxout.h (dbxout_start_new_source_file, dbxout_resume_previous_source_file): Delete. * debug.c (do_nothing_debug_hooks): Add new hooks. (debug_nothing_init_finish): Rename debug_nothing_file_charstar. (debug_nothing_int_charstar, debug_nothing_int): New. * debug.h (gcc_debug_hooks): New hooks define, undef, start_source_file and end_source_file. (debug_nothing_init_finish): Rename debug_nothing_file_charstar. (debug_nothing_int_charstar, debug_nothing_int): New. * dwarf2out.c (dwarf2_debug_hooks): Add new hooks. (dwarf2out_start_source_file, dwarf2out_end_source_file, dwarf2out_define, dwarf2out_undef): Make static. * dwarf2out.h (dwarf2out_start_source_file, dwarf2out_end_source_file, dwarf2out_define, dwarf2out_undef): Remove. * dwarfout.c (dwarf_debug_hooks): Add new hooks. (dwarfout_start_source_file, dwarfout_end_source_file, dwarfout_define, dwarfout_undef): Make static. (dwarfout_start_source_file_check, dwarfout_end_source_file_check): New. (dwarfout_define, dwarfout_finish): Update. * dwarfout.h (dwarfout_start_new_source_file, dwarfout_resume_previous_source_file, dwarfout_define, dwarfout_undef): Remove. * sdbout.c (sdb_debug_hooks): Add new hooks. (sdbout_start_new_source_file): Rename sdbout_start_source_file, make static. (sdbout_resume_previous_source_file): Rename sdbout_end_source_file, make static, take an arg. * sdbout.h (sdbout_start_new_source_file, sdbout_resume_previous_source_file): Delete. * toplev.c (debug_start_source_file, debug_end_source_file, debug_define, debug_undef): Delete. * toplev.h (debug_start_source_file, debug_end_source_file, debug_define, debug_undef): Delete. * java/jcf-parse.c: Include debug.h. (parse_class_file): Update to use debug hooks directly. * java/Make-lang.in (jcf-parse.o): Depend on debug.h. From-SVN: r43952
2001-07-04c-lex.c (cb_file_change): Pass line number to debug_start_source_file.Daniel Berlin1-1/+1
2001-07-04 Daniel Berlin <dan@cgsoftware.com> * c-lex.c (cb_file_change): Pass line number to debug_start_source_file. (cb_undefine): Pass correct line number to debug_undef. * toplev.c (debug_start_source_file): Add line number to parameters. Pass it along to dwarf2out_start_source_file. (decode_g_option): Stop resetting debug level back to normal when we change debug formats, unless the current level is none. (Before, -g3 -gdwarf-2 would use debug level 2, rather than 3). * toplev.h (debug_start_source_file): Add line number to parameters. * dwarf2out.h (dwarf2out_start_source_file): Add line number to parameters. * dwarf2out.c (dwarf2out_start_source_file): Add line number to parameters. Output debug_macinfo data for starting file if requested. (dwarf2out_end_source_file): Output debug_macinfo data for ending file if requested. (dwarf2out_define): Output debug_macinfo data for defining a macro if requested. (dwarf2out_undef): Output debug_macinfo data for undefining a macro if requested. (DEBUG_MACINFO_SECTION): New. DWARF2 macro info section name. (DEBUG_MACINFO_SECTION_LABEL): New. DWARF2 macro info section label. (macinfo_section_label): New. DWARF2 macro info section label. (dwarf2out_init): If we want macro info, output the start label for the section. (dwarf2out_finish): If we want macro info, add a DW_AT_macro_info attribute to the compilation unit die pointing to the macro info. 2001-07-04 Daniel Berlin <dan@cgsoftware.com> * dwarf2out.c (new_loc_list): Move to inside #ifdef DWARF2_DEBUGGING_INFO. (add_loc_descr_to_loc_list): Ditto. (output_loc_list): Ditto. Also, fix thinko in curr not being initialized. (gen_internal_sym): Ditto. From-SVN: r43763
2001-06-28diagnostic.c (default_print_error_function): Tweak.Gabriel Dos Reis1-1/+0
* diagnostic.c (default_print_error_function): Tweak. (report_error_function): Likewise. * toplev.h (default_print_error_function): Move to... * diagnostic.h: ...here. Add a `diagnostic_context *' parameter. * tree.h (print_error_function): Move to... * diagnostic.h: ...here. Add a `diagnostic_context *' parameter. ch/ * lang.c: #include diagnostic.h (chill_print_error_function): Add a dummy `diagnostic_context *'. * Makefile.in (lang.o): Depend on diagnostic.h cp/ * error.c (lang_print_error_function): Add a `diagnostic_context *' parameter. Tweak. f/ * Make-lang.in (f/com.o): Depend on diagnostic.h * com.c: #include diagnostic.h (lang_print_error_function): Take a 'diagnostic_context *'. java/ * lang.c: #include diagnostic.h (lang_print_error): Add a `diagnostic_context *' parameter. (java_dummy_print): Likewise. * Make-lang.in (JAVA_LEX_C): Depend on diagnostic.h From-SVN: r43638
2001-06-10Makefile.in (c-parse.o): Depend on diagnostic.hGabriel Dos Reis1-3/+0
gcc/ 2001-06-10 Mark Mitchell <mark@codesourcery.com> Gabriel Dos Reis <gdr@codesourcery.com> * Makefile.in (c-parse.o): Depend on diagnostic.h (dwarf2out.o): Likewise. * dwarf2out.c: #include diagnostic.h * toplev.h (warningcount, errorcount, sorrycount): Remove declarations. * toplev.c (warningcount, errorcount, sorrycount): Remove definitions. * diagnostic.h (struct output_buffer): Reorder fields. (diagnostic_kind_count): New macro. (errorcount, warningcount, sorrycount): Define as macros. (diagnostic_report_warnings_p): New macro. (output_state): Add diagnostic_count field. * diagnostic.c (warningcount, errorcount, inhibit_warnings): Remove tentative declaration. (count_error): Use diagnostic_report_warnings_p. * c-parse.in: #include diagnostic.h ch/ 2001-06-10 Gabriel Dos Reis <gdr@codesourcery.com> * decl.c: #include diagnostic.h * actions.c: #include diagnostic.h * Makefile.in (actions.o): Depend on diagnostic.h (decl.o): Depend on diagnostic.h cp/ 2001-06-10 Mark Mitchell <mark@codesourcery.com> Gabriel Dos Reis <gdr@codesourcery.com> * Make-lang.in (cp/call.o): Depend on diagnostic.h (cp/typeck.o): Depend on diagnostic.h (cp/typeck2.o): Depend on diagnostic.h (cp/repo.o): Depend on dignostic.h * typeck.c: #include diagnostic.h (convert_for_initialization): Remove extern declaration for warningcount and errorcount. * call.c: #include diagnostic.h (convert_like_real): Remove extern declaration for warnincount and errorcount. * repo.c: #include diagnostic.h * typeck2.c: #include diagnostic.h From-SVN: r43140
2001-06-05c-common.h (flag_dump_translation_unit): Remove.Nathan Sidwell1-0/+1
* c-common.h (flag_dump_translation_unit): Remove. (enum tree_dump_index): Define. (TDF_ADDRESS, TDF_SLIM): New #defines. (dump_node_to_file): Remove. (dump_node): Make extern. Add flags. (dump_flag, dump_enabled_p, dump_begin, dump_end, dump_switch_p): Prototype. * c-common.c (flag_dump_translation_unit): Remove. * c-decl.c (c_decode_option): Remove -fdump-translation-unit logic. Use dump_switch_p. * c-dump.h (struct dump_info): Add node and user fields. (dump_pointer): Declare. * c-dump.c (dump_node): Make extern. Add flags. (SOL_COLUMN, EOL_COLUMN, COLUMN_ALIGNMENT): New #defines. (dump_new_line, dump_maybe_newline): Use them. (dump_pointer): New function. (dequeue_and_dump): Check TDF_SLIM before dumping a _DECL's chain or function's body. Dump address, if TDF_ADDRESS set. (dump_flag): Define. (dump_node_to_file): Remove. (struct dump_file_info): New struct. (dump_files): New array. (dump_begin, dump_end, dump_enabled_p, dump_switch_p): Define. * c-lang.c (finish_file): Adjust dumping. * toplev.h (dump_base_name): Make extern. * invoke.texi: Document new flags. cp: * class.c (maybe_indent_hierarchy): New function. (dump_class_hierarchy_r): Add flags. Dump extra binfo information, if enabled. Use maybe_indent_hierarchy. Adjust output format. (dump_class_hierarchy): Adjust prototype. Adjust output format. (dump_array, dump_vtable, dump_vtt): New functions. (finish_struct_1): Adjust hierarchy dumping. (initialize_vtable): Call dump_vtable. (build_vtt): Call dump_vtt. (build_ctor_vtbl_group): Call dump_vtable. * decl2.c (flag_dump_class_layout): Remove. (cxx_decode_option): Remove dump translation unit and dump class hierarchy check. Call dump_switch_p. (finish_file): Adjust dumping. (dump.c): Only dump base classes if not TDF_SLIM. Only dump namespace members if not TDF_SLIM. * optimize.c (dump_function): New function. (optimize_function): Call dump_function. * semantics.c (expand_body): Use dump_enabled_p. From-SVN: r42896
2001-05-25Standardize header guards.Richard Henderson1-3/+3
From-SVN: r42615
2001-05-20Makefile.in (OBJS, [...]): Update.Neil Booth1-0/+3
* Makefile.in (OBJS, LIBCPP_OBJS, LIBCPP_DEPS, cpplib.o, cpphash.o, fix-header): Update. (hashtable.o): New target. * c-common.h: Include cpplib.h. Define C_RID_CODE and struct c_common_identifier here. * c-lang.c (c_init_options): Update. Call set_identifier_size. * c-lex.c (c_lex): Update. * c-pragma.h: Update. * c-tree.h (struct lang_identifier): Contain c_common_identifier. Delete rid_code. (C_RID_CODE): Delete. * cpphash.c: Rewrite to use hashtable.c. * cpphash.h: Update include guards. (struct cpp_reader): Remove hashtab. hash_ob and buffer_ob are no longer pointers. Add hash_table and our_hashtable. (HASHSTEP, _cpp_init_hashtable, _cpp_lookup_with_hash): Delete. (_cpp_cleanup_hashtable): Rename _cpp_destroy_hashtable. (_cpp_cleanup_stacks): Rename _cpp_init_directives. * cppinit.c (cpp_create_reader): Update. * cpplex.c (cpp_ideq, parse_identifier, cpp_output_token): Update. (cpp_interpret_charconst): Eliminate warning. * cpplib.c (do_pragma, do_endif, push_conditional, cpp_push_buffer, cpp_pop_buffer): Update. (_cpp_init_stacks): Rename cpp_init_directives. (_cpp_cleanup_stacks): Remove. * cpplib.h: Update include guards. Include tree-core.h and c-rid.h. (cpp_hashnode, cpp_token, NODE_LEN, NODE_NAME, cpp_forall_identifiers, cpp_create_reader): Update. (C_RID_CODE, cpp_make_node): New. (c_common_identifier): New identifier node for C front ends. * cppmain.c (main): Update. * fix-header.c (read_scan_file): Update. * flags.h (id_clash_len): Make unsigned. * ggc.h (ggc_mark_nonnull_tree): New. * hashtable.c: New. * hashtable.h: New. * stringpool.c: Update comments and copyright. Update to use hashtable.c. * toplev.c (approx_sqrt): Move to hashtable.c. (id_clash_len): Make unsigned. * toplev.h (ident_hash): New. * tree.c (gcc_obstack_init): Move to hashtable.c. * tree.h: Include hashtable.h. (IDENTIFIER_POINTER, IDENTIFIER_LENGTH): Update. (GCC_IDENT_TO_HT_IDENT, HT_IDENT_TO_GCC_IDENT): New. (struct tree_identifier): Update. (make_identifier): New. cp: * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update. (C_RID_CODE): Remove. * lex.c (cxx_init_options): Call set_identifier_size. Update. (init_parse): Don't do it here. objc: * objc-act.c (objc_init_options): Call set_identifier_size. Update. From-SVN: r42334
2001-04-19toplev.h (struct lang_hooks): Allow decode_option to indicate that ↵Mark Mitchell1-1/+6
language-independent processing should not... * toplev.h (struct lang_hooks): Allow decode_option to indicate that language-independent processing should not be done. * toplev.c (main): Adjust accordingly. * top.c (ffe_decode_option): Do not permit language-independent processing for -ffixed-line-length. From-SVN: r41427
2001-04-11Makefile.in (ifcvt.o): Depend on toplev.h.Kaveh R. Ghazi1-0/+10
* Makefile.in (ifcvt.o): Depend on toplev.h. * c-semantics.c: Include expr.h. * ifcvt.c: Include toplev.h. * expr.h (rtx_equal_p): Delete prototype. * rtl.h (exact_log2_wide, floor_log2_wide, permalloc, protect_from_queue, gen_jump, gen_beq, gen_bge, gen_ble, eliminate_constant_term, expand_complex_abs, find_single_use, make_tree, init_expr_once, init_optabs, supports_one_only): Likewise. * tree.h (exact_log2_wide, floor_log2_wide, expand_null_return, rest_of_type_compilation, emit_queue, do_pending_stack_adjust, expand_assignment, store_expr, emit_line_note_after, emit_line_note_force, split_specs_attrs, label_rtx): Likewise. * toplev.h (exact_log2_wide, floor_log2_wide): Add prototype. cp: * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H). * semantics.c: Include expr.h. java: * Make-lang.in (java/boehm.o): Depend on toplev.h. * boehm.c: Include toplev.h. From-SVN: r41256
2001-03-28toplev.h (fatal_error): Add ATTRIBUTE_NORETURN.Kaveh R. Ghazi1-0/+1
* toplev.h (fatal_error): Add ATTRIBUTE_NORETURN. * tradcif.y (yyerror): Likewise. Add format specifier in call to `error'. * tradcpp.c (macroexpand): Likewise for call to `error_with_line'. From-SVN: r40939
2001-03-10toplev.c (file_name_nondirectory): Remove.Neil Booth1-1/+0
* toplev.c (file_name_nondirectory): Remove. * toplev.h: Similarly. * dwarf2out.c (compute_section_prefix): Use lbasename instead of file_name_nondirectory. * cp/lex.c: Delete duplicate pending_lang_change. * cp/lex.c (handle_pragma_interface, handle_pragma_implementation): Similarly. * cp/repo.c (get_base_filename, open_repo_file): Similarly. * cp/cp-tree.h: Remove file_name_nondirectory prototype. From-SVN: r40369
2001-03-07Brad's -ffast-math breakup.Brad Lucier1-0/+6
From-SVN: r40300
2001-03-05Put main() in a separate file, so that the languageFergus Henderson1-0/+1
front-end can use a different main(). * main.c: New. * toplev.c: (main): Rename as toplev_main. * toplev.h: Declare toplev_main. * Makefile.in (OBJS): add toplev.o. (BACKEND): remove toplev.o, add main.o. From-SVN: r40247
2001-02-23diagnostic.c (trim_filename): No longer static.Richard Kenner1-0/+1
* diagnostic.c (trim_filename): No longer static. * toplev.h (trim_filename): Declare. * rtl.c (rtl_check_failed_bounds): Call internal_error. (rtl_check_failed_type1, rtl_check_failed_type2): Likewise. (rtl_check_failed_code1, rtl_check_failed_code2): Likewise. (rtvec_check_failed_bounds): Likewise. * tree.c (tree_check_failed, tree_class_check_failed): Likewise. From-SVN: r40016
2001-02-16dwarf2out.c (add_bound_info): Don't crash if SAVE_EXPR_RTL is NULL.Jason Merrill1-0/+2
* dwarf2out.c (add_bound_info): Don't crash if SAVE_EXPR_RTL is NULL. (gen_subprogram_die): Don't abort on seeing a second definition if the previous one was abstract. Don't replace an abstract instance in the lookup table. * dwarf2out.c (dwarf2out_abstract_function): Rename from gen_abstract_function. * dwarf2out.h: Declare it. * toplev.c (note_outlining_of_inline_function): New fn. * toplev.h: Declare it. * integrate.c (output_inline_function): Call it. * c-decl.c (duplicate_decls): Call it when redefining an extern inline. Don't inline the new defn. From-SVN: r39763
2001-02-12toplev.c (push_float_handler): Remove.Kazu Hirata1-2/+0
2001-02-12 Kazu Hirata <kazu@hxi.com> * toplev.c (push_float_handler): Remove. (pop_float_handler): Remove. * toplev.h: Remove prototypes for the above functions. From-SVN: r39601
2001-02-04diagnostic.h (set_internal_error_function): Renamed.Richard Kenner1-26/+29
* diagnostic.h (set_internal_error_function): Renamed. * toplev.h (internal_error): Renamed from fatal. (pfatal_with_name): Deleted. (fatal_io_error): Now has printf-style arguments. * diagnostic.c (pfatal_with_name): Deleted. (fatal_io_error): Rework to have args in printf-style. (set_internal_error_function): Renamed from set_fatal_function. (internal_error): Renamed from fatal. (error_recursion, fancy_abort): Call internal_error instead of fatal. * dwarf2out.c (get_cfa_from_loc_descr): Likewise. * emit-rtl.c (gen_realpart, gen_imagpart): Likewise. * expr.c (check_max_integer_computation_mode, expand_expr): Likewise. * flow.c (verify_flow_info): Likewise. * config/arm/arm.c (thumb_unexpanded_epilogue): Likewise. * config/mips/mips.c (save_restore_insns): Likewise. * cp/init.c (build_java_class_ref): Likewise. (dsp16xx_reg_class_from_letter): Likewise. (limit_reload_class, double_reg_to_memory): Likewise. (print_operand_address, emit_1600_code_shift): Likewise. (gen_tst_reg, gen_compare_reg): Likewise. * config/m68hc11/m68hc11.c (m68hc11_emit_libcall): Likewise. * cp/decl.c (pushdecl): Likewise. * java/check-init.c (check_init): Likewise. * java/expr.c (java_lang_expand_expr): Likewise. * java/jcf-parse.c (get_constant): Likewise. * java/mangle.c (java_mangle_decl): Likewise. * java/parse.y (make_nested_class_name, java_complete_lhs): Likewise. (operator_string): Likewise. * except.c (duplicate_eh_handlers): Call abort instead of fatal. * flow.c (verify_flow_info): Likewise. * ch/convert.c (convert): Likewise. * ch/except.c (pop_handler, chill_check_no_handlers): Likewise. * ch/expr.c (chill_expand_expr): Likewise. * ch/parse.c (peek_token_, pushback_token, require): Likewise. * config/arm/arm.c (thumb_load_double_from_address): Likewise. * config/avr/avr.c (pttreg_to_str, unique_section): Likewise. (avr_normalize_condition): Likewise. * config/c4x/c4x.c (c4x_emit_libcall, c4x_valid_operands): Likewise. * config/dsp16xx/dsp16xx.c (dsp16xx_reg_class_from_letter): Likewise. (limit_reload_class, double_reg_to_memory): Likewise. (print_operand_address, emit_1600_code_shift): Likewise. (gen_tst_reg, gen_compare_reg): Likewise. * config/m68hc11/m68hc11.c (m68hc11_emit_libcall): Likewise. * cp/decl.c (pushdecl): Likewise. * java/check-init.c (check_init): Likewise. * java/class.c (build_class_ref): Likewise. * java/constants.c (write_constant_pool): Likewise. * java/decl.c (start_java_method): Likewise. * java/expr.c (push_type, java_stack_pop, java_stack_swap): Likewise. (java_stack_dup, encode_newarray_type): Likewise. (build_java_array_length_access): Likewise. (build_java_check_indexed_type, expand_java_pushc): Likewise. (build_java_soft_divmod, build_invokeinterface): Likewise. * java/java-tree.h (INNER_CLASS_P): Likewise. * java/jcf-parse.c (parse_signature, get_name_constant): Likewise. (give_name_to_class, get_class_constant): Likewise. * java/jcf-write.c (CHECK_PUT, CHECK_OP, get_access_flags): Likewise. (find_constant_index, generate_bytecode_conditional): Likewise. (generate_bytecode_insns, perform_relocations): Likewise. * java/lex.c (java_unget_unicode, java_lex): Likewise. * java/mangle.c (mangle_type, mangle_record_type): Likewise. (mangle_pointer_type, mangle_array_type, init_mangling): Likewise. (finish_mangling): Likewise. * java/parse.h (MARK_FINAL_PARMS): Likewise. * java/parse.y (pop_current_osb, unreachable_stmt_error): Likewise. (obtain_incomplete_type, java_complete_class): Likewise. (java_check_regular_methods, java_complete_expand_method): Likewise. (cut_identifier_in_qualified, check_deprecation): Likewise. (patch_invoke, find_applicable_accessible_methods_list): Likewise. (java_complete_lhs, lookup_name_in_blocks): Likewise. (check_final_variable_indirect_assignment, build_unaryop): Likewise. * java/typeck.c (set_local_type, parse_signature_type): Likewise. (parse_signature_string, build_java_signature): Likewise; (set_java_signature): Likewise. * java/verify.c (type_stack_dup, CHECK_PC_IN_RANGE): Likewise. * c-parse.in (methoddef): Call fatal_error instead of fatal. * objc/objc-act.c (build_ivar_chain): Likewise. * cp/except.c (decl_is_java_type): Likewise. * cp/init.c (build_java_class_ref): Likewise. * cp/init.c (build_new_1): Likewise. * f/com.c (ffecom_init_0): Likewise. * java/class.c (add_method, build_static_field_ref): Likewise. * java/expr.c (build_known_method_ref, expand_invoke): Likewise. * java/jcf-parse.c (get_constant, jcf_parse): Likewise. * java/lex.c (java_new_new_lexer): Likewise. * java/jv-scan.c (main): Likewise. (fatal_error): Renamed from fatal. * dwarfout.c (dwarfout_init): Call fatal_io_error instead of pfatal_with_name. * graph.c (clean_graph_dump_file): Likewise. * profile.c (init_branch_prob): Likewise. * ch/grant.c (write_grant_file): Likewise. * ch/lex.c (init_parse, same_file, yywrap): Likewise. * f/com.c (init_parse): Likewise. * java/jcf-parse.c (yyparse): Likewise. * objc/objc-act.c (objc_init): Likewise. * java/jcf-parse.c (jcf_parse_source): Call fatal_io_error, not fatal. (yyparse): Likewise. * java/jcf-write.c (make_class_file_name, write_classfile): Likewise. * java/lex.c (java_get_line_col): Likewise. * hash.c (hash_allocate): Don't check for failure returns from obstack functions that can't fail. (hash_table_init_n, hash_table_init): Likewise; also now return void. * hash.h (hash_table_init_n, hash_table_init): Now return void. * cp/decl.c (build_typename_type): hash_table_init now returns void. * ch/lang.c (GNU_xref_begin, GNU_xref_end): Deleted. * ch/lex.c (convert_bitstring): Delete check for alloca failure. * config/dsp16xx/dsp16xx.c (dsp16xx_invalid_register_for_compare): Deleted. * config/dsp16xx/dsp16xx.md (unnamed cmphi): Call abort instead of it. * f/com.c (ffecom_decode_include_option_): Make errors non-fatal. * f/lex.c (ffelex_cfelex_, ffelex_get_directive_line_): Likewise. (ffelex_hash_): Likewise. * config/arm/arm.c (arm_override_options): Likewise. * config/avr/avr.c (avr_override_options): Likewise. * config/c4x/c4x.c (c4x_expand_prologue): Likewise. * config/dsp16xx/dsp16xx.c (function_prologue): Likewise. * config/h8300/h8300.c (h8300_init_once): Likewise. * config/mips/mips.c (override_options): Likewise. * config/i386/i386.c (override_options): Likewise, rework. * config/m68k/m68k.c (override_options): Likewise. * cp/decl.c (init_decl_processing): Likewise. * java/jcf-parse.c (load_class): Likewise. * config/dsp16xx/dsp16xx.c (print_operand): Call output_operand_lossage instead of fatal. * config/mips/mips.c (print_operand): Likewise. * java/lex.c (byteswap_init, need_byteswap): Only #ifdef HAVE_ICONV. * objc/objc_act.c (objc_check_decl): Remove unneeded fatal call. (get_object_reference): Likewise. From-SVN: r39443
2001-01-10c-lang.c (lang_hooks): Update.Neil Booth1-0/+10
* c-lang.c (lang_hooks): Update. (lang_decode_option): Remove. (lang_init_options): Rename c_init_options. * toplev.c (main): Use lang_hooks for lang_init_options and lang_decode_option. * toplev.h (lang_hooks): Add 2 new hooks. * tree.h: Remove lang_init_options and lang_decode_option. * cp/cp-tree.h (lang_decode_option): Rename cxx_decode_option. * cp/decl2.c: Similarly. * cp/lex.c (lang_init_options): Rename cxx_init_options. (lang_hooks): Update. * f/com.c (f_init, f_finish): Rename ffe_init, ffe_finish for consistency. (lang_init_options): Rename ffe_init_options. (lang_hooks): Update. (lang_decode_option): Remove. * java/lang.c (lang_init_options): Rename java_init_options. (lang_decode_option): Rename java_decode_option. (lang_hooks): Update. * objc/objc-act.c (lang_init_options): Rename objc_init_options. (lang_decode_option): Rename objc_decode_option. (lang_hooks): Update. From-SVN: r38856
2001-01-09c-lang.c (lang_hooks): Update.Neil Booth1-2/+8
* c-lang.c (lang_hooks): Update. (lang_init): Rename c_init. (lang_finish): Remove. * toplev.c (compile_file): Use lang_hooks for lang_init () and lang_finish (). * toplev.h (lang_hooks): Add init () and finish (). * tree.h (lang_init, lang_finish): Remove. * cp/tree.h (lang_init, lang_finish): Remove. * cp/decl2.c (cxx_post_options, lang_hooks): Move to cp/lex.c. * cp/lex.c (cxx_init, cxx_finish, cxx_post_options, lang_hooks): New. (lang_init, lang_finish): Remove. * f/com.c (lang_init, lang_finish): Rename f_init, f_finish. (lang_hooks): Update. * java/lang.c (lang_init): Rename java_init. (lang_finish): Remove. (lang_hooks): Update. * objc/objc-act.c (lang_init): Rename objc_init. (lang_finish): Remove. (lang_hoooks): Update. From-SVN: r38828
2001-01-07toplev.c (main): Call the front-end specific post_options hook if one is given.Neil Booth1-0/+10
* toplev.c (main): Call the front-end specific post_options hook if one is given. * toplev.h (struct_lang_hooks, lang_hooks): New. * c-lang.c (c_post_options, lang_hooks): Implement lang_hooks for the C front end. * cp/decl2.c (cxx_post_options, lang_hooks): Implement lang_hooks for the C++ front end. * objc/objc-act.c (objc_post_options, lang_hooks): Implement lang_hooks for the ObjC front end. * f/com.c (lang_hooks): Hooks for the Fortran front end. * java/lang.c (lang_hooks): Hooks for the Java front end. From-SVN: r38757
2001-01-07c-lex.c (init_c_lex): Request #define / #undef callbacks for verbose ↵Neil Booth1-2/+2
DWARF[2] debugging. * c-lex.c (init_c_lex): Request #define / #undef callbacks for verbose DWARF[2] debugging. (cb_define, cb_undef): The new callbacks. * toplev.h (debug_define, debug_undef): Make const correct. * toplev.c (debug_define, debug_undef): Similarly. Do not perform the verbosity tests here anymore. From-SVN: r38756
2000-12-29toplev.h (extern really_sorry): Remove extern declaration for nonexistent ↵Jeffrey Oldham1-2/+0
function. 2000-12-28 Jeffrey Oldham <oldham@codesourcery.com> * toplev.h (extern really_sorry): Remove extern declaration for nonexistent function. From-SVN: r38520
2000-08-28[multiple changes]Jason Merrill1-0/+1
2000-08-28 Daniel Berlin <dberlin@redhat.com> * dwarf2out.c (DIE_LABEL_PREFIX): Remove leading "__". (print_die): If we don't know the offset of the target die, try the symbol. Add a trailing newline. (reverse_all_dies): New fn. (dwarf2out_finish): Call it. (break_out_includes): Reorganize for clarity. (add_sibling_attributes): Don't call reverse_die_lists. (output_comp_unit): Rename from output_comdat_comp_unit. Use for primary CU, too. * flags.h: Add flag_eliminate_dwarf2_dups. * toplev.c (f_options): Support -feliminate-dwarf2-dups. 2000-08-28 Jason Merrill <jason@redhat.com> * dwarf2.h (DW_TAG_GNU_BINCL, DW_TAG_GNU_EINCL): New tags. * dwarf2out.c: #include "md5.h". (DIE_LABEL_PREFIX): New macro. (dw_val_struct): Add 'external' flag to val_die_ref. (add_AT_die_ref, AT_ref): Adjust. (AT_ref_external, set_AT_ref_external): New fns. (build_abbrev_table): Call set_AT_ref_external. (value_format): Call AT_ref_external. (die_struct): Add die_symbol field. (new_die): Clear it. (dwarf_tag_name): Handle BINCL/EINCL. (dwarf2out_start_source_file): Add BINCL DIE. (dwarf2out_end_source_file): Add EINCL DIE. (push_new_compile_unit, pop_compile_unit, clear_die_sizes): New fns. (loc_checksum, attr_checksum, die_checksum): New fns. (is_type_die, is_comdat_die, is_symbol_die): New fns. (compute_section_prefix, assign_symbol_names): New fns. (gen_internal_sym, output_die_symbol, output_symbolic_ref): New fns. (output_die): Call output_die_symbol and AT_ref_external. (output_comdat_comp_unit): New fn, split out from... (dwarf2out_finish): ...here. Also call add_sibling_attributes for secondary CUs. (output_pubnames, output_aranges): Abort if we see entries from secondary CUs. * toplev.h: Declare file_name_nondirectory. * toplev.c (file_name_nondirectory): New fn, moved from C++ frontend. (rest_of_type_compilation): Call dwarf2out_decl if at toplevel. (debug_start_source_file): Call dwarf2out_start_source_file regardless of debug verbosity. (debug_end_source_file): Similarly. * tree.h: Declare clean_symbol_name. * tree.c (clean_symbol_name): Split out from... (get_file_function_name_long): ...here. * dwarf2out.c (new_loc_descr): Use calloc. (splice_child_die): Remove the die from the right parent. (gen_struct_or_union_die): Don't add AT_name to a specification DIE. gcc/cp: 2000-08-28 Jason Merrill <jason@redhat.com> * lex.c (file_name_nondirectory): Move to toplev.c. libiberty: 2000-08-28 Jason Merrill <jason@redhat.com> * Makefile.in (REQUIRED_OFILES): Add md5.o. (CFILES): Add md5.c. * md5.c: New file. include: 2000-08-28 Jason Merrill <jason@redhat.com> * md5.h: New file. gcc/cp: 2000-08-28 Jason Merrill <jason@redhat.com> * cp-tree.h (LOCAL_CLASS_P): New macro. * class.c (finish_struct_1): Use it. From-SVN: r36022
2000-07-21diagnostic.c (trim_filename, [...]): Moved here from rtl.c.Zack Weinberg1-10/+3
* diagnostic.c (trim_filename, fancy_abort): Moved here from rtl.c. (fatal_function, set_fatal_function): Removed. (fatal): Don't prepare for or call the fatal_function. (diagnostic_lock, error_recursion): New. (diagnostic_for_decl, report_diagnostic): Guard against re-entering the error reporting routines. (fancy_abort): Assume function is not NULL. * errors.c (fancy_abort): New. Assume function is not NULL. * tradcpp.c (fancy_abort): Assume function is not NULL. * system.h: Provide default definition of __FUNCTION__. * rtl.h: Use __FUNCTION__ not __PRETTY_FUNCTION__ throughout. Always use __FUNCTION__ in definition of abort. * tree.h: Likewise. * varray.h: Likewise. * toplev.h: Likewise. Don't prototype set_fatal_function. From-SVN: r35170
2000-07-12c-typeck.c (pedwarn_c99): Move toGabriel Dos Reis1-3/+0
2000-07-12 Gabriel Dos Reis <gdr@codesourcery.com> * c-typeck.c (pedwarn_c99): Move to * c-errors.c: ... Here. * toplev.h (verror, vwarning, vpedwarn): Remove prototypes. * diagnostic.c (verror, vwarning, vpedwarn): Make static. * Makefile.in (C_AND_OBJC_OBJS): Include c-errors.o (c-errors.o): List dependency. From-SVN: r34984
2000-06-26[multiple changes]Richard Henderson1-0/+3
2000-06-26 Joseph S. Myers <jsm28@cam.ac.uk> * c-decl.c (grokdeclarator): Don't warn about `long long' in C99. Make warnings about implicit int be pedwarns in C99. Don't warn about duplicate type qualifiers in C99. (start_function): Make warning about implict int return type be a pedwarn in C99. * c-lex.c (yylex): Don't warn about `long long' in C99. * c-typeck.c (c_expand_return): In C99, always pedwarn about `return' with no value in function returning non-void. 2000-06-26 Richard Henderson <rth@cygnus.com> * c-typeck.c (pedwarn_c99): New. * diagnostic.c (verror, vwarning, vpedwarn): Export. * toplev.h: Prototype them. From-SVN: r34713
2000-06-06diagnostic.c (output_maximum_width): Remove.Gabriel Dos Reis1-1/+0
2000-06-06 Gabriel Dos Reis <gdr@codesourcery.com> * diagnostic.c (output_maximum_width): Remove. (doing_line_wrapping): Tweak. (diagnostic_buffer): New object. (global_output_buffer): New object. (output_destroy_prefix): New function. (default_initialize_buffer): Likewise. (reshape_diagnostic_buffer): Likewise. (initialize_diagnostics): Likewise. (output_clear): Tweak. (line_wrapper_printf): Adjust call to init_output_buffer. (vline_wrapper_message_with_location): Likewise. Use output_destroy_prefix. (v_message_with_decl): Likewise. * diagnostic.h (struct output_buffer): Constify prefix. (init_output_buffer, output_get_prefix): Constify. (diagnostic_message_length_per_line): Likewise. (reshape_diagnostic_buffer): Declare. (default_initialize_buffer): Declare. (initialize_diagnostics): Declare. (diagnostic_buffer): Declare new obbject. * toplev.c: #include diagnostic.h (display_help): Document diagnostic formatting options. (decode_f_option): Handle diagnostic formatting options. (main): Setup initialization for diagnostic messages outputter. * toplev.h (set_message_length): Remove. * Makefile.in (toplev.o): Depends upon diagnostic.h * invoke.texi : Document diagnostics formatting options. cp/ 2000-06-06 Gabriel Dos Reis <gdr@codesourcery.com> * lex.c (lang_init_options): Tweak. * decl2.c: Remove #inclusion of diagnostic.h (lang_decode_option): Move diagnostic formatting options to toplevel. * lang-options.h: Remove documentation for diagnostic options. * Makefile.in (lex.o): Depends upon diagnostic.h From-SVN: r34435
2000-05-28toplev.h (skip_leading_substring): New macro.Gabriel Dos Reis1-0/+5
2000-05-28 Gabriel Dos Reis <gdr@codesourcery.com> * toplev.h (skip_leading_substring): New macro. * toplev.c (decode_f_option): Use skip_leading_substring instead of strncmp. (decode_W_option): Likewise. cp/ 2000-05-28 Gabriel Dos Reis <gdr@codesourcery.com> * decl2.c (lang_decode_option): Use skip_leading_substring instead of plain strncmp. From-SVN: r34240
2000-05-09top level:Zack Weinberg1-1/+1
* Makefile.in (WARN_CFLAGS): Add -Wwrite-strings. (tree.o): Depend on output.h. * c-decl.c (pending_invalid_xref_file, current_function_prototype_file): Constify. (pushdecl): Constify a local char *. (define_label): Constify filename parameter. * c-lex.c (init_parse): Constify parameter and return value. * c-typeck.c (c_expand_asm_operands): Constify filename parameter. * c-tree.h: Update prototypes. * c-parse.in: Constify filename member of %union, and if_stmt_file. * c-parse.y, c-parse.c, c-parse.h, objc/objc-parse.y, objc/objc-parse.c: Regenerate. * dwarfout.c (dwarfout_init): Constify main_input_filename parameter. * dwarfout.h: Update prototypes. * expr.c (expand_expr): Constify a local char *. * flags.h: Constify main_input_filename. * function.c (expand_function_end): Constify filename parameter. * genrecog.c (make_insn_sequence): Use a character array for c_test_pos. (main): Remove unused variables. * input.h: Constify input_filename, main_input_filename, and file_stack.name. Update prototypes. * output.h: Declare first_global_object_name and weak_global_object_name here, as const char *. * stmt.c (expand_asm_operands): Constify filename parameter. * toplev.c (compile_file, push_srcloc, debug_start_source_file): Constify filename parameter. (input_filename, main_input_filename): Constify. * toplev.h: Update prototypes. * tree.c: Include output.h. Don't declare first_global_object_name or weak_global_object_name. Clean up string bashing in get_file_function_name_long. * tree.h (struct tree_decl): Constify filename member. (input_filename): Constify. Update prototypes. * varasm.c (first_global_object_name, weak_global_object_name): Constify. (assemble_start_function, assemble_variable): Clean up string bashing. * gcc.c: Constify all spec-related strings initialized, transitively, from string constants. Constify all strings and string variables related to multilibs. (set_spec, read_specs): Cast argument to free to PTR. (used_arg): Do not modify multilib_matches. Use strncmp plus length comparison to compare multilib switches. * genmultilib: Constify everything declared in multilib.h. ch: * ch-tree.h: Update prototypes. Remove prototypes for functions declared elsewhere. * decl.c (define_label): Constify filename parameter. * grant.c (globalize_decl, set_default_grant_file): Constify local char * variables. Don't declare first_global_object_name or asm_out_file. * lang.c (chill_real_input_filename): Constify. * lex.c (init_parse): Constify parameter and return value. * parse.c: Don't declare input_filename. (ch_expand_asm_operands): Constify filename parameter. (parse_multi_dimension_case_action): Constify local char *. * satisfy.c (safe_satisfy_decl): Constify local char *. cp: * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file, and pending_inline.filename. Update prototypes. * decl.c (define_label): Constify filename parameter. * decl2.c (warn_if_unknown_interface): Constify local char *. * input.c Constify input_source.filename. Don't declare input_filename or lineno. Constify filename parameter to feed_input. * lex.c (init_parse): Constify parameter and return value. (cp_pragma_interface, cp_pragma_implementation): Constify filename argument. (reinit_parse_for_method, reinit_parse_for_block, reinit_parse_for_expr, feed_defarg, handle_cp_pragma): Constify local char *. * pt.c: Don't declare lineno or input_filename. (print_template_context, tsubst_friend_function, tsubst_decl, tsubst, instantiate_decl): Constify local char *. * semantics.c (expand_body): Constify local char *. * tree.c (build_srcloc): Constify filename parameter. * typeck.c (c_expand_asm_operands): Constify filename parameter. f: * com.c (ffecom_subscript_check_): Constify array_name parameter. Clean up string bashing. (ffecom_arrayref_, ffecom_char_args_x_): Constify array_name parameter. (ffecom_do_entry_, ffecom_gen_sfuncdef_, ffecom_start_progunit_, ffecom_sym_transform_, ffecom_sym_transform_assign_): Constify local char *. (init_parse): Constify parameter and return value. * lex.c: Include dwarfout.h instead of prototyping dwarfout_* functions here. (ffelex_file_pop_, ffelex_file_push_): Constify filename parameter. (ffelex_hash_, ffelex_include_): Constify local char *. * std.c (ffestd_exec_end): Constify local char *. * where.c (ffewhere_file_new): Constify filename parameter. * where.h: Update prototypes. java: * check_init.c (check_init): Constify local char *. * class.c (push_class): Constify local char *. * java_tree.h: Update prototypes. * jcf-io.c (open_class): Constify filename parameter and return value. (find_class): Remove redundant string copy. Cast return from open_class. * jcf-parse.c (read_class, parse_class_file, yyparse): Constify local char *. * jcf-write.c (generate_bytecode_insns, generate_classfile): Constify local char *. * jcf.h (JCF): Constify filename and classname. (JCF_FINISH): Cast args to FREE to char * when appropriate. * lang.c (init_parse): Constify parameter and return value. * lex.c (java_get_line_col): Constify filename parameter. * parse.h: Constify parser_ctxt.filename. Update prototypes. * parse.y (java_parser_context_suspend, issue_warning_error_from_context, safe_layout_class): Constify local char *. * parse.c: Regenerate. From-SVN: r33804
2000-05-02toplev.c (debug_ignore_block): Return int.Jason Merrill1-1/+1
* toplev.c (debug_ignore_block): Return int. * dwarf2out.c (dwarf2out_ignore_block): Likewise. * toplev.h, dwarf2out.h: Adjust. * emit-rtl.c (remove_unnecessary_notes): Test return value. * emit-rtl.c (remove_unnecessary_notes): Fix spelling of "necessary". * toplev.c, final.c, rtl.h: Adjust. From-SVN: r33616
2000-04-28Makefile.in (OBJS): Add timevar.o.Alex Samuel1-4/+0
hangeLog: * Makefile.in (OBJS): Add timevar.o. (toplev.o): Depend on timevar.h. (ggc-simple.o): Likewise. (ggc-page.o): Likewise. (timevar.o): New rule. (timevar.h): New rule. * timevar.h: New file. * timevar.c: Likewise. * timevar.def: Likewise. * toplev.h (gc_time, parse_time, varconst_time): Remove. * toplev.c: Use timevar_push and timevar_pop instead of TIMEVAR throughout. (TIMEVAR): Remove macro. (gc_time, parse_time, varconst_time, integration_time, jump_time, cse_time, gcse_time, loop_time, cse2_time, branch_prob_time, flow_time, combine_time, regmove_time, sched_time, local_alloc_time, global_alloc_time, flow2_time, peephole2_time, sched2_time, dbr_sched_time, reorder_blocks_time, rename_registers_time, shorten_branch_time, stack_reg_time, to_ssa_time, from_ssa_time, final_time, symout_time, dump_time, all_time): Remove. (compile_file): Don't initialize time variables. Call init_timevar and start TV_TOTAL timer. Call timevar_print instead of many calls to print_time. (rest_of_compilation): Add timing for reload_cse_regs. (get_run_time): Removed to timevar.c. (print_time): Likewise. (get_run_time): Implement using TV_TOTAL time variable. (print_time): Get total run time from get_run_time. * ggc-page.c (ggc_collect): Push and pop TV_GC instead of computing elapsed time explicitly. * ggc-simple.c (ggc_collect): Likewise. (gc_time): Remove declaration. cp/ChangeLog: * lex.c (my_get_run_time): Remove. (init_filename_times): Use get_run_time instead of my_get_run_time. (check_newline): Likewise. (dump_time_statistics): Likewise. * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead of computing elapsed time explicitly. From-SVN: r33496
2000-04-15Makefile.in (ggc-page.o): Now includes toplev.h.Richard Kenner1-0/+4
* Makefile.in (ggc-page.o): Now includes toplev.h. * ggc-page.c (toplev.h): Now included. (gc_time): Remove declaration. (ggc_collect): TIME now long. * toplev.c (parse_time, varasm_time, gc_time): Still global; all others static. * toplev.h (gc_time, parse_time, gc_time): New declarations. * cp/decl2.c (parse_time, varconst_time): Delete declarations. (finish_file): Delete LINENO declaration. START_TIME and THIS_TIME now long. From-SVN: r33169
2000-04-15toplev.c: Make *_time variable long to reduce chance of overflow.Richard Kenner1-1/+1
* toplev.c: Make *_time variable long to reduce chance of overflow. (TIMEVAR): Likewise for `otime'. (print_time): Arg is now long; compute percentage in FP and round. * toplev.h (print_time): Arg is long. * tree.c: Minor whitespace changes. From-SVN: r33168
2000-03-28expr.c (store_constructor): SIZE now signed.Richard Kenner1-1/+1
* expr.c (store_constructor): SIZE now signed. For EXPR_SIZE, don't evaluate size; just needed if constant. * fold-const.c (fold): Fix a number of cases when folded tree is wrong type. * function.c (flush_addressof): Reenable. * tree.h (flush_addressof): Likewise. * toplev.c (independent_decode_option): Look at strings_processed. * config/alpha/alpha.h (MINIMUM_ATOMIC_ALIGNMENT): Cast to unsigned. From-SVN: r32783
2000-03-03dwarf2out.c (dwarf2out_frame_debug): Add cast to silence warning.Jason Merrill1-0/+1
* dwarf2out.c (dwarf2out_frame_debug): Add cast to silence warning. (dwarf2out_decl): Functions can now have DECL_IGNORED_P. (gen_decl_die): Likewise. * dwarfout.c (dwarfout_file_scope_decl): Likewise. (output_decl): Likewise. * varasm.c (make_function_rtl): If we change the name used in the rtl, update DECL_ASSEMBLER_NAME accordingly. (make_decl_rtl): Likewise. * toplev.c (rest_of_compilation): Tweak formatting. * toplev.c (rest_of_compilation): find_loop_tree_blocks before remove_unnecessary_notes. (debug_ignore_block): New fn. * toplev.h: Declare it. * emit-rtl.c (remove_unncessary_notes): Call it. * dwarf2out.c (dwarf2out_ignore_block): New fn. * dwarf2out.h: Declare it. * final.c (final_start_function): Don't call remove_unnecessary_notes if we did insn scheduling. From-SVN: r32320
2000-02-06Makefile.in (c-common.o): Depend on $(EXPR_H).Kaveh R. Ghazi1-0/+2
* Makefile.in (c-common.o): Depend on $(EXPR_H). * c-common.c: Include expr.h. * c-pragma.c (mark_align_stack): Add prototype. * caller-save.c (add_stored_regs): Likewise. * combine.c (record_promoted_value): Likewise. * i386.c (ix86_sched_reorder_pentium, ix86_sched_reorder_ppro): Likewise. * cppinit.c (new_pending_define): Likewise. * cpplib.c (skip_block_comment, skip_line_comment): Likewise. * dwarf2out.c (save_rtx, splice_child_die, reverse_die_lists, AT_class, AT_flag, AT_int, AT_unsigned, AT_string, AT_ref, AT_loc, AT_addr, AT_lbl, get_AT_ref, free_AT, free_die, local_scope_p, class_scope_p): Likewise. * dwarf2out.h (dwarf2out_set_demangle_name_func, dwarf2out_add_library_unit_info): Likewise. * ggc.h (ggc_page_print_statistics): Likewise. * haifa-sched.c (propagate_deps): Likewise. * reg-stack.c (next_flags_user, record_label_references): Likewise. * rtl.h (set_stack_check_libfunc): Likewise. * toplev.h (set_fatal_function): Likewise. * toplev.c (set_fatal_function): Delete prototype. * diagnostic.c: Deconstify functions returning malloc'ed ptrs. From-SVN: r31810
2000-01-17Update copyrightsKaveh Ghazi1-1/+1
From-SVN: r31465
2000-01-17toplev.c: PROTO -> PARAMS.Kaveh R. Ghazi1-45/+45
* toplev.c: PROTO -> PARAMS. * toplev.h: Likewise. * tree.c: Likewise. * tree.h: Likewise. * unroll.c: Likewise. * varasm.c: Likewise. * varray.c: Likewise. * varray.h: Likewise. From-SVN: r31462