aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
AgeCommit message (Collapse)AuthorFilesLines
2000-10-31cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.Mark Mitchell6-21/+114
* cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro. (linkage_kind): New enumeration. (decl_linkage): New function. * decl2.c (comdat_linkage): Extend comment. * error.c (dump_function_decl): Print the arguments used to instantiate a template, even when not printing the type of the function. * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P, not TREE_PUBLIC, to test for external linkage. * tree.c (decl_linkage): New function. From-SVN: r37150
2000-10-28pt.c (instantiate_decl): Always instantiate static data members initialized ↵Mark Mitchell2-6/+10
in-class. * pt.c (instantiate_decl): Always instantiate static data members initialized in-class. From-SVN: r37107
2000-10-27configure.in: If not NO_MINUS_C_MINUS_O, substitute OUTPUT_OPTION with '-o $@'.Zack Weinberg4-363/+93
* configure.in: If not NO_MINUS_C_MINUS_O, substitute OUTPUT_OPTION with '-o $@'. Make zlibdir, zlibinc relative to top level. Kill oldstyle_subdirs. Do not include $srcdir/$s/Makefile.in in all_lang_makefiles, but do include $outputs. Do not run configure.lang from config.status. Rearrange warning-flag logic to correspond to what the makefile wants. Put special vax stage1 options in @stage1_flags@ not @stage1_warn_cflags@. Don't do anything with extra_c_objs, extra_cxx_objs, or extra_cpp_objs. (--enable-c-cpplib): AC_SUBST(maybe_cpplib) with "libcpp.a" if switch is given, nothing otherwise. * configure.lang: Delete. * Makefile.in: Expunge all traces of extra_c_objs, extra_cxx_objs, and extra_cpp_objs. Set MAYBE_CPPLIB from @maybe_cpplib@. Add $(MAYBE_CPPLIB) to C_AND_OBJC_OBJS. Set warning options via a three level scheme so that -pedantic and -Wtraditional are not used for non-C front ends: LOOSE_WARN, STRICT1_WARN, STRICT2_WARN -> $(@D)-warn, GCC_WARN_CFLAGS -> WARN_CFLAGS. Distinguish STAGE1_CFLAGS from BOOT_CFLAGS. Add -I$(@D) and -I$(srcdir)/$(@D) to INCLUDES. Set OUTPUT_OPTION, ZLIB, ZLIBINC. Do not set P, LANG_FLAGS_TO_PASS. Add OUTPUT_OPTION to all object-file generation rules. Wrap all rules that change the current directory in parentheses; pmake doesn't spawn a new shell for each command. Expunge all references to $(P). When one command depends on another and they're run all at once, use && to separate them, not ;. Add libgcc_s$(SHLIB_EXT) to files deleted on make clean. Force OUTPUT_OPTION='-o $@' in stage2 and beyond. * cp/Make-lang.in, f/Make-lang.in, java/Make-lang.in, objc/Make-lang.in: Wrap all rules that change the current directory in parentheses. Expunge all references to $(P). When one command depends on another and they're run all at once, use && to separate them, not ;. Add OUTPUT_OPTION to all object-file generation rules. Delete obsolete variables. Move all build rules here from the corresponding Makefile.in and adapt to the new environment. * cp/Makefile.in, f/Makefile.in, java/Makefile.in, objc/Makefile.in: Delete. * cp/config-lang.in, f/config-lang.in, java/config-lang.in: Delete outputs= line. From-SVN: r37088
2000-10-26error.c (dump_function_decl): Print no space between `ptr-operator' the ↵Gabriel Dos Reis2-6/+14
`type-specifier' of the return type. cp/ * error.c (dump_function_decl): Print no space between `ptr-operator' the `type-specifier' of the return type. (dump_type_prefix): Make sure we put space at the appropriate place. testuite/g++.old-deja/g++.pt/ * g++.old-deja/g++.pt/memtemp77.C (main): Adjust comparaison operands. From-SVN: r37067
2000-10-23* call.c (equal_functions): Also call decls_match for extern "C" fns.Jason Merrill2-2/+13
From-SVN: r37024
2000-10-23call.c (standard_conversion): Use RVALUE_CONVs for all expressions that ↵Mark Mitchell2-1/+5
satisfy lvalue_p... * call.c (standard_conversion): Use RVALUE_CONVs for all expressions that satisfy lvalue_p, not just those that satisfy real_lvalue_p. From-SVN: r37013
2000-10-23expr.c (do_preexpand_calls): Remove.Mark Mitchell2-4/+2
* expr.c (do_preexpand_calls): Remove. (same_from_p): Don't use CALL_EXPR_RTL. (expand_expr): Don't call preexpand_calls, or use CALL_EXPR_RTL. (preexpand_calls): Remove. * tree.c (first_rtl_op): Remove CALL_EXPR case. (unsave_expr_1): Likewise. * tree.def (CALL_EXPR): Give it only two slots. * tree.h (CALL_EXPR_RTL): Remove. * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially. From-SVN: r37012
2000-10-22call.c (build_conditional_expr): Use ocp_convert to force rvalue conversion.Jason Merrill1-3/+8
* call.c (build_conditional_expr): Use ocp_convert to force rvalue conversion. From-SVN: r37009
2000-10-22tree.h (TYPE_IS_SIZETYPE): Add more documentation.Mark Mitchell2-9/+18
* tree.h (TYPE_IS_SIZETYPE): Add more documentation. * typeck.c (c_sizeof): Return an expression of `size_t' type, not one with TYPE_IS_SIZETYPE set. (dubious_conversion_warnings): Remove special-case code. From-SVN: r37006
2000-10-22decl2.c (arg_assoc_type): Handle VECTOR_TYPE.Geoff Keating4-0/+19
* decl2.c (arg_assoc_type): Handle VECTOR_TYPE. * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE. (dump_type_prefix): Print vector-of-int as 'int vector'. (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE. * tree.c (walk_tree): Handle VECTOR_TYPE. From-SVN: r37002
2000-10-22* decl.c (init_decl_processing): Call MD_INIT_BUILTINS.Geoff Keating2-0/+8
From-SVN: r37001
2000-10-21parse.y (operator): Set got_object from got_scope.Jason Merrill3-12/+26
* parse.y (operator): Set got_object from got_scope. Set looking_for_typename. * decl.c (lookup_name_real): Clear val after setting from_obj. Reorganize diagnostic. From-SVN: r37000
2000-10-20tree.c (walk_tree): Don't walk into default args.Jason Merrill3-3/+14
* tree.c (walk_tree): Don't walk into default args. * error.c (dump_expr): Use host_integerp. From-SVN: r36984
2000-10-20* Use "because" instead of since in error messages.David Edelsohn2-1/+6
From-SVN: r36977
2000-10-20fold-const.c (force_fit_type): Unsigned values can overflow if they are ↵Richard Kenner2-1/+14
sizetype. * fold-const.c (force_fit_type): Unsigned values can overflow if they are sizetype. (int_const_binop): Don't use cache if overflows. * cp/typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE. From-SVN: r36970
2000-10-20decl.c (revert_static_member_fn): Fixed typo.Jeffrey Oldham2-2/+5
2000-10-20 Jeffrey Oldham <oldham@codesourcery.com> * decl.c (revert_static_member_fn): Fixed typo. From-SVN: r36966
2000-10-20class.c (subobject_offset_fn): New type.Mark Mitchell2-128/+274
* class.c (subobject_offset_fn): New type. (dfs_record_base_offsets): Remove. (record_base_offsets): Likewise. (dfs_search_base_offsets): Likewise. (record_subobject_offset): New function. (check_subobject_offset): Likewise. (walk_subobject_offsets): Likewise. (record_subobject_offsets): Likewise. (layout_conflict_p): Reimplement. (layout_nonempty_base_or_field): Correct handling of type conflicts during layout. (layout_empty_base): Likewise. (build_base_field): Adjust to handle new representation of empty base offset table. (build_base_fields): Likewise. (layout_virtual_bases): Likewise. (splay_tree_compare_integer_csts): New function. (layout_class_type): Use a splay_tree, rather than a varray, to represent the offsets of empty bases. From-SVN: r36958
2000-10-19cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.Mark Mitchell3-1/+16
* cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL. * decl.c (select_decl): Don't return declarations that are DECL_ANTICIPATED. From-SVN: r36953
2000-10-18c-common.h (flag_no_builtin): Declare.Mark Mitchell8-45/+85
* c-common.h (flag_no_builtin): Declare. (flag_no_nonansi_builtin): Likewise. (c_common_nodes_and_builtins): Change prototype. * c-common.c (flag_no_builtin): New variable. (flag_no_nonansi_builtin): Likewise. (c_common_nodes_and_builtins): Remove parameters. Adjust accordingly. * c-decl.c (flag_no_builtin): Remove. (flag_no_nonansi_builtin): Likewise. (init_decl_processing): Adjust call to c_common_nodes_and_builtins. * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD. (fake_std_node): New macro. * decl.c (in_std): Rename to ... (in_fake_std): ... this. (flag_no_builtin): Remove. (flag_no_nonansi_builtin): Likewise. (walk_namespaces_r): Use fake_std_node. (push_namespace): Use std_identifier. (pop_namespace): Use in_fake_std. (lookup_name_real): Use fake_std_node. (init_decl_processing): When -fhonor-std, create the `std' namespace. Don't create a dummy fake_std_node in that case. Adjust call to c_common_nodes_and_builtins. Use std_identifier. (builtin_function): Put builtins whose names don't begin with `_' in the std namespace. * decl2.c (flag_no_builtin): Remove. (flag_no_nonansi_builtin): Likewise. (set_decl_namespace): Use fake_std_node. (validate_nonmember_using_decl): Likewise. (do_using_directive): Likewise. (handle_class_head): Likewise. * dump.c (dequeue_and_dump): Likewise. * except.c (init_exception_processing): Use std_identifier. * init.c (build_member_call): Use fake_std_node. * rtti.c (init_rtti_processing): Use std_identifier. From-SVN: r36940
2000-10-18c-common.c (back_end_hook): New variable.Mark Mitchell4-11/+10
* c-common.c (back_end_hook): New variable. * c-common.h (back_end_hook): Declare it. * c-lang.c (finish_file): Use it. * emit-rtl.c (init_emit_once): Initialize the const_int_htab earlier. * cp-tree.h (back_end_hook): Remove declaration. * decl2.c (back_end_hook): Remove definition. * dump.c (dequeue_and_dump): Dump TREE_USED. From-SVN: r36928
2000-10-17* spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).Brad Lucier2-1/+5
From-SVN: r36921
2000-10-17decl.c (WINT_TYPE): Define.Joseph Myers2-2/+18
* decl.c (WINT_TYPE): Define. (init_decl_processing): Create types unsigned_ptrdiff_type_node, c_size_type_node, signed_size_type_node and wint_type_node. From-SVN: r36898
2000-10-17c-common.h (warn_missing_format_attribute): New variable.Joseph Myers2-0/+11
* c-common.h (warn_missing_format_attribute): New variable. * c-decl.c (warn_missing_format_attribute): New variable. (c_decode_option): Decode -Wmissing-format-attribute and -Wno-missing-format-attribute. * c-common.c (check_function_format): If -Wmissing-format-attribute, give a warning where a vprintf or vscanf function is called by a function without its own printf or scanf attribute. * toplev.c (documented_lang_options): Add -Wmissing-format-attribute. * invoke.texi: Document -Wmissing-format-attribute. cp: * decl2.c (warn_missing_format_attribute): New variable. (lang_decode_option): Decode -Wmissing-format-attribute. testsuite: * gcc.dg/format-miss-1.c: New test. From-SVN: r36897
2000-10-16typeck.c (qualify_type): Remove.Mark Mitchell2-20/+29
* typeck.c (qualify_type): Remove. (composite_pointer_type): Fix handling of conversions to `cv void*'. From-SVN: r36889
2000-10-14* Makefile.in (parse.c, parse.h): Fix think-o in last patch.Kaveh R. Ghazi2-1/+5
From-SVN: r36868
2000-10-13Makefile.in (c-parse.c, tradcif.c): Create atomically.Kaveh R. Ghazi2-2/+7
* Makefile.in (c-parse.c, tradcif.c): Create atomically. * objc/Make-lang.in (objc-parse.c): Likewise. cp: * Makefile.in (parse.c, parse.h): Create atomically. java: * Make-lang.in (parse.c, parse-scan.c): Create atomically. * Makefile.in (parse.c, parse-scan.c): Likewise. From-SVN: r36861
2000-10-13Remove obstacks.Mark Mitchell11-65/+86
* Makefile.in (ggc-callbacks.o): Remove target. (flow.o): Depend on GGC_H. * alias.c (init_alias_analysis): Remove ggc_p conditionals. (end_alias_analysis): Likewise. * basic-block.h (init_flow): New function. (allocate_reg_life_data): Declare. * bb-reorder.c (function_obstack): Replace with ... (flow_obstack): ... new variable. (fixup_reorder_chain): Use it. * c-decl.c (ggc_p): Remove. (caller-save.c): Don't call oballoc/obfree. * combine.c (struct undobuf): Remove storage. (try_combine): Don't call oballoc. (undo_all): Don't call obfree. * cse.c (insert): Use xmalloc, not oballoc. (cse_main): Adjust accordingly. * dwarf2out.c (save_rtx): Remove obstack code. (dwarf2out_init): Remove ggc_p conditionals. * emit-rtl.c (rtl_obstack): Remove. (gen_rtx_CONST_INT): Remove ggc_p conditionals. (make_insn_raw): Likewise. (emit_insn_before): Likewise. (emit_insn_after): Likewise. (emit_insn): Likewise. (gen_sequence): Likewise. (copy_insn_1): Remove handling of `b' RTL components. (init_emit_once): Remove ggc_p conditionals. * except.c (create_rethrow_ref): Don't fool with obstacks. (add_partial_entry): Likewise. (call_get_eh_context): Likewise. (begin_protect_partials): Likewise. (protect_with_terminate): Likewise. * explow.c (plus_constant_wide): Likewise. * expr.c (init_expr_once): Likewise. (emit_block_move): Likewise. (clear_storage): Likewise. (expand_expr): Likewise. * flow.c (function_obstack): Remove. (flow_obstack): New variable. (flow_firstobj): Likewise. (create_base_block): Use the flow_obstack. (split_block): Likewise. (split_edge): Likewise. (calculate_global_regs_live): Likewise. (allocate_bb_life_data): Make it static. Likewiwse. (init_flow): New function. (size_int_type_wide): Remove ggc_p conditionals. * function.c (push_function_context_to): Don't call save_tree_status. (pop_function_context_from): Or restore_tree_status. (assign_stack_local_1): Don't call push_obstacks. (find_fixup_replacement): Use xmalloc. (fixup_var_refs_insns): Free the storage. (insns_for_mem_walk): Don't mess with obstacks. (instantiate_decls): Likewise. (trampoline_address): Likewise. (expand_function_end): Likewise. * function.h (sturct function): Remove obstack-related variables. (save_tree_status): Don't declare. (restore_tree_status): Likewise. * gcse.c (compute_can_copy): Don't call oballoc/obfree. * genattrtab.c (operate_exp): Remove ggc_p conditionals. (simplify_cond): Likewise. (simplify_test_exp): Don't mess with obstacks. (optimize_attrs): Likewise. * gengenrtl.c (gendef): Don't include ggc_p conditionals. * ggc-callbacks.c (ggc_p): Remove. * ggc-none.c (ggc_p): Remove. * ggc.h (ggc_p): Don't declare. * integrate.c (save_for_inline): Don't mess with obstacks. (integrate_decl_tree): Likewise. (output_inline_function): Likewise. * lists.c (init_EXPR_INSN_LIST_cache): Likewise. * loop.c (temp_obstack): Remove. (rtl_obstack): Likewise. (init_loop): Don't mess with obstacks. (reg_address_cost): Free BIVs and GIVs. (check_insns_for_bivs): Use xmalloc, not oballoc. (find_mem_givs): Likewise. (record_biv): Likewise. (general_induction_var): Likewise. (product_cheap_p): Likewse. * optabs.c (init_one_libfunc): Remove ggc_p conditional. * print-tree.c (debug_tree): Don't use oballoc/obfree. (print_node): Likewise. * profile.c (output_func_start_profiler): Remove call to temporary_allocation. * reload1.c (eliminate_regs_in_insn): Don't mess with obstacks. * resource.c (mark_target_live_regs): Use xmalloc. (free_resource_info): Free the memory. * rtl.c (rtl_obstack): Remove. (rtvec_alloc): Don't mess with obstacks. (rtx_alloc): Likewise. (rtx_free): Remove. (copy_rtx): Don't handle `b' cases. (read_rtx): Use a local rtl_obstack. * rtl.h (oballoc): Remove. (obfree): Likewise. (pop_obstacks): Likewise. (push_obstacks): Likewise. (allocate_bb_life_data): Likewise. (allocate_reg_life_data): Likewise. (rtx_free): Likewise. * sdbout.c (sdbout_queue_anonymous_type): Use tree_cons, not saveable_tree_cons. * simplify-rtx.c (cselib_init): Don't mess with obstacks. * stmt.c (mark_block_nesting): Mark the label_chain. (epxand_label): Use ggc_alloc, not oballoc. (clear_last_expr): Don't mess with obstacks. (expand_decl_cleanup): Likewise. (expand_dcc_cleanup): Likewise. (expand_dhc_cleanup): Likewise. (expand_anon_union_decl): Likewise. (add_case_node): Use xmalloc, not oballoc. (free_case_nodes): New function. (expand_end_case): Call it. * stor-layout.c (layout_type): Don't mess with obstacks. (layout_type): Likewise. * toplev.c (wrapup_global_declarations): Likewise. (compile_file): Remove ggc_p conditionals. (rest_of_compilation): Call init_flow. Remove ggc_p conditionals. (decode_f_option): Remove ggc_p conditionals. * tree.c (function_maybepermanent_obstack): Remove. (maybepermanent_obstack): Likewise. (function_obstack): Likewise. (tmeporary_obstack): Likewise. (momentary_obstack): Likewise. (temp_decl_obstack): Likewise. (saveable_obstack): Likewise. (rtl_obstack): Likewise. (current_obstack): Likewise. (expression_obstack): Likewise. (struct obstack_stack): Likewise. (obstack_stack): Likewise. (obstack_stack_obstack): Likewise. (maybepermanent_firstobj): Likewise. (temporary_firstobj): Likewise. (momentary_firstobj): Likewise. (temp_decl_firstobj): Likewise. (momentary_function_firstobj): Likewise. (all_types_permanent): Likewise. (struct momentary_level): Likewise. (momentary_stack): Likewise. (init_obstacks): Remove initialization of removed obstacks. (save_tree_status): Remove. (restore_tree_status): Likewise. (temporary_allocation): Liekwise. (end_temporary_allocation): Liekwise. (resume_temporary_allocation): Likewise. (saveable_allocation): Likewise. (push_obstacks): Likewise. (push_obstacks_nochange): Likewise. (pop_obstacks): Likewise. (allocation_temporary_p): Likewise. (permanent_allocation): Likewise. (preserve_data): Likewise. (preserve_initializer): Likewise. (rtl_in_current_obstack): Likewise. (rtl_in_saveable_obstack): Likewise. (oballoc): Likewise. (obfree): Likewise. (savealloc): Likewise. (expralloc): Likewise. (print_obstack_name): Likewise. (debug_obstack): Likewise. (object_permanent_p): Likewise. (push_momentary): Likewise. (perserve_momentary): Likewise. (clear_momentary): Likewise. (pop_momentary): Likewise. (pop_momentary_nofree): Likewise. (suspend_momentary): Likewise. (resume_momentary): Likewise. (make_node): Don't set TREE_PERMANENT. (copy_node): Remove ggc_p conditionals. Don't set TYPE_OBSTACK. Don't set TREE_PERMANENT. (get_identifier): Remove ggc_p conditionals. (build_string): Likewise. (make_tree_vec): Likewise. (build_decl_list): Remove. (build_expr_list): Likewise. (tree_cons): Remove ggc_p conditionals. (decl_tree_cons): Remove. (expr_tree_cons): Likewise. (perm_tree_cons): Likewise. (temp_tree_cons): Likewise. (saveable_tree_cons): Likewise. (build1): Remove ggc_p conditionals. (build_parse_node): Likewise. (build_type_attribute_variant): Don't mess with obstacks. (build_type_copy): Likewise. (type_hash_canon): Likewise. (build_pointer_type): Likewise. (build_reference_type): Likewise. (build_index_type): Likewise. (build_range_type): Likewise. (dump_tree_statistics): Don't print obstack information. * tree.h (struct tree_common): Remove permanent_flag. (TREE_PERMANENT): Remove. (TREE_SET_PERMANENT): Likewise. (TYPE_OBSTACK): Likewise. (struct tree_type): Remove obstack. (oballoc): Remove. (savealloc): Likewise. (build_decl_list): Likewise. (build_expr_list): Likewise. (perm_tree_cons): Likewise. (temp_tree_cons): Likewise. (saveable_tree_cons): Likewise. (decl_tree_cons): Likewise. (expr_tree_cons): Likewise. (suspend_momentary): Likewise. (allocation_temporary_p): Likewise. (resume_momentary): Likewise. (push_obstacks_nochange): Likewise. (permanent_allocation): Likewise. (push_momentary): Likewise. (clear_momentary): Likewise. (pop_momentary): Likewise. (end_temporary_allocation): Likewise. (pop_obstacks): Likewise. (push_obstacks): Likewise. (pop_momentary_nofree): LIkewise. (preserve_momentary): Likewise. (saveable_allocation): Likewise. (temporary_allocation): Likewise. (resume_temporary_allocation): Likewise. (perserve_initializer): Likewise. (debug_obstack): Likewise. (rtl_in_current_obstack): Likewise. (rtl_in_saveable_obstack): Likewise. (obfree): Likewise. * varasm.c (current_obstack): Remove. (saveable_obstack): Remove. (rtl_obstack): Remove. (immed_double_const): Don't mess with obstacks. (immed_real_cons): Likewise. (output_constant_def): Likewise. (init_varasm_status): Use xcalloc. (mark_pool_constant): Mark the pool constant itself. (free_varasm_status): Free memory. (decode_rtx_const): Call bzero directly, rather than expanding it inline. (record_rtx_const): Don't mess with obstacks. (force_const_mem): Likewise. * config/arm/arm.c (arm_encode_call_attribute): Remove ggc_p conditionals. (aof_pic_entry): Likewise. * config/ia64/ia64.c (ia64_encode_section_info): Likewise. * config/m32r/m32r.c (m32r_encode_section_info): Likewise. * config/pa/pa.c (saveable_obstack): Remove. (rtl_obstack): Likewise. (current_obstack): Likewise. (output_call): Don't mess with obstacks. (hppa_encode_label): Remove ggc_p conditionals. * config/romp/romp.c (get_symref): Don't mess with obstacks. * config/rs6000/rs6000.c (output_toc): Remove ggc_p conditional. (rs6000_encode_section_info): Likewise. * config/sh/sh.c (get_fpscr_rtx): Likewise. From-SVN: r36856
2000-10-09Make-lang.in (CXX_EXTRA_HEADERS): Remove.Richard Henderson16-3665/+12
* Make-lang.in (CXX_EXTRA_HEADERS): Remove. (c++ language support bits for libgcc): Remove. (c++.clean): Remove cplib2.txt cleanup. * config-lang.in (headers, lib2funcs): Remove. * exception.cc, new.cc, new1.cc, new2.cc: Remove files. * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files. * inc/cxxabi.h, inc/exception, inc/new: Remove files. * inc/new.h, inc/typeinfo: Remove files. From-SVN: r36816
2000-10-08tm.texi (INTMAX_TYPE, [...]): Define.Joseph Myers2-0/+28
* tm.texi (INTMAX_TYPE, UINTMAX_TYPE): Define. * c-common.h (enum c_tree_index): Add CTI_INTMAX_TYPE and CTI_UINTMAX_TYPE. (intmax_type_node, uintmax_type_node): Define. * c-common.c (decl_attributes): If pedantic, warn if `mode' attributes create a type wider than intmax_t. (T_IM, T_UIM): Define properly. * c-decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already defined. (init_decl_processing): Initialize intmax_type_node and uintmax_type_node. * c-lex.c (lex_number): When pedantic and warning for integer constants that are too large, in C99 mode warn for those that have a type wider than long long. cp: * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already defined. (init_decl_processing): Initialize intmax_type_node and uintmax_type_node. testsuite: * gcc.dg/c99-printf-1.c, gcc.dg/c99-scanf-1.c, gcc.dg/c90-printf-2.c, gcc.dg/c90-scanf-2.c: Define intmax_t and uintmax_t using <limits.h> to emulate the compiler's internal logic. No longer XFAIL %j tests. From-SVN: r36791
2000-10-06cp-tree.h (struct cp_language_function): Remove x_result_rtx.Richard Henderson5-57/+17
* cp/cp-tree.h (struct cp_language_function): Remove x_result_rtx. (original_result_rtx): Remove. * cp/decl.c (save_function_data): Don't clear x_result_rtx. (mark_lang_function): Don't mark it either. * cp/expr.c (fixup_result_decl): Remove. * cp/semantics.c (genrtl_named_return_value): Frob the return decl before calling emit_local_var. (genrtl_finish_function): Don't call fixup_result_decl. Always emit the jump to return_label. From-SVN: r36770
2000-10-06pt.c (lookup_template_class): Set current access for enum.Nathan Sidwell3-2/+13
* pt.c (lookup_template_class): Set current access for enum. (tsubst_enum): Set file & line for enum decl. * spew.c (yylex): Remove unused variable. From-SVN: r36755
2000-10-05semantics.c (genrtl_finish_function): Don't init or check can_reach_end; ↵Richard Henderson2-29/+5
remove noreturn and return value checks. * semantics.c (genrtl_finish_function): Don't init or check can_reach_end; remove noreturn and return value checks. From-SVN: r36749
2000-10-06init.c (build_java_class_ref): Use `build_static_name' with a suffix...Tom Tromey2-5/+10
* init.c (build_java_class_ref): Use `build_static_name' with a suffix, not a prefix, to build the class object's name. From-SVN: r36737
2000-10-05cp-tree.h (access_kind): Fix comment typo.Nathan Sidwell4-4/+11
* cp-tree.h (access_kind): Fix comment typo. * decl2.c (grokfield): Fix diagnostic typo. * semantics.c (finish_template_type): Fix comment typo. (finish_qualified_object_call_expr): Likewise. From-SVN: r36722
2000-10-05pt.c (tsubst_expr, [...]): Don't process if tsubsting fails.Nathan Sidwell2-11/+19
* pt.c (tsubst_expr, DECL_STMT case): Don't process if tsubsting fails. From-SVN: r36720
2000-10-05spew.c (frob_id): New static function.Nathan Sidwell2-50/+47
* spew.c (frob_id): New static function. (frob_opname): Use it. (yylex): Use it. From-SVN: r36719
2000-10-01c-decl.c (c_expand_body): Don't generate RTL if flag_syntax_only.Mark Mitchell3-10/+7
* c-decl.c (c_expand_body): Don't generate RTL if flag_syntax_only. (lang_mark_false_label_stack): Remove. * c-lex.c (init_c_lex): Add file_info_tree as GC root. Allocate <top level> string in GC area. (mark_splay_tree_node): New function. (mark_splay_tree): Likewise. * except.c (mark_eh_status): Only call lang_mark_false_label_stack if it exists. * ggc-callbacks.c (lang_mark_false_label_stack): Remove. * ggc-common.c (lang_mark_false_label_stack): Change type. * ggc.h (ggc_alloc_string): Add comment. (ggc_strdup): New function. * decl.c (lang_mark_false_label_stack): Remove. * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared. * com.c (lang_mark_false_label_stack): Remove. Convert to GC. * Make-lang.in (s-java): Don't depend on ggc-callbacks.o. * Makefile.in (BACKEND): Don't include ggc-callbacks.o. (typeck.o): Depend on ggc.h. * class.c (add_method_1): Use GC functions for allocation. (init_class_processing): Register roots. * decl.c (ggc_p): Set to 1. (pending_local_decls): Make it static. (push_jvm_slot): Use GC functions for allocation. (init_decl_processing): Register roots. (give_name_to_locals): Use GC functions for allocation. (lang_mark_tree): New function. * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Use GC functions for allocation. * jcf-parse.c (jcf_parse_source): Use ggc_strdup. * lex.c (java_lex): Use build_string, rather than replicating it inline. * parse.y (goal): Add more roots. (mark_parser_ctxt): New function. * typeck.c: Include ggc.h. * splay-tree.c (splay_tree_insert): Fix formatting. From-SVN: r36687
2000-09-30c-tree.texi, [...]: Consistently use @email for formatting email addresses.Joseph Myers2-1/+5
* c-tree.texi, contrib.texi, gcc.texi, install.texi, invoke.texi: Consistently use @email for formatting email addresses. cp: * gxxint.texi: Use @email for formatting email addresses. From-SVN: r36676
2000-09-29error.c: Remove direct obstack manipulation.Gabriel Dos Reis2-321/+300
cp/ * error.c: Remove direct obstack manipulation. Replace with output_buffer-based formatting. Adjust calls to removed macros. (obstack_chunk_alloc, obstack_chunk_free): Remove. (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP, OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise. testsuite/ * g++.old-deja/g++.ext/pretty3.C: Fix comparison with __PRETTY_FUNCTION__. * g++.old-deja/g++.ext/pretty2.C: Likewise. From-SVN: r36666
2000-09-26Remove stray whitespace on blank lineZack Weinberg1-1/+1
From-SVN: r36649
2000-09-26gcc.c (cpp_options): Add spec for -ftabstop=.Neil Booth1-7/+10
* gcc.c (cpp_options): Add spec for -ftabstop=. (invoke_as): New spec that handles invoking as. Update specs to handle -save-temps and -traditional. * ch/lang-specs.h, f/lang-specs.h, java/lang-specs.h: Use invoke_as. * cp/lang-specs.h, objc/lang-specs.h: Update to use invoke_as, and handle -save-temps and -traditional (if appropriate). From-SVN: r36646
2000-09-24c-tree.texi: Moved here from cp/ir.texi.Mark Mitchell2-2246/+4
* c-tree.texi: Moved here from cp/ir.texi. Documented nested functions. Generalize to handle both C and C++. * Makefile.in (c-tree.info): New target. (info): Add c-tree.info. * ir.texi: Move to ../c-tree.texi. From-SVN: r36592
2000-09-21* decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.Jason Merrill2-1/+5
From-SVN: r36566
2000-09-21errfn.c: Move declaration of cp_printer and cp_printers to ...Andreas Jaeger4-188/+191
* errfn.c: Move declaration of cp_printer and cp_printers to ... * cp-tree.h: ... here. * error.c: Remove declaration of cp_printer. From-SVN: r36557
2000-09-20* tree.c (mark_local_for_remap_r): Handle CASE_LABELs.Mark Mitchell2-0/+6
From-SVN: r36553
2000-09-20except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and users.Hans-Peter Nilsson2-32/+5
* except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and users. From-SVN: r36551
2000-09-19* decl.c (start_function): Robustify.Mark Mitchell2-3/+12
From-SVN: r36527
2000-09-19Makefile.in (c-common.o): Depend on diagnostic.h.Kaveh R. Ghazi4-3/+9
* Makefile.in (c-common.o): Depend on diagnostic.h. * c-common.c: Include diagnostic.h. (tfaff): Delete. (status_warning): New function. (check_format_info, maybe_read_dollar_number, check_format_types, finish_dollar_format_checking, check_function_format): Accept a `status' parameter. All callers changed. * c-common.h (check_function_format): Accept a `status' parameter. * c-typeck.c: Update call to `check_function_format'. cp: * cp-tree.h (check_function_format): Accept a `status' parameter. * call.c, typeck.c: Updates calls to `check_function_format'. From-SVN: r36524
2000-09-17decl2.c (handle_class_head): Always push some scope even in the error case.Geoff Keating2-4/+10
* decl2.c (handle_class_head): Always push some scope even in the error case. From-SVN: r36467
2000-09-17splay-tree.c (splay_tree_predecessor): Fix typo in comment.Mark Mitchell15-371/+97
* splay-tree.c (splay_tree_predecessor): Fix typo in comment. Convert the C front-end to use function-at-a-time mode. * c-common.h: Include splay-tree.h. (C_DECLARED_LABEL_FLAG): New macro. (struct language_function): Add x_scope_stmt_stack and x_function_name_declared_p. (RECHAIN_STMTS): Move definition. (lang_statment_code_p): Likewise. (lang_expand_stmt): Likewise. (lang_expand_decl_stmt): New variable. (lang_expand_function_end): Likewise. (current_scope_stmt_stack): New function. (add_decl_stmt): Likewise. (add_scope_stmt): Likewise. (mark_stmt_tree): Likewise. (struct c_lang_decl): New structure. (DECL_SAVED_TREE): Define. (c_mark_lang_decl): New function. (c_expand_start_cond): Change prototype. (c_finish_then): New function. (c_finish_else): Likewise. (current_function_name_declared): Remove. (set_current_function_name_declared): Likewise. (mark_c_language_function): Declare. (case_compare): Likewise. (c_add_case_label): Likewise. (c_expand_expr): Likewise. (c_safe_from_p): Likewise. * c-common.c (lang_expand_function_end): New variable. (struct if_elt): Add if_stmt. (c_expand_start_cond): Add the if-statement to the statement-tree, rather than generating RTL. (c_finish_then): New function. (c_expand_start_else): Don't generate RTL. (c_finish_else): New function. (c_expand_expr_stmt): Don't generate RTL. (statement_code_p): Add SCOPE_STMT. (case_compare): New function. (c_add_case_label): Likewise. (mark_stmt_tree): Likewise. (c_mark_lang_decl): Likewise. (mark_c_language_function): Likewise. (c_expand_expr): Likewise. (c_safe_from_p): Likewise. * c-decl.c (c_stmt_tree): New variable (c_scope_stmt_stack): Likewise. (c_function_name_declared_p): Likewise. (lang_expand_expr_stmt): Remove. (poplevel): Don't call output_inline_function for nested functions. (pushdecl): Don't set DECL_CONTEXT for a local declaration of an `extern' function. (redeclaration_error_message): Change means of computing whether or not a function is nested. (lookup_label): Don't call label_rtx. (init_decl_processing): Add more GC roots. (start_decl): Add DECL_STMTs to the statement-tree, rather than calling rest_of_decl_compilation. (finish_decl): Don't call expand_decl. (store_parm_decls): Begin the statement-tree, but don't generate RTL. (finish_function): Tie off the statement-tree. Call c_expand_body if appropriate. (c_expand_body): New function. (push_c_function_context): Save more information. (pop_c_function_contxt): Likewise. (copy_lang_decl): Now that we use DECL_LANG_SPECIFIC, copy it. (lang_mark_tree): Mark it. (current_stmt_tree): Adjust. (current_scope_stmt_stack): New function. (do_case): Remove. (set_current_name_declared): Likewise. (c_begin_compound_stmt): Define. (c_expand_decl_stmt): Likewise. * c-lang.c: Include rtl.h and expr.h. (lang_init): Set more language-specific hooks. * c-lex.c: Include expr.h. * c-parse.in: Changes throughout to add statements to the statement-tree, rather than generating RTL after every statement. * c-semantics.c (lang_expand_decl_stmt): Define. (add_decl_stmt): New function. (add_scope_stmt): Likewise. (finish_stmt_tree): Tweak. (genrtl_expr_stmt): Likewise. (genrtl_decl_stmt): Handle local labels, and call lang_expand_decl_stmt if required. (genrtl_for_stmt): Fix line-number handling. (genrtl_case_label): Handle cleanups. (genrtl_asm_stmt): Don't call combine_strings. (genrtl_compound_stmt): Simplify. (expand_stmt): Handle SCOPE_STMTs. * c-tree.h (struct lang_decl): New structure. (C_DECLARED_LABEL_FLAG): Remove. (c_begin_compound_stmt): Declare. (c_expand_decl_stmt): Likewise. (c_expand_start_case): Rename to c_start_case. (c_finish_case): New function. * c-typeck.c (start_init): Tweak setting of constructor_incremental. (c_expand_asm_operands): Tweak error-handling. Add to the statement-tree. (c_expand_return): Add to the statement-tree. (c_expand_start_case): Rename to ... (c_start_case): ... this. (struct c_switch): New type. (switch_stack): New variable. (do_case): Simplify. (c_finish_case): New function. * dependence.c: Include expr.h. (enum dependence_type): Change spelling of enumerals. (check_node_dependence): Adjust. * expr.h (lang_safe_from_p): Declare. (safe_from_p): Likewise. * expr.c (lang_safe_from_p): New variable. (safe_from_p): Give it external linkage. Use lang_safe_from_p. * stmt.c (expand_expr_stmt): Avoid clobberring of last_expr_type. * toplev.c (rest_of_decl_compilation): Robustify. * tree.c (contains_placeholder_p): Likewise. * Makefile.in: Update dependencies. * objc/objc-act.h: Adjust calculation of value for dummy_tree_code. * objc/objc-act.c: Include rtl.h, expr.h, and c-common.h. (objc_expand_function_end): New function. (finish_method_def): Use it. (init_objc): Initialize more language-specific hooks. * objc/Make-lang.in: Update dependencies. * cp-tree.h (struct cp_language_function): Remove x_scope_stmt_stack and name_declared. (current_scope_stmt_stack): Remove. (function_name_declared_p): New macro. (struct lang_decl_flags): Use c_lang_decl as a base class. (context): Remove. (struct lang_decl): Replace saved_tree with context. (DECL_FRIEND_CONTEXT): Adjust accordingly. (SET_DECL_FRIEND_CONTEXT): Likewise. (DECL_VIRTUAL_CONTEXT): Likewise. (DECL_SAVED_TREE): Remove. (C_DECLARED_LABEL_FLAG): Likewise. (cplus_expand_expr_stmt): Don't declare. (add_decl_stmt): Likewise. (add_scope_stmt): Likewise. * decl.c (mark_stmt_tree): Remove. (case_compare): Likewise. (finish_case_label): Use c_add_case_label. (init_decl_processing): Set more language-specific hooks. (build_enumerator): Fix typo in comment. (cplus_expand_expr_stmt): Remove. (mark_lang_function): Use mark_c_language_function. (lang_mark_tree): Use c_mark_lang_decl. * decl2.c: Change order of inclusion. * except.c: Likewise. * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR. Fall back on c_expand_expr. * friend.c: Include expr.h. * init.c: Change order of inclusion. * Makefile.in: Update dependencies. * lex.h (free_lang_decl_chain): Remove. * optimize.c (maybe_clone_body): Use function_name_declared_p. * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if it doesn't exist. (instantiate_decl): Use function_name_declared_p. * semantics.c (lang_expand_expr_stmt): Remove. (set_current_function_name_declared): Likewise. (current_function_name_declared): Likewise. (begin_compound_stmt): Use function_name_declared_p. (add_decl_stmt): Remove. (setup_vtbl_ptr): Use function_name_declared_p. (add_scope_stmt): Remove. (current_scope_stmt_stack): New function. (cp_expand_stmt): Don't handle SCOPE_STMTs. (expand_body): Use function_name_declared_p. * tree.c (cp_statement_code_p): Don't include SCOPE_STMT. * typeck.c: Change order of includes. (convert_sequence): Remove. From-SVN: r36464