summaryrefslogtreecommitdiff
path: root/gcc/langhooks.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge tree-ssa-20020619-branch into mainline.dnovillo2004-05-131-5/+30
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@81764 138bc75d-0d04-0410-961f-82ee72b054a4
* PR 12267, 12391, 12560, 13129, 14114, 14113zack2004-03-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * c-tree.h: Forward declare struct c_binding. Declare c_override_bindings_to_false. Update prototypes. (struct lang_identifier): Update comments. Change fields to be struct c_binding *. (IDENTIFIER_SYMBOL_VALUE, IDENTIFIER_TAG_VALUE) (IDENTIFIER_LABEL_VALUE, C_DECL_INVISIBLE) (KEEP_NO, KEEP_YES, KEEP_MAYBE): Delete. (C_DECL_IN_EXTERNAL_SCOPE, C_DECL_DECLARED_BUILTIN): New. * c-common.h: Update prototypes. * c-decl.c (struct c_scope): Update commentary. Remove names, names_last, parms, parms_last, tags, and shadowed fields. Add bindings and depth fields. (scope_freelist): Move to more appropriate location. (c_print_identifier): Update for changes to struct lang_identifier. (objc_mark_locals_volatile): Update for new bindings structures. (global_bindings_p): Honor c_override_global_bindings_to_false. (pushlevel): Rename to push_scope; take no arguments; use the scope_freelist; initialize scope->depth and check for overflow. (poplevel): Rename to pop_scope; totally rewritten for new bindings structures. (diagnose_mismatched_decls): Use C_DECL_DECLARED_BUILTIN, not C_DECL_INVISIBLE, for certain decisions. Adjust some diagnostics. Improve some commentary. Adjust handling of forward parm decls. (merge_decls): Set C_DECL_DECLARED_BUILTIN when appropriate. Preserve C_DECL_IN_EXTERNAL_SCOPE. (warn_if_shadowing): Correct indentation. Improve diagnostics. (pushdecl): Remove unnecessary assertion. Short-circuit anonymous decls. Rewrite for new bindings structures. Improve commentary. Eliminate the copy_node call. (implicit_decl_warning): Use the "diag" idiom (as seen in locate_old_decl) to reduce code duplication; call locate_old_decl if appropriate. Relocate to remove need for forward declaration. (implicitly_declare): Adjust for new bindings structures. Kludge around Objective-C not-really-builtin functions. (undeclared_variable): Improve diagnostics. If current_function_decl is nonnull but current_function_scope is null, use current_scope. Use bind. (lookup_tag): Adjust for new bindings structures. Kludge around Objective-C's tag declarations that wind up in the external scope. (lookup_name): Adjust for new bindings structures. Kludge around c-common.c's pseudo-typedefs that wind up in the external scope. (lookup_name_current_level): Rename lookup_name_in_scope; take a second argument indicating the scope to examine; rewrite for new bindings structures. (c_init_decl_processing): Adjust for renamed functions. Do not initialize current_file_decl, first_builtin_decl, last_builtin_decl. First scope pushed is the external scope, not the global scope. (builtin_function): Use bind, not pushdecl. Adjust other bits for new data structures. Keep track of builtins that should be made visible automatically. (start_decl): Adjust diagnostics. Remove unnecessary call to expand_decl. (grokparms): Return 0 if arg_types is error_mark_node. (get_parm_info): Rename "void_at_end" argument to "ellipsis", with reversed sense. Rewrite for new bindings structures. Do not leave any decls in the scope, to prevent pop_scope from doing contradictory things with them. (finish_struct, finish_enum): Remove redundant diagnostics. (build_enumerator): Don't cascade diagnostics for error_mark_node. Mark location where -pedantic changes the meaning of the program. (store_parm_decls_newstyle, store_parm_decls_oldstyle): Load the parameter decls into the function's scope structure using bind. Warn here about function definitions in the wrong style. Adjust diagnostics. (store_parm_decls): Correct the determination of whether a function was defined with a prototype. (c_write_global_declarations): Operate on all file decls and on the external scope. Split body of the loop to... (c_write_global_declarations_1): ... this new function, to avoid code duplication. (truly_local_externals, first_builtin_decl, last_builtin_decl) (make_scope, pop_scope, in_parm_level_p, set_block) (any_external_decl, record_external_decl, bind_label, getdecls) (link_hash_hash, link_hash_eq, merge_translation_unit_decls) (c_reset_state): Delete. (visible_builtins, c_override_global_bindings_to_false) (c_binding, I_SYMBOL_BINDING, I_SYMBOL_DECL, I_TAG_BINDING) (I_TAG_DECL, I_LABEL_BINDING, I_LABEL_DECL, file_scope) (external_scope, binding_freelist, bind, free_binding_and_advance) (push_file_scope, pop_file_scope): New. (pushtag, pushdecl_top_level, lookup_label, declare_label) (define_label, c_make_fname_decl, finish_decl) (mark_forward_parm_decls, build_compound_literal) (grokdeclarator, start_function, check_for_loop_decls) (identifier_global_value, record_builtin_type): Minor adjustments for new bindings structures. Improve diagnostics and commentary. * c-objc-common.c (start_cdtor, finish_cdtor): Adjust calls to pushlevel/poplevel respectively. (c_objc_common_finish_file): Don't call merge_translation_unit_decls. * c-opts.c (c_common_parse_file): Remove spurious ATTRIBUTE_UNUSED. Warn about YYDEBUG not being defined only if -dy. Remove no-longer- correct loop over multiple translation units; call fatal_error if requested to compile more than one file at once. (This disables IMA temporarily - an up-front error being preferable to a crash.) * c-parse.in (pushlevel, poplevel rules): Rename push_scope, pop_scope. (all actions): Adjust calls to pushlevel/poplevel. (parsing_iso_function_signature): Delete. (extdef_1): Fold into extdef. (old_style_parm_decls_1): Fold into old_style_parm_decls. Don't warn here about function definitions in the wrong style. (after_tyle_declarator, parm_declarator_starttypename) (parm_declarator_nostarttypename, notype_declarator): Remove commented-out productions. (parmlist_1, parmlist_2): Use make_node, not tree_cons, to create an empty TREE_LIST node. Adjust calls to get_parm_info. (parmlist_2 : ELLIPSIS): Tag the arg-info block with error_mark_node to suppress -Wold-style-definition after this error. (c_parse_file): Don't clear the binding stack or call finish_fname_decls here. Correct comment. * c-typeck.c (same_translation_unit_p): Export. (common_type): Use c_override_global_bindings_to_false, not pushlevel/poplevel/declare_parm_level. * c-lang.c: Override LANG_HOOKS_CLEAR_BINDING_STACK, LANG_HOOKS_PUSHLEVEL, LANG_HOOKS_POPLEVEL, LANG_HOOKS_SET_BLOCK, and LANG_HOOKS_GETDECLS with do-nothing stubs. * objc/objc-lang.c: Likewise. * objc/objc-act.c: Adjust all calls to pushlevel, poplevel, get_parm_info. (OBJC_VOID_AT_END): Delete; replace all uses with void_list_node. (generate_forward_declaration_to_string_table): Delete. * objc/objc-act.h (OCTI_STRG_DECL, UOBJC_STRINGS_decl): Delete. * coverage.c (create_coverage): Don't pushdecl anything. * langhooks.c (lhd_clear_binding_stack): Call lang_hooks.decls.poplevel, not poplevel. * tree.c (list_length): If ENABLE_TREE_CHECKING, abort on a circular list rather than going into an infinite loop. cp: * cp-lang.c (c_reset_state): Delete. (push_file_scope, pop_file_scope): New stubs. * parser.c (c_parse_file): Call sorry() here if called more than once. testsuite: * gcc.dg/Wold-style-definition-1.c, gcc.dg/builtins-30.c * gcc.dg/unused-4.c, gcc.dg/noncompile/label-1.c * gcc.dg/noncompile/label-lineno-1.c, objc.dg/naming-1.m: Adjust error regexps. * gcc.dg/Wshadow-2.c, gcc.dg/noncompile/incomplete-3.c * gcc.dg/noncompile/undeclared-1.c: New test cases. * gcc.dg/decl-5.c, gcc.dg/redecl-1.c: Remove XFAIL. * gcc.dg/local1.c: Add explanatory comment. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@79883 138bc75d-0d04-0410-961f-82ee72b054a4
* * alias.c (get_alias_set): Replace calls via (*lang_hooks.foo) ()sayle2004-03-141-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | with lang_hooks.foo (). * builtins.c (expand_builtin_va_arg): Likewise. * c-common.c (fname_as_string, c_common_truthvalue_conversion, c_common_type_for_mode, c_common_nodes_and_builtins, handle_mode_attribute, handle_vector_size_attribute): Likewise. * c-convert.c (convert): Likewise. * c-format.c (check_format_types): Likewise. * c-objc-common.c (c_tree_printer): Likewise. * c-typeck.c (build_unary_op, build_conditional_expr, build_binary_op): Likewise. * calls.c (try_to_integrate, expand_call, emit_library_call_value_1): Likewise. * cgraph.c (cgraph_node_name, cgraph_function_possibly_inlined_p): Likewise. * cgraphunit.c (record_call_1, cgraph_analyze_function, cgraph_expand_function): Likewise. * convert.c (convert_to_pointer, convert_to_integer): Likewise. * coverage.c (build_fn_info_type, build_ctr_info_type, build_gcov_info, create_coverage): Likewise. * dbxout.c (dbxout_init): Likewise. * diagnostic.c (diagnostic_report_current_function): Likewise. * dojump.c (do_jump): Likewise. * dwarf2out.c (dwarf2_name): Likewise. * except.c (init_eh): Likewise. * explow.c (expr_size, int_expr_size): Likewise. * expmed.c (make_tree, const_mult_add_overflow_p, expand_mult_add): Likewise. * expr.c (store_expr, store_constructor, safe_from_p, expand_expr_real, do_store_flag, try_casesi): Likewise. * function.c (push_function_context_to, pop_function_context_from, free_after_parsing, assign_stack_local_1, assign_stack_temp_for_type, put_var_into_stack, allocate_struct_function, current_function_name): Likewise. * integrate.c (copy_decl_for_inlining, expand_inline_function): Likewise. * langhooks.c (lhd_clear_binding_stack, write_global_declarations, lhd_print_error_function): Likewise. * opts.c (handle_option, decode_options): Likewise. * passes.c (open_dump_file): Likewise. * print-tree.c (print_node): Likewise. * stmt.c (expand_fixup, fixup_gotos, expand_asm_operands, expand_decl_cleanup, emit_case_nodes): Likewise. * stor-layout.c (variable_size): Likewise. * toplev.c (announce_function, wrapup_global_declarations, check_global_declarations, compile_file, default_tree_printer, process_options, lang_dependent_init, finalize): Likewise. * tree-dump.c (dequeue_and_dump): Likewise. * tree-inline.c (remap_decl, remap_block, copy_body_r, initialize_inlined_parameters, declare_return_variable, inlinable_function_p, expand_call_inline, optimize_inline_calls, walk_tree, copy_tree_r): Likewise. * tree-optimize.c (tree_rest_of_compilation): Likewise. * tree.c (decl_assembler_name, tree_size, size_in_bytes, staticp, unsafe_for_reeval, get_unwidened, get_narrower, get_callee_fndecl, variably_modified_type_p, dump_tree_statistics): Likewise. * varasm.c (assemble_variable, compare_constant, copy_constant, force_const_mem, compute_reloc_for_constant, output_constant, output_addressed_constants, initializer_constant_valid_p): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@79481 138bc75d-0d04-0410-961f-82ee72b054a4
* * ggc-common.c (ggc_alloc_cleared_stat, ggc_realloc_stat):hubicka2004-03-031-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename from ...; make statistics transparent. (ggc_alloc_cleared, ggc_realloc_stat): ... these. (loc_descriptor): New structure. (hash_descriptor, eq_descriptor, loc_descriptor, cmp_statistics, add_statistics): New static function. (ggc_record_overhead, dump_statistics): New global function. * ggc-none.c (ggc_alloc_types_stat, ggc_alloc_stat, ggc_alloc_zone_stat, ggc_alloc_cleared_stat, ggc_realloc_stat, ggc_alloc_typed_stat): Rename from ...; accept locations (ggc_alloc_types, ggc_alloc, ggc_alloc_zone, ggc_alloc_cleared, ggc_realloc, ggc_alloc_typed): ... this one. from ...; accept locations * ggc-page.c (ggc_alloc_typed_stat, ggc_alloc_zone_stat, ggc_alloc_stat): Rename from ... ; pass locations * ggc-page.c (ggc_alloc_typed, ggc_alloc_zone, ggc_alloc): ... this one. (ggc_alloc_stat): Record overehead. * ggc.h (ggc_alloc_types, ggc_alloc, ggc_alloc_zone, ggc_alloc_cleared, ggc_realloc, ggc_alloc_typed): Turn to macros (ggc_alloc_types_stat, ggc_alloc_stat, ggc_alloc_zone_stat, ggc_alloc_cleared_stat, ggc_realloc_stat, ggc_alloc_typed_stat): Declare. (dump_ggc_loc_satistics, ggc_record_overehead): Declare. * langhooks.h (lhd_make_node): Declare. (LANG_HOOKS_MAKE_TYPE): Default to new function, * langhooks.c (lhd_make_node): New. * rtl.c (rtx_alloc_stat, swallow_copy_rtx_stat): Rename from ... ; pass locations. (rtx_alloc, swallow_copy_rtx): ... this one. * rtl.h (rtx_alloc, swallow_copy_rtx): Turn to macros. * rtl.c (rtx_alloc_stat, swallow_copy_rtx_stat): Declare. * toplpev.c (finalize): Dump stats. * tree.c (make_node_stat, copy_node_stat, make_tree_vec_stat, build_tree_list_stat, tree_cons_stat, build?_stat, build_decl_stat): Rename from ... ; pass locators. (make_node, copy_node, make_tree_vec, build_tree_list, tree_cons, build?, build_decl): Declare. * tree.h (make_node_stat, copy_node_stat, make_tree_vec_stat, build_tree_list_stat, tree_cons_stat, build?_stat, build_decl_stat): Declare. (make_node, copy_node, make_tree_vec, build_tree_list, tree_cons, build?, build_decl): New macros. * Makefile.in (RTL_H, TREE_H): Add statistics.h dependency. * statistics.h: New file. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@78826 138bc75d-0d04-0410-961f-82ee72b054a4
* * alias.c, basic-block.h, c-common.c, c-common.h,kazu2004-01-211-1/+1
| | | | | | | | | | | | | | | | | | | | | c-cppbuiltin.c, c-opts.c, c-pragma.c, c-pretty-print.c, calls.c, cfg.c, cfgcleanup.c, cfgrtl.c, cgraph.h, collect2.c, combine.c, cppcharset.c, cpphash.h, cppinit.c, cpplib.c, cpplib.h, cppmacro.c, crtstuff.c, cselib.c, cselib.h, defaults.h, df.c, dominance.c, et-forest.c, expmed.c, expr.c, expr.h, fix-header.c, function.h, gcc.c, gcse.c, genattrtab.c, genautomata.c, genconditions.c, genemit.c, genflags.c, gengtype.c, gengtype.h, genopinit.c, genrecog.c, gensupport.c, ggc-zone.c, graph.c, haifa-sched.c, input.h, integrate.c, langhooks-def.h, langhooks.c, langhooks.h, line-map.c, line-map.h, local-alloc.c, optabs.c, optabs.h, postreload.c, ra.h, recog.c, reg-stack.c, regmove.c, reload.c, reorg.c, rtl.c, sched-deps.c, sched-ebb.c, sdbout.c, system.h, target.h, targhooks.c, toplev.h, tree-inline.c, unwind-pe.h, unwind.h, varray.c, varray.h: Update copyright. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@76302 138bc75d-0d04-0410-961f-82ee72b054a4
* * expr.h (expand_expr): Make it a macro, not a function.mmitchel2004-01-091-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (expand_expr_real): New function. * expr.c (store_expr): Adjust logic for deciding whether or not to copy the value returned by expand_expr. (expand_expr): Rename to ... (expand_expr_real): ... this. Add alt_rtl parameter. Adjust calls to language hooks. * c-common.h (c_expand_expr): Adjust prototype. * c-common.c (c_expand_expr): Add alt_rtl parameter. * langhooks-def.h (lhd_expand_expr): Change prototype. * langhooks.c (lhd_expand_expr): Add all_rtl parameter. * langhooks.h (lang_hooks): Change type of expand_expr. * stmt.c (stmt_status): Add x_last_expr_alt_rtl. (last_expr_alt_rtl): Likewise. (expand_expr_stmt_value): Set last_expr_alt_rtl. (clear_last_expr): Clear it. (expand_end_stmt_expr): Set RTL_EXPR_ATL_RTL. (expand_end_bindings): Save and restor last_expr_alt_rtl. * tree.def (RTL_EXPR): Give it an additional operand. * tree.h (RTL_EXPR_ALT_RTL): New macro. * misc.c (gnat_expand_expr): Add alt_rtl parameter. * cp-tree.h (cxx_expand_expr): Change prototype. * expr.c (cxx_expand_expr): Add alt_rtl parameter. * java-tree.h (java_expand_expr): Change prototype. * expr.c (java_expand_expr): Add alt_rtl parameter. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@75594 138bc75d-0d04-0410-961f-82ee72b054a4
* * langhooks.c (lhd_print_error_function): Fix for PR c/13110.bothner2003-12-201-1/+0
| | | | | | | | Don't do pp_newline; it causes an extra blank line. * pretty-print.c (pp_base_flush): Clear pp_needs_newline. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@74872 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-typeck.c (c_convert_parm_for_inlining): Add argnum, whichmrs2003-11-121-1/+2
| | | | | | | | | | | | | | | is the argumnt we are processing so that warnings and errors will have that information. * c-tree.h (c_convert_parm_for_inlining): Add argnum. * lang-hooks-def.h (lhd_tree_inlining_convert_parm_for_inlining): Likewse. * langhooks.c (lhd_tree_inlining_convert_parm_for_inlining): Likewise. * langhooks.h (convert_parm_for_inlining): Likewise. * tree-inline.c (initialize_inlined_parameters): Compute and pass argnum down. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@73507 138bc75d-0d04-0410-961f-82ee72b054a4
* PR debug/12066mmitchel2003-09-171-0/+8
| | | | | | | | | | | | | | | | | | | | * dbxout.c (dbxout_init): Use a langhook to find builtin types. * langhooks-def.h (lhd_return_null_tree_v): New function. (LANG_HOOKS_BUILTIN_TYPE_DECLS): New macro. (LANG_HOOKS_DECLS): Add it to the intializer. * langhooks.c (lhd_return_null_tree_v): New function. * langhooks.h (lang_hooks_for_decls): Add builtin_type_decls. PR debug/12066 * cp-lang.c (LANG_HOOKS_BUILTIN_TYPE_DECLS): Define. * cp-tree.h (cxx_builtin_type_decls): Declare. * decl.c (builtin_type_decls): New variables. (cxx_builtin_type_decls): New function. (record_builtin_type): Add to builtin_type_decls. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@71478 138bc75d-0d04-0410-961f-82ee72b054a4
* * coverage.c (create_coverage): Do not call pushlevel/poplevel.mmitchel2003-09-151-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * langhooks-def.h (lhd_do_nothing_iii_return_null_tree): New function. * langhooks.c (lhd_do_nothing_iii_return_null_tree): Define it. PR c++/3907 * class.c (maybe_note_name_used_in_class): Refine test for whether or not we are in a class scope. * cp-tree.h (language_function): Remove x_expanding_p. (expanding_p): Remove. (doing_semantic_analysis_p): Remove. (scope_kind): Add sk_function_parms, sk_class, sk_namespace. (innermost_scope_kind): New method. * call.c (cxx_type_promotes_to): Use type_decays_to. * cp-lang.c (LANG_HOOKS_PUSHLEVEL): Redefine. (LANG_HOOKS_POPLEVEL): Likewise. * decl.c (cp_binding_level): Remove parm_flag, template_parms_p, template_spec_p, namespace_p, is_for_scope, is_try_scope, and is_catch_scope. Add kind and explicit_spec_p. (cxx_scope_descriptor): Use a lookup table. (find_class_binding_level): Use "kind" field in binding_level, not the various flags. (pop_binding_level): Likewise. (innermost_nonclass_level): Likewise. (toplevel_bindings_p): Likewise. (namespace_bindings_p): Likewise. (template_parm_scope_p): Likewise. (innermost_scope_kind): New method. (current_tmpl_spec_kind): Use "kind" field in binding_level, not the various flags. (pushlevel): Remove check for doing_semantic_analysis_p. (begin_scope): Simplify. (add_decl_to_level): Use "kind" field in binding_level, not the various flags. (push_local_binding): Likewise. (pop_label): Remove check for doing_semantic_analysis_p. (poplevel): Use "kind" field in binding_level, not the various flags. (set_block): Remove check for doing_semantic_analysis_p. (pushlevel_class): Use "kind" field in binding_level, not the various flags. (poplevel_class): Likewise. (initial_push_namespace_scope): Likewise. (maybe_push_to_top_level): Likewise. (set_identifier_type_value_with_scope): Likewise. (pop_everything): Likewise. (maybe_process_template_type_declaration): Likewise. (pushtag): Likewise. (pushdecl): Likewise. (pushdecl_with_scope): Likewise. (check_previous_goto_1): Likewise. (define_label): Likewise. (finish_case_label): Likewise. (lookup_tag): Likewise. (unqualified_namespace_lookup): Likewise. (lookup_name_real): Likewise. (lookup_name_current_level): Likewise. (lookup_type_current_level): Likewise. (record_builtin_type): Likewise. (cp_make_fname_decl): Likewise. (maybe_inject_for_scope_var): Likewise. (cp_finish_decl): Remove check for doing_semantic_analysis_p. (start_function): Use begin_scope, not pushlevel. (finish_function): Use "kind" field in binding_level, not the various flags. (start_method): Use begin_scope, not pushlevel. (make_label_decl): Do not check expanding_p. (save_function-data): Do not set expanding_p. (cxx_push_function_context): Do not clear expanding_p. * semantics.c (cxx_expand_function_start): Do not set expanding_p. PR c++/3907 * g++.dg/parse/template12.C: New test. * g++.dg/abi/bitfield11.C: New test. * g++.dg/abi/bitfield12.C: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@71393 138bc75d-0d04-0410-961f-82ee72b054a4
* * cgraph.h (struct cgraph_node): Rename lowered to analyzed.rth2003-09-101-0/+8
| | | | | | | | | | | | | | | | | | | | * cgraphunit.c: Update to match. (record_call_1): Rearrange. Call lang hook for language nodes. (cgraph_analyze_function): Don't call lower_function. * langhooks.h (struct lang_hooks_for_callgraph): Replace lower_function with analyze_expr. * langhooks-def.h: Update to match. * langhooks.c (lhd_callgraph_analyze_expr): New. * decl2.c (cxx_callgraph_analyze_expr): New, from corpse of mark_member_pointers. (lower_function): Remove. * cp-tree.h: Update to match. * cp-lang.c (LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR): New. (LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION): Remove. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@71277 138bc75d-0d04-0410-961f-82ee72b054a4
* * langhooks-def.h (lhd_register_builtin_type): New function.mmitchel2003-09-091-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | (LANG_HOOKS_REGISTER_BUILTIN_TYPE): New macro. (LANG_HOOKS_FOR_TYPES_INITIALIZER): Update. * langhooks.h (lang_hooks_for_types): Add register_builtin_type. * langhooks.c (lhd_register_builtin_type): New function. * c-common.h (c_register_builtin_type): Declare. * c-common.c (c_register_builtin_type): New function. * c-lang.c (LANG_HOOKS_REGISTER_BUILTIN_TYPE): Define to c_register_builtin_type. * config/ia64/hpux.h (TARGET_OS_CPP_BUILTINS): Remove __fpreg, __float80, and __float128 macros. * config/ia64/ia64.c (ia64_init_builtins): Create __fpreg, __float80, and __float128 types. * cp-lang.c (LANG_HOOKS_REGISTER_BUILTIN_TYPE): Define to c_register_builtin_type. * gcc.dg/ia64-types1.c: New test. * gcc.dg/ia64-types2.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@71227 138bc75d-0d04-0410-961f-82ee72b054a4
* * langhooks.c (lhd_print_error_function): Move from diagnostic.c.gdr2003-09-071-0/+35
| | | | | | | * Makefile.in (langhooks.o): Depend on diagnostic.h git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@71165 138bc75d-0d04-0410-961f-82ee72b054a4
* Missed part of my patch:pinskia2003-08-191-0/+8
| | | | | | | | | | | | * langhooks-def.h (lhd_decl_uninit): Declare. (LANG_HOOKS_DECL_UNINIT): New macro. (LANG_HOOKS_INITIALIZER): Adjust. * langhooks.h (struct lang_hooks): Add new field decl_uninit. * langhooks.c (lhd_decl_uninit): Define. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@70580 138bc75d-0d04-0410-961f-82ee72b054a4
* * opts.c (decode_options): Do language-specific initialization forgdr2003-08-031-0/+6
| | | | | | | | | | | | | the global diagnostic context. * langhooks-def.h (lhd_initialize_diagnostics): Declare. (LANG_HOOKS_INITIALIZE_DIAGNOSTITCS): New macro. (LANG_HOOKS_INITIALIZER): Adjust. * langhooks.h (struct lang_hooks): Add new field initialize_diagnostics. * langhooks.c (lhd_initialize_diagnostics): Define. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@70129 138bc75d-0d04-0410-961f-82ee72b054a4
* * alias.c alloc-pool.c bitmap.c bitmap.h bt-load.c builtins.cghazi2003-07-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | c-common.c c-decl.c c-incpath.c c-lex.c c-opts.c c-parse.in c-pragma.c c-typeck.c calls.c cfg.c cfganal.c cfgloop.c cfgrtl.c collect2.c combine.c conflict.c coverage.c cppexp.c cppfiles.c cpphash.c cppinit.c cpplex.c cpplib.c cppmacro.c cppspec.c cpptrad.c cse.c cselib.c dbxout.c defaults.h df.c dominance.c dwarf2out.c dwarfout.c emit-rtl.c except.c expmed.c expr.c final.c fix-header.c flow.c fold-const.c function.c gcc.c gccspec.c gcov.c gcse.c genattr.c genattrtab.c genautomata.c genconditions.c genemit.c genextract.c genoutput.c genrecog.c gensupport.c ggc-page.c ggc-simple.c global.c graph.c haifa-sched.c hashtable.c integrate.c jump.c langhooks.c lcm.c line-map.c local-alloc.c loop.c mips-tdump.c mips-tfile.c mkdeps.c optabs.c params.c postreload.c prefix.c print-tree.c protoize.c ra-build.c ra-colorize.c ra-rewrite.c ra.c recog.c reg-stack.c regclass.c regmove.c regrename.c reload.c reload1.c reorg.c resource.c sbitmap.c sched-deps.c sched-rgn.c sched-vis.c sdbout.c simplify-rtx.c ssa-ccp.c ssa.c stmt.c stor-layout.c timevar.c tlink.c toplev.c tree-dump.c tree.c unroll.c unwind-dw2-fde.c varasm.c varray.c vmsdbgout.c xcoffout.c: Remove unnecessary casts. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69587 138bc75d-0d04-0410-961f-82ee72b054a4
* PR 11498geoffk2003-07-171-6/+30
| | | | | | | | | | | | | | | | | | | | | * Makefile.in (c-opts.o): Add $(LANGHOOKS_DEF_H). (langhooks.o): Add $(GGC_H), gt-langhooks.h. (GTFILES): Add langhooks.c. (gt-langhooks.h): New. * c-common.h (c_static_assembler_name): Prototype. * c-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Define. * objc/objc-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Define. * c-opts.c: Include langhooks-def.h. (c_static_assembler_name): New. * langhooks.c: Include ggc.h. Include gt-langhooks.h. (var_labelno): New. (lhd_set_decl_assembler_name): Give static objects with context unique names. * varasm.c (var_labelno): Delete. (make_decl_rtl): Don't change the assembler name once it's set. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69527 138bc75d-0d04-0410-961f-82ee72b054a4
* * jump.c: Convert prototypes to ISO C90.aj2003-07-061-92/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * langhooks-def.h: Likewise. Add extern to prototypes. * langhooks.c: Likewise. * langhooks.h: Likewise. * lcm.c: Likewise. * local-alloc.c: Likewise. * loop-init.c: Likewise. * loop-unroll.c: Likewise. * loop-unswitch.c: Likewise. * loop.c: Likewise. * loop.h: Likewise. Add extern to prototypes. * machmode.h: Likewise. * main.c: Likewise. * mbchar.c: Likewise. * mbchar.h: Likewise. * mkdeps.c: Likewise. * mkdeps.h: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * output.h: Likewise. * gccspec.c: Likwise. * postreload.c: Likewise. * prefix.c: Likewise. * prefix.h: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * read-rtl.c: Likewise. * real.c: Likewise. * real.h: Likewise. * recog.c: Likewise. * recog.h: Likewise. * reg-stack.c: Likewise. * regclass.c: Likewise. * regmove.c: Likewise. * regrename.c: Likewise. * regs.h: Likewise. * reload.c: Likewise. * reload.h: Likewise. * reload1.c: Likewise. * reorg.c: Likewise. * resource.c: Likewise. * resource.h: Likewise. * rtl-error.c: Likewise. * rtl.c: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68998 138bc75d-0d04-0410-961f-82ee72b054a4
* * config/c4x/c4x.c: Don't include "c-tree.h".ghazi2003-06-161-1/+0
| | | | | | | | | * config/pa/pa.c: Likewise. * langhooks.c: Likewise. * tree.h (poplevel): Declare. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68016 138bc75d-0d04-0410-961f-82ee72b054a4
* * hooks.c (hook_int_size_t_constcharptr_int_0): New.neil2003-06-111-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | * hooks.h (hook_int_size_t_constcharptr_int_0): New. * langhooks-def.h (lhd_decode_option, LANG_HOOKS_DECODE_OPTION): Die. (LANG_HOOKS_HANDLE_OPTION, LANG_HOOKS_INITIALIZER): Update. * langhooks.c (lhd_decode_option): Remove. * langhooks.h (struct lang_hooks): Remove decode_option. * opts.c (handle_option): No longer use decode_option. java: * Make-lang.in: Handle mostlyclean. treelang: * Make-lang.in: Update for option handling. * lang.opt: New. * tree1.c: Include opts.h and t-options.h. (treelang_decode_option): Remove. (treelang_handle_option): New. * treetree.c (LANG_HOOKS_DECODE_OPTION): Remove. (LANG_HOOKS_HANDLE_OPTION): Override. * treetree.h (treelang_decode_option): Remove. (treelang_handle_option): New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@67799 138bc75d-0d04-0410-961f-82ee72b054a4
* 2003-05-21 Andrew Haley <aph@redhat.com>aph2003-06-101-0/+10
| | | | | | | | | | | | | | | | | | * langhooks-def.h (LANG_HOOKS_DECL_OK_FOR_SIBCALL): New. (LANG_HOOKS_DECLS): Add LANG_HOOKS_DECL_OK_FOR_SIBCALL. (lhd_decl_ok_for_sibcall): New. * langhooks.c (lhd_decl_ok_for_sibcall): New. * langhooks.h (lang_hooks_for_decls.ok_for_sibcall): New field. * calls.c (expand_call): Check lang_hook before generating a sibcall. 2003-05-21 Andrew Haley <aph@redhat.com> * lang.c (LANG_HOOKS_DECL_OK_FOR_SIBCALL): New. (java_decl_ok_for_sibcall): New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@67713 138bc75d-0d04-0410-961f-82ee72b054a4
* * tree.c (tree_size): For all 'c' and 'x' nodes, look directlyzack2003-04-071-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | at the sizes of the relevant structures, rather than relying on TREE_CODE_LENGTH. Call lang_hooks.tree_size to get the sizes of any such we don't know about. Use lang_hooks.identifier_size for IDENTIFIER_NODE. (initializer_zerop): Use CONSTRUCTOR_ELTS. * tree.def: Update commentary. Make fourth element of the definition for all 'c' and 'x' nodes zero. * langhooks.h: New hook, tree_size / LANG_HOOKS_TREE_SIZE. * langhooks-def.h: Update to match. * langhooks.c: New default, lhd_tree_size. * c-common.def (SRCLOC): Kill. * c-pretty-print.c (pp_c_postfix_expression [case SRCLOC]): Remove entirely - was already #if-ed out. ada: * ada-tree.def: Make fourth element for GNAT_LOOP_ID zero. * misc.c (gnat_tree_size): New function. (LANG_HOOKS_TREE_SIZE): Override. cp: * cp-tree.def: Make fourth element for all 'c' and 'x' nodes zero. * cp-lang.c (cp_tree_size): New function. (LANG_HOOKS_TREE_SIZE): Override. * cp-tree.h (SOURCE_LOCUS, SRCLOC_FILE, SRCLOC_LINE, struct tree_srcloc, TS_CP_COMMON, TS_CP_SRCLOC): Kill. (union lang_tree_node): Remove common and srcloc members. (build_srcloc_here): Don't prototype. * decl.c (cp_tree_node_structure): Kill SRCLOC case. * pt.c (pending_templates): Correct comment. * tree.c (build_srcloc, build_srcloc_here): Kill. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@65323 138bc75d-0d04-0410-961f-82ee72b054a4
* (gcc)neroden2003-03-191-2/+2
| | | | | | | | | | | | | | | | | | * c-common.h (c_dump_tree), c-dump.c (c_dump_tree), langhooks-def.h (lhd_tree_dump_dump_tree), langhooks.c (lhd_tree_dump_dump_tree), langhooks.h (*dump_tree): Change return type from 'int' to 'bool'. Replace 0 and 1 with true and false in return statements. (cp) * dump.c (cp_dump_tree), cp-tree.h (cp_dump_tree): Change return type from 'int' to 'bool'. Replace 0 and 1 with true and false in return statements. (java) * lang.c (java_dump_tree): Change return type from 'int' to 'bool'. Replace 0 and 1 with true and false in return statements. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@64596 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-pch.c, dummy-conditions.c, genautomata.c, genconditions.c,neroden2003-03-131-4/+4
| | | | | | | | | langhooks.c, tree-inline.c, unwind-dw2-fde-darwin.c, unwind-dw2-fde-glibc.c, unwind-libunwind.c, vmsdbgout.c: Replace "GNU CC" with "GCC". git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@64297 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-common.h (c_common_init, c_common_post_options): Update.neil2003-03-081-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * c-objc-common.c (c_objc_common_init): Update for new prototype. * c-opts.c (saved_lineno): New. (c_common_post_options, c_common_init): Update prototypes, move call to cpp_read_main_file from latter to former. * c-tree.h (c_ojbc_common_init): Update. * langhooks-def.h (lhd_post_options): New. (LANG_HOOKS_INIT, LANG_HOOKS_POST_OPTIONS): Update. * langhooks.c (lhd_post_options): New. * langhooks.h (struct lang_hooks): Update post_options and init hooks. * toplev.c (no_backend): New. (process_options): Call post_options hook and set main_input_filename and input_filename here. (lang_dependent_init, do_compile): post_options hook moved to process_options. * objc/objc-act.c (objc_init): Update prototype. * objc/objc-act.h (objc_init): Update prototype. ada: * misc.c (gnat_init): Update for new prototype. cp: * cp-tree.h (cxx_init): Update prototype. * lex.c (cxx_init): Similarly. f: * com.c (ffe_init): Update prototype; move code to ffe_post_options. (ffe_post_options): New. java: * lang.c (java_init): Update prototype, move code to java_post_options. (java_post_options): Similarly. treelang: * tree1.c (in_fname): Fix type. (treelang_init): Update prototype and use of in_fname. * treelang.h (in_fname): Fix type. * treetree.c (tree_code_if_start, tree_code_if_else, tree_code_if_end, tree_code_create_function_prototype, tree_code_create_function_initial, tree_code_create_funciton_wrapup, tree_code_create_variable, tree_code_output_expression_statement) : Fix prototypes and use of filenames. * treetree.h: Similarly. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@64001 138bc75d-0d04-0410-961f-82ee72b054a4
* * calls.c: Fix comment formatting.kazu2003-03-081-1/+1
| | | | | | | | | | | | | | | | | * cfgloopanal.c: Likewise. * cfgloopmanip.c: Likewise. * combine.c: Likewise. * dwarf2out.c: Likewise. * ggc-common.c: Likewise. * langhooks.c: Likewise. * loop-unroll.c: Likewise. * loop.c: Likewise. * ra-build.c: Likewise. * sbitmap.c: Likewise. * toplev.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@63966 138bc75d-0d04-0410-961f-82ee72b054a4
* * toplev.c, langhooks.c, langhooks-def.h: Moveaustern2003-02-191-0/+29
| | | | | | | write_global_declarations from toplev.c to langhooks.c. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@63094 138bc75d-0d04-0410-961f-82ee72b054a4
* Merge basic-improvements-branch to trunkzack2002-12-161-3/+9
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@60174 138bc75d-0d04-0410-961f-82ee72b054a4
* * dbxout.c: Follow spelling conventions.kazu2002-09-221-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * defaults.h: Likewise. * df.c: Likewise. * diagnostic.h: Likewise. * doloop.c: Likewise. * dwarf2out.c: Likewise. * dwarfout.c: Likewise. * emit-rtl.c: Likewise. * except.c: Likewise. * explow.c: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * flags.h: Likewise. * flow.c: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * gcc.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattrtab.c: Likewise. * genconfig.c: Likewise. * genrecog.c: Likewise. * ggc-page.c: Likewise. * ggc.h: Likewise. * global.c: Likewise. * gthr-win32.h: Likewise. * integrate.c: Likewise. * jump.c: Likewise. * langhooks.c: Likewise. * langhooks.h: Likewise. * line-map.h: Likewise. * local-alloc.c: Likewise. * longlong.h: Likewise. * loop.c: Likewise. * loop.h: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@57406 138bc75d-0d04-0410-961f-82ee72b054a4
* For PR java/6005 and PR java/7611:tromey2002-08-221-0/+7
| | | | | | | | | | | | | | * fold-const.c (fold_truthop): Use can_use_bit_fields_p. (fold): Likewise. * langhooks.c (lhd_can_use_bit_fields_p): New function. * langhooks-def.h (lhd_can_use_bit_fields_p): Declare. (LANG_HOOKS_CAN_USE_BIT_FIELDS_P): New define. (LANG_HOOKS_INITIALIZER): Use it. * langhooks.h (struct lang_hooks) [can_use_bit_fields_p]: New field. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@56498 138bc75d-0d04-0410-961f-82ee72b054a4
* * langhooks-def.h (LANG_HOOKS_EXPR_SIZE): New macro.jason2002-08-021-0/+14
| | | | | | | | | | | | | | | | | | | * langhooks.c (lhd_expr_size): Define default. * langhooks.h (struct lang_hooks): Add expr_size. * explow.c (expr_size): Call it. * expr.c (store_expr): Don't copy an expression of size zero. (expand_expr) [CONSTRUCTOR]: Use expr_size to calculate how much to store. * Makefile.in (builtins.o): Depend on langhooks.h. * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define. (cp_expr_size): New fn. * call.c (build_over_call): Lose empty class hackery. (convert_arg_to_ellipsis): Promote non-POD warning to error. * typeck.c (build_modify_expr): Don't use save_expr on an lvalue. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@55983 138bc75d-0d04-0410-961f-82ee72b054a4
* * langhooks.c: Fix formatting.kazu2002-05-301-7/+6
| | | | | | | | | | | | | * langhooks.h: Likewise. * lcm.c: Likewise. * libgcc2.c: Likewise. * lists.c: Likewise. * local-alloc.c: Likewise. * loop.c: Likewise. * loop.h: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@54070 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-common.h (c_common_parse_file): Update.neil2002-04-251-10/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * c-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove. * c-lex.c (YYDEBUG): Get from c-lex.h. (c_common_parse_file): Update. * c-lex.h (YYDEBUG, yydebug): New. * c-parse.in (YYDEBUG): Get from c-lex.h. (c_set_yydebug): Remove. * c-tree.h (c_set_yydebug): Remove. * langhooks-def.h (lhd_do_nothing_i): New. (lhd_set_yydebug, LANG_HOOKS_SET_YYDEBUG): Remove. (LANG_HOOKS_PARSE_FILE, LANG_HOOKS_INITIALIZER): Update. * langhooks.c (lhd_do_nothing_i): New. (lhd_set_yydebug): Remove. * langhooks.h (struct lang_hooks): Update. * toplev.c (set_yydebug): New. (compile_file): Update call to parse_file hook. (decode_d_option): Update. ada: * misc.c (gnat_parse_file): Update. cp: * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove. * cp-tree.h (cxx_set_yydebug): Die. * lex.c (YYDEBUG): Get from c-lex.h. (cxx_set_yydebug): Remove. * parse.y: Include c-lex.h. (YYDEBUG): Get from c-lex.h. f: * com.h (ffe_parse_file): Update. * lex.c (ffe_parse_file): Update. java: * java-tree.h (java_parse_file): Update. (java_set_yydebug): Remove. * jcf-parse.c (yydebug): Remove. (java_set_yydebug): Die. (java_parse_file): Update. * lang.c (LANG_HOOKS_SET_YYDEBUG): Remove. objc: * objc-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@52753 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in: Update.neil2002-04-201-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * decl.c (push_c_function_context, pop_c_function_context, mark_c_function_context): Rename for consistency. * c-objc-common.c (c_objc_common_init): Langhooks set elsewhere. * c-tree.h (push_c_function_context, pop_c_function_context, mark_c_function_context): Rename for consistency. * c-lang.c (LANG_HOOKS_FUNCTION_ENTER_NESTED, LANG_HOOKS_FUNCTION_LEAVE_NESTED, LANG_HOOKS_FUNCTION_MARK): Redefine. * function.c (init_lang_status, save_lang_status, restore_lang_status, mark_lang_status, free_lang_status): Move to langhooks.h. (push_function_context_to, pop_function_context_from, free_after_parsing, prepare_function_start, ggc_mark_struct_function): Update. * function.h (init_lang_status, save_lang_status, restore_lang_status, mark_lang_status, free_lang_status): Move to langhooks.h. * langhooks-def.h (LANG_HOOKS_FUNCTION_INIT, LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_ENTER_NESTED, LANG_HOOKS_FUNCTION_LEAVE_NESTED, LANG_HOOKS_FUNCTION_MARK, LANG_HOOKS_FUNCTION_INITIALIZER): New. (LANG_HOOKS_INITIALIZER): Update. (lhd_do_nothing_f): New. * langhooks.h (struct lang_hooks_for_functions): New. (struct lang_hooks): New hooks. * langhooks.c (lhd_do_nothing_f): New. cp: * cp-lang.c (LANG_HOOKS_FUNCTION_INIT, LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine. * cp-tree.h (cxx_push_function_context, cxx_pop_function_context, cxx_mark_function_context): New. * decl.c (push_cp_function_context, pop_cp_function_context, mark_cp_function_context): Rename for consistency. (cxx_init_decl_processing): Don't set old hooks. objc: * objc-lang.c (LANG_HOOKS_FUNCTION_ENTER_NESTED, LANG_HOOKS_FUNCTION_LEAVE_NESTED, LANG_HOOKS_FUNCTION_MARK): Redefine. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@52551 138bc75d-0d04-0410-961f-82ee72b054a4
* * builtins.c: Include langhooks.h.neil2002-04-191-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (lang_type_promotes_to): Remove. (expand_builtin_va_arg): Use new hook. * c-common.c (c_common_nodes_and_builtins): Don't set hook. (simple_type_promotes_to): Move to c-typeck.c. * c-common.h (simple_type_promotes_to): Remove. * c-decl.c (duplicate_decls, grokdeclarator): Update. * c-format.c: Include langhooks.h. (check_format_types): Update. * c-tree.h (c_type_promotes_to): New. * c-typeck.c (c_type_promotes_to): Move from c-common.c. (type_lists_compatible_p): Update. * langhooks-def.h (lhd_type_promotes_to): New. (LANG_HOOKS_TYPE_PROMOTES_TO): New. (LANG_HOOKS_FOR_TYPES_INITIALIZER): Update. * langhooks.c (lhd_type_promotes_to): New. * langhooks.h (struct lang_hooks_for_types): New hook. * tree.h (lang_type_promotes_to): Remove. cp: * call.c (convert_type_from_ellipsis): Rename, update. * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine. * cp-tree.h (convert_type_from_ellipsis): Rename. * decl.c (cxx_init_decl_processing): Don't set hook. objc: * objc-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@52512 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.neil2002-04-181-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * c-tree.h (c_incomplete_type_error): New. * c-typeck.c (require_complete_type, build_component_ref): Update. (incomplete_type_error): Rename. * langhooks-def.h (lhd_incomplete_type_error): New. (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): New. (LANG_HOOKS_FOR_TYPES_INITIALIZER): Update. * langhooks.c (lhd_incomplete_type_error): New. * langhooks.h (struct lang_hooks_for_types): New hook. * tree.c (size_in_bytes): Use new hook. * tree.h (incomplete_type_error): Remove. ada: * gigi.h (incomplete_type_error): Remove. * utils.c (incomplete_type_error): Remove. cp: * call.c (build_new_method_call): Update. * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine. * cp-tree.h (cxx_incomplete_type_error): New. * decl.c (grokdeclarator, grokparms): Update. * decl2.c (check_classfn): Update. * pt.c (tsubst): Update. * typeck.c (complete_type_or_else, expr_sizeof, decay_conversion): Update. * typeck2.c (incomplete_type_error): Rename. (add_exception_specifier): Update. f: * com.c (incomplete_type_error): Remove. java: * typeck.c (incomplete_type_error): Remove. objc: * objc-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@52480 138bc75d-0d04-0410-961f-82ee72b054a4
* PR opt/4330rth2002-04-031-0/+19
| | | | | | | | | | | | | | | | | | | | | | * langhooks.h (lang_hooks.decls.warn_unused_global): New. * toplev.c (check_global_declarations): Use it. * langhooks-def.h (lhd_warn_unused_global_decl): Declare. (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New. (LANG_HOOKS_DECLS): Add it. * langhooks.c (lhd_warn_unused_global_decl): New. * c-decl.c (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New. * c-objc-common.c (c_warn_unused_global_decl): New. * c-tree.h (c_warn_unused_global_decl): Declare. * objc/objc-lang.c (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New. * cp-lang.c (cxx_warn_unused_global_decl): New. (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New. * g++.dg/warn/Wunused-2.C: New. * gcc.dg/unused-4.c: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@51818 138bc75d-0d04-0410-961f-82ee72b054a4
* * langhooks-def.h (lhd_set_decl_assembler_name,neil2002-04-031-0/+27
| | | | | | | | | | | | | | | | | | | | LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): New. (LANG_HOOKS_INITIALIZER): Update. * langhooks.c (lhd_set_decl_assembler_name): New, from tree.c * langhooks.h (struct lang_hooks): New hook. * tree.c (set_decl_assembler_name): Move to langhooks.c. (lang_set_decl_assembler_name): Remove. (init_obstacks): Don't set hook. (decl_assembler_name): New function. * tree.h (DECL_ASSEMBLER_NAME): Turn into a function call. (decl_assembler_name): New. (lang_set_decl_assembler_name): Remove. cp: * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine. * tree.c (init_tree): Don't set hook. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@51817 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-common.c (c_unsafe_for_reeval): Rename.neil2002-03-311-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * c-common.h (c_unsafe_for_reeval): Rename. * c-decl.c (finish_incomplete_decl): Rename. (c_init_decl_processing): Don't set langhook. * c-lang.c (LANG_HOOKS_FINISH_INCOMPLETE_DECL, LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine. * c-objc-common.c (c_objc_common_init): Don't set langhook. * c-tree.h (finish_incomplete_decl): Rename. * langhooks-def.h (lhd_unsafe_for_reeval): New. (LANG_HOOKS_FINISH_INCOMPLETE_DECL, LANG_HOOKS_UNSAFE_FOR_REEVAL): New. (LANG_HOOKS_INITIALIZER): Update. * langhooks.c (lhd_unsafe_For_reeval): New. * langhooks.h (struct langhooks): New hooks. * toplev.c (incomplete_decl_finalize_hook): Remove. (wrapup_global_declarations): Update. * tree.c (lang_unsafe_for_reeval): Remove. (unsafe_for_reeval): Update. * tree.h (lang_unsafe_for_reeval, incomplete_decl_finalize_hook): Remove. ada: * gigi.h (finish_incomplete_decl): Rename. * misc.c (LANG_HOOKS_FINISH_INCOMPLETE_DECL): Redefine. * utils.c (gnat_init_decl_processing): Don't set hook. (finish_incomplete_decl): Rename. cp: * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine. * lex.c (cxx_init): Don't set hook. objc: * objc-lang.c (LANG_HOOKS_FINISH_INCOMPLETE_DECL, LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@51673 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-common.c (c_expand_expr): Fix prototype.neil2002-03-271-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * c-common.h (c_expand_expr): Always declare, update. * c-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine. * c-objc-common.c (c_objc_common_init): No global hook. * expr.c (expand_expr): Use langhook. * expr.h (enum expand_modifier): Conditionally declare. * langhooks-def.h (lhd_expand_expr, LANG_HOOKS_EXPAND_EXPR): New. (LANG_HOOKS_INITIALIZER): Update. * langhooks.c (lhd_expand_expr): New. * langhooks.h (struct lang_hooks): New hook. * toplev.c (lang_expand_expr_t, lang_expand_expr): Delete. (lang_independent_init): Don't default hook. ada: * misc.c (LANG_HOOKS_EXPAND_EXPR): Redefine. (gnat_init): Don't set hook. (gnat_expand_expr): Fix prototype. cp: * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine. * cp-tree.h (init_cplus_expand): Remove. (cxx_expand_expr): New. * expr.c (cplus_expand_expr): Rename cxx_expand_expr, fix prototype. (init_cplus_expand): Remove. * lex.c (cxx_init): Don't call init_cplus_expand. java: * expr.c (java_lang_expand_expr): Rename java_expand_expr, fix prototype. * java-tree.h (java_lang_expand_expr): Similarly. * lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine. (java_init): Don't set hook. objc: * objc-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@51462 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-decl.c (maybe_build_cleanup): Remove.neil2002-03-251-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | * expr.c (expand_expr): Use langhook. * langhooks-def.h (lhd_return_null_tree, LANG_HOOKS_MAYBE_BUILD_CLEANUP): New. (LANGHOOKS_INITIALIZER): Update. * langhooks.c (lhd_return_null_tree): New. * langhooks.h (struct lang_hooks): New hook. * tree-inline.c (initialize_inlined_parameters): Use langhook. * tree.h (maybe_build_cleanup): Remove. ada: * misc.c (maybe_build_cleanup): Remove. cp: * cp-tree.h (cxx_maybe_build_cleanup): New. * decl.c (destroy_local_var, hack_incomplete_structures): Update. (maybe_build_cleanup): Rename cxx_maybe_build_cleanup. * tree.c (build_target_expr): Update. f: * com.c (maybe_build_cleanup): Remove. java: * decl.c (maybe_build_cleanup): Remove. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@51324 138bc75d-0d04-0410-961f-82ee72b054a4
* 2002-03-21 Aldy Hernandez <aldyh@redhat.com>aldyh2002-03-211-1/+1
| | | | | | | | | | | | | | | | | | | * langhooks.c (lhd_tree_inlining_cannot_inline_tree_fn): Check flag_really_no_inline instead of optimize == 0. * c-objc-common.c (c_cannot_inline_tree_fn): Same. * cp/tree.c (cp_cannot_inline_tree_fn): Same. * flags.h (flag_really_no_inline): New. * c-common.c (c_common_post_options): Initialzie flag_really_no_inline. * toplev.c (flag_really_no_inline): New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@51146 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in (fold-const.o, stor-layout.o, stmt.o,neil2002-03-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sdbout.o, profile.o): Update. * c-common.c (c_common_nodes_and_builtins): Use pushdecl langhook. * c-common.h (gettags): Move here from tree.h. * c-tree.h (pushdecl, pushlevel, poplevel, set_block, insert_block, getdecls, kept_level_p, global_bindings_p): New. * dbxout.c (dbxout_init): Use getdecls langhook. * expr.c (expand_expr): Use insert_block langhook. * fold-const.c: Include langhooks.h. (fold_range_test, fold_binary_op_with_conditional_arg, fold): Use global_bindings_p langhook. * integrate.c (expand_inline_function): Use insert_block langhook. * langhooks-def.h (LANG_HOOKS_DECLS, LANG_HOOKS_PUSHLEVEL, LANG_HOOKS_POPLEVEL, LANG_HOOKS_GLOBAL_BINDINGS_P, LANG_HOOKS_INSERT_BLOCK, LANG_HOOKS_SET_BLOCK, LANG_HOOKS_PUSHDECL, LANG_HOOKS_GETDECLS): New. (LANG_HOOKS_INITIALIZER): Update. * langhooks.c (lhd_clear_binding_stack): Use global_bindings_p langhook. * langhooks.h (struct lang_hooks_for_decls): New. (struct lang_hooks): Update. * profile.c: Include langhooks.h. (output_func_start_profiler): Use new langhooks. * sdbout.c: Include langhooks.h. (sdbout_init, sdbout_finish): Use getdecls langhook. * stmt.c: Include langhooks.h. (expand_fixup, fixup_gotos): Use new langhooks. * stor-layout.c: Include langhooks.h. (variable_size): Use global_bindings_p langhook. * toplev.c (compile_file): Use getdecls langhook. * tree-inline.c (remap_block): Use insert_block langhook. * tree.h (pushdecl, pushlevel, poplevel, set_block, gettags, insert_block, getdecls, kept_level_p, global_bindings_p): Remove. cp: * cp-tree.h (pushdecl, pushlevel, poplevel, set_block, insert_block, getdecls, global_bindings_p): New. java: * cp-tree.h (pushdecl, pushlevel, poplevel, set_block, insert_block, getdecls, kept_level_p, global_bindings_p): New. f: * cp-tree.h (pushdecl, pushlevel, poplevel, set_block, insert_block, getdecls, global_bindings_p): New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@51136 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in: Update.neil2002-03-201-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * c-common.c: Include langhooks.h. (inline_forbidden_p): Use new hook. * diagnostic.c: Include langhooks.h. (format_with_decl, announce_function, default_print_error_function): Use new hook. * dwarf2out.c (dwarf2_name): Use new hook. * function.c: Include langhooks.h. (init_function_start): Use new hook. * langhooks-def.h (lhd_decl_printable_name): New. (LANGHOOKS_DECL_PRINTABLE_NAME): New. (LANGHOOKS_INITIALIZER): Update. * langhooks.c (lhd_decl_printable_name): New. * langhooks.h (struct lang_hooks): New hook. * toplev.c (decl_name, decl_printable_name): Remove. (open_dump_file): Use new hook. (process_options): Remove old hook. * tree.h (decl_printable_name): Remove. ada: * misc.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine. (gnat_init): Remove old hook. cp: * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine. * cp-tree.h (lang_printable_name): Rename. * error.c (lang_decl_name): Use new hook. * lex.c (cxx_init): Remove old hook. * pt.c (tsubst_expr): Use new hook. * tree.c (lang_printable_name): Rename. f: * com.c (lang_printable_name): Rename. (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine. (ffe_init): Don't use old hook. java: * decl.c (start_java_method): Use new hook. * lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine. (java_init): Remove old hook. objc: * objc-act.c (objc_init): Remove old hook. (objc_printable_name): Export. * objc-act.h (objc_printable_name): New. * objc-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@51066 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c/5656jakub2002-03-191-0/+12
| | | | | | | | | | | | | | | | | | | | * langhooks.h (struct lang_hooks_for_tree_inlining): Add convert_parm_for_inlining. * c-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING): Define. * langhooks-def.h: Likewise. * objc/objc-lang.c: Likewise. * langhooks.c (lhd_tree_inlining_convert_parm_for_inlining): New function. * tree-inline.c (initialize_inlined_parameters): Call convert_parm_for_inlining lang hook if needed. * c-typeck.c (c_convert_parm_for_inlining): New function. * c-tree.h (c_convert_parm_for_inlining): Add prototype. * gcc.c-torture/compile/20020318-1.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@51025 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in (integrate.o): Update.neil2002-02-281-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * c-decl.c (copy_lang_decl): Rename. * c-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine. * integrate.c: Include langhooks.h. (copy_decl_for_inlining): Update to use langhook. * langhooks-def.h (lhd_do_nothing_t, LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): New. (LANG_HOOKS_INITIALIZER): Update. * langhooks.c (lhd_do_nothing_t): New. * langhooks.h (struct lang_hooks): Add dup_lang_specific_decl. * tree.h (copy_lang_decl): Remove. ada: * misc.c (copy_lang_decl): Remove. cp: * class.c (build_clone): Update. * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine. * cp-tree.h (cxx_dup_lang_specific_decl): New. * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl. (copy_decl): Update. * method.c (make_thunk): Update. f: * com.c (copy_lang_decl): Delete. java: * decl.c (copy_lang_decl): Rename java_dup_lang_specific_decl. * java-tree.h (java_dup_lang_specific_decl): New. * lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine. objc: * objc-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@50122 138bc75d-0d04-0410-961f-82ee72b054a4
* * langhooks.c: Include flags.h.dnovillo2002-02-221-0/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@49955 138bc75d-0d04-0410-961f-82ee72b054a4
* 2002-02-21 Aldy Hernandez <aldyh@redhat.com>aldyh2002-02-221-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * gcc.dg/attr-alwaysinline.c: New. * c-common.c (c_common_post_options): Set inline trees by default. * doc/extend.texi (Function Attributes): Document always_inline attribute. Update documentation about inlining when not optimizing. * cp/decl.c (duplicate_decls): Merge always_inline attribute. * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0 unless DECL_ALWAYS_INLINE. * c-objc-common.c (c_cannot_inline_tree_fn): Do not inline at -O0 unless DECL_ALWAYS_INLINE. (c_disregard_inline_limits): Disregard if always_inline set. * langhooks.c (lhd_tree_inlining_disregard_inline_limits): Disregard if always_inline set. (lhd_tree_inlining_cannot_inline_tree_fn): Do not inline at -O0 unless DECL_ALWAYS_INLINE. * attribs.c (handle_always_inline_attribute): New. (c_common_attribute_table): Add always_inline. * config/rs6000/altivec.h: Add prototypes for builtins requiring the always_inline attribute. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@49947 138bc75d-0d04-0410-961f-82ee72b054a4
* * langhooks.c (lhd_staticp): Mark parameter with ATTRIBUTE_UNUSED.ghazi2001-12-061-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47727 138bc75d-0d04-0410-961f-82ee72b054a4
* * langhooks.h (struct lang_hooks_for_tree_inlining): Addjason2001-12-051-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | start_inlining, end_inlining. * tree-inline.c (expand_call_inline): Call them. * langhooks-def.h (LANG_HOOKS_TREE_INLINING_START_INLINING): Define. (LANG_HOOKS_TREE_INLINING_END_INLINING): Define. (LANG_HOOKS_TREE_INLINING_INITIALIZER): Add them. * langhooks.c (lhd_tree_inlining_start_inlining): New fn. (lhd_tree_inlining_end_inlining): New fn. * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define. (LANG_HOOKS_TREE_INLINING_END_INLINING): Define. * tree.c (cp_start_inlining, cp_end_inlining): New fns. * pt.c (push_tinst_level): No longer static. * cp-tree.h: Declare them. * init.c (resolve_offset_ref): Don't check access for the base conversion to access a FIELD_DECL. * cp-tree.h (TYPE_REFFN_P): New macro. * decl.c (bad_specifiers): Check it, too. * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY on the __*_type_info type if we haven't seen a definition. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47703 138bc75d-0d04-0410-961f-82ee72b054a4