aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-decl.c
AgeCommit message (Collapse)AuthorFilesLines
2000-03-26c-convert.c (convert): Return if output or input type is ERROR_MARK.Richard Kenner1-29/+36
* c-convert.c (convert): Return if output or input type is ERROR_MARK. * c-decl.c (duplicate_decls): Only look at DECL_BUILT_IN_NONANSI and DECL_INLINE if FUNCTION_DECL. (pushdecl, redeclaration_error_message): Likewise, for DECL_INLINE. (store_parm_decls): Check for type of PARM_DECL being ERROR_MARK. Use DECL_WEAK, not DECL_RESULT, to flag for already seen. (combine_parm_decls): Likewise. * ggc-common.c (gcc_mark_tree_children, case 'd'): Use DECL_RESULT_FLD. * print-tree.c (print_node): Likewise. Only test DECL_PACKED, DECL_INLINE, DECL_BIT_FIELD, and DECL_TRANSPARENT_UNION on proper decl types. Properly handly DECL_INCOMING_RTL and DECL_SAVED_INSNS. * stor-layout.c (layout_decl): Only check DECL_PACKED and DECL_BIT_FIELD of FIELD_DECL. * tree.h (DECL_RESULT_FLD): New macro. * cp/class.c (check_field_decl): Fix typo. (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS. (check_methods): Likewise. (check_field_decls): Likewise. Use DECL_CONTEXT, not DECL_FIELD_CONTEXT. * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT): Use DECL_RESULT_FLD, not DECL_RESULT. * cp/decl.c (xref_tag): Use DECL_TEMPLATE_RESULT. * cp/lex.c (identifier_type): Likewise. * cp/pt.c (determine_specialization, lookup_template_class): Likewise. (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise. (resolve_overloaded_unification, more_specialized): Likewise. * cp/semantics.c (finish_member_declaration): Likewise. * cp/typeck.c (build_x_function_call): Likewise. From-SVN: r32759
2000-03-23builtin.c (get_pointer_alignment): Use DECL_P and TYPE_P macros.Theodore Papadopoulo1-1/+1
* builtin.c (get_pointer_alignment): Use DECL_P and TYPE_P macros. * c-common.c (decl_attributes,check_format_info,truthvalue_conversion, c_get_alias_set): Likewise. * c-decl.c (duplicate_decls): Likewise. * c-typeck.c (default_conversion,build_unary_op): Likewise. * calls.c (initialize_argument_information): Likewise. * dwarf2out.c (decl_class_context,add_abstract_origin_attribute): Likewise. * dwarfout.c (decl_class_context,output_type): Likewise. * expr.c (get_inner_reference): Likewise. * fold-const.c (simple_operand_p,fold): Likewise. * function.c (aggregate_value_p): Likewise. * stmt.c (expand_asm_operands): Likewise. * varasm.c (named_section): Likewise. * call.c (check_dtor_name,build_new_method_call): Likewise. * decl.c (push_class_binding,poplevel,pushtag,lookup_namespace_name, make_typename_type,check_initializer,cp_finish_decl,xref_tag): Likewise. * decl2.c (grokfield,build_expr_from_tree,build_expr_from_tree, decl_namespace,arg_assoc_template_arg,arg_assoc, validate_nonmember_using_decl,do_class_using_decl): Likewise. * error.c (dump_template_argument,dump_expr,cp_file_of,cp_line_of, args_to_string): Likewise. * friend.c (is_friend): Likewise. * lex.c (note_got_semicolon,note_list_got_semicolon,is_global): Likewise. * method.c (build_overload_nested_name,build_overload_value, build_qualified_name,build_qualified_name,hack_identifier): Likewise. * parse.y (typename_sub,typename_sub1): Likewise. * pt.c (push_inline_template_parms_recursive,check_template_shadow, process_partial_specialization,convert_template_argument, template_args_equal,add_pending_template,lookup_template_class, for_each_template_parm_r,maybe_fold_nontype_arg, tsubst,instantiate_template,type_unification_real,unify, instantiate_pending_templates,set_mangled_name_for_template_decl): Likewise. * repo.c (repo_get_id,repo_template_used): Likewise. * search.c (lookup_field_1): Likewise. * tree.c (walk_tree,get_type_decl,cp_tree_equal,member_p): Likewise. * xref.c (classname): Likewise. From-SVN: r32698
2000-03-21tree.h (COMPLETE_TYPE_P): New macro.Nathan Sidwell1-15/+16
gcc * tree.h (COMPLETE_TYPE_P): New macro. (COMPLETE_OR_VOID_TYPE_P): New macro. (COMPLETE_OR_UNBOUND_ARRAY_TYPE_P): New macro. * stor-layout.c (layout_type, case VOID_TYPE): Don't set TYPE_SIZE. * c-aux-info.c (gen_type): Use them. * c-common.c (c_expand_expr_stmt): Likewise. * c-decl.c (poplevel, pushdecl, start_decl, finish_decl, grokdeclarator, grokparms, finish_struct, start_function, store_parm_decls, combine_parm_decls): Likewise. * c-parse.y (cast_expr): Likewise. * c-typeck.c (require_complete_type, c_sizeof, c_sizeof_nowarn, c_size_in_bytes, c_alignof, build_component_ref, build_indirect_ref, build_array_ref, convert_arguments, build_binary_op, pointer_diff, build_unary_op, digest_init: Likewise. * calls.c (initialize_argument_information): Likewise. * convert.c (convert_to_integer): Likewise. * dbxout.c (dbxout_typedefs, dbxout_type, dbxout_symbol): Likewise. * dwarfout.c (location_or_const_value_attribute, output_enumeration_type_die, output_structure_type_die, output_union_type_die, output_type): Likewise. * expr.c (safe_from_p, expand_expr): Likewise. * function.c (assign_parms): Likewise. * sdbout.c (sdbout_symbol, sdbout_one_type): Likewise. * tree.c (build_array_type, build_function_type, build_method_type, build_offset_type, build_complex_type): Likewise. * c-parse.c, c-parse.h: Regenerated. gcc/cp * typeck.c (require_complete_type, complete_type, complete_type_or_else, c_sizeof, c_sizeof_nowarn, build_array_ref, convert_arguments, pointer_diff, build_x_unary_op, build_unary_op, build_c_cast, build_modify_expr): Use COMPLETE_TYPE_P etc. * call.c (is_complete, convert_like_real, build_new_method_call): Likewise. * class.c (build_vbase_pointer_fields, check_bases, build_base_field, finish_struct_1, pushclass): Likewise. * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise. * decl.c (maybe_process_template_type_declaration, pushtag, pushdecl, redeclaration_error_message, start_decl, start_decl_1, layout_var_decl, check_initializer, cp_finish_decl, grokdeclarator, require_complete_types_for_parms, grok_op_properties, xref_tag, xref_basetypes, check_function_type): Likewise. * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise. * friend.c (do_friend): Likewise. * init.c (build_offset_ref): Likewise. * parse.y (structsp): Likewise. * pt.c (maybe_process_partial_specialization, tsubst_friend_function, instantiate_class_template, tsubst, do_type_instantiation, instantiate_pending_templates): Likewise. * repo.c (repo_get_id): Likewise. * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1, synthesize_tinfo_var, emit_support_tinfos): Likewise. * search.c (lookup_fnfields_1, lookup_conversions): Likewise. * semantics.c (begin_class_definition): Likewise. * tree.c (build_cplus_method_type): Likewise. * typeck2.c (digest_init, build_functional_cast, add_exception_specifier): Likewise. * parse.h, parse.c: Regenerated. From-SVN: r32671
2000-03-08c-common.h (make_fname_decl): Declare.Nathan Sidwell1-0/+39
gcc: * c-common.h (make_fname_decl): Declare. * c-common.c (make_fname_decl): Define. (declare_hidden_char_array): Remove. (declare_function_name): Use make_fname_decl. * c-decl.c (c_make_fname_decl): New function. (init_decl_processing): Set make_fname_decl. gcc/cp: * decl.c (cp_make_fname_decl): New function. (wrapup_globals_for_namespace): Don't emit unused static vars. (init_decl_processing): Remove comment about use of array_domain_type. Set make_fname_decl. (cp_finish_decl): Remove __FUNCTION__ nadgering. * semantics.c (begin_compound_stmt): Remove current_function_name_declared flagging. (expand_stmt): Don't emit unused local statics. * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls specially. From-SVN: r32418
2000-03-07tree.h (INT_CST_LT, [...]): Remove unneeded casts.Richard Kenner1-60/+55
* tree.h (INT_CST_LT, INT_CST_LT_UNSIGNED): Remove unneeded casts. (struct tree_int_cst): int_cst_low is now unsigned HOST_WIDE_INT. (attribute_hash_list, type_hash_canon): hashcode is now unsigned. (type_hash_lookup, type_hash_add, type_hash_list): Likewise. (min_precision): Result is unsignd. (add_double, neg_double, mul_double): Low word is unsigned. (lshift_double, rshift_double, lrotate_double): Likewise. (rrotate_double, div_and_round_double): Likewise. (tree_floor_log2, compare_tree_int): New functions. (preserve_rtl_expr_temps): New declaration. * c-common.c (declare_hidden_char_array): Use compare_tree_int. (decl_attributes): Use tree_log2 to find alignment. Check for TREE_INT_CST_HIGH for format args. (min_precision): Now unsigned. Use tree_floor_log2. (truthvalue_conversion): Delete long-disabled code. * c-decl.c (finish_struct): Clean up tests on field width. (finish_function): Use compare_tree_int. * c-pragma.c (handle_pragma_token): Use tree_log2 for alignment. * c-typeck.c (comptypes): Use tree_int_cst_equal. (default_conversion, digest_init): Use compare_tree_int. (build_binary_op): Use integer_all_onesp and compare_tree_int. Fix type errors in forming masks. * calls.c (initialize_argument_information): Use compare_tree_int. * dbxout.c (dbxout_type): Cast TREE_INT_CST_LOW to HOST_WIDE_INT. * except.c (expand_eh_region_start_tree): Use compare_tree_int. * expr.c (is_zeros_p, case INTEGER_CST): Use integer_zerop. (store_field): Use compare_tree_int. (expand_expr, case CONSTRUCTOR): Use TYPE_SIZE_UNIT. (expand_expr, case ARRAY_REF): Use compare_tree_int. (do_jump, case BIT_AND_EXPR): Use tree_floor_log2. (do_store_flag): Use compare_tree_int. * fold-const.c (encode, decode): Low part is always unsigned. (force_fit_type, add_double, neg_double, mul_double): Likewise. (lshift_double, rshift_double, lrotate_double): Likewise. (rrotate_double, div_and_round_double, int_const_binop): Likewise. (fold_convert): Use compare_tree_int. (operand_equal_p, case INTEGER_CST): Use tree_int_cst_equal. (invert_truthvalue, case INTEGER_CST): Likewise. (fold): Use compare_tree_int; add casts for unsigned TREE_INT_CST_LOW. * mkdeps.c (deps_dummy_targets): Make I unsigned. * rtl.h (add_double, neg_double, mul_double): Low words are unsigned. (lshift_double, rshift_double, lrotate_double, rrotate_double): Likewise. * stmt.c (expand_decl): Use compare_tree_int and mode_for_size_tree. (expand_end_case): Use compare_tree_int. (estimate_case_costs): Cast TREE_INT_CST_LOW to HOST_WIDE_INT. * stor-layout.c (mode_for_size_tree): Use compare_tree_int. (layout_decl): Likewise. (layout_record, layout_union): Make sizes unsigned. (layout_type, case VOID_TYPE): TYPE_SIZE must be bitsizetype. (layout_type, case QUAL_UNION_TYPE): Use compare_tree_int. * tree.c (struct type_hash): hashcode is unsigned. (build_type_attribute_variant, type_hash_list): Likewise. (type_hash_lookup, type_hash_add, type_hash_canon): Likewise. (attribute_hash_list, build_array_type, build_method_type): Likewise. (build_complex_type): Likewise. (real_value_from_int_cst): Remove unneeded casts. (integer_all_onesp): Add casts. (tree_floor_log2, compare_tree_int): New functions. (build_index_type): Use tree_int_cst_sgn. * varasm.c (assemble_variable): Use compare_tree_int. * ch/actions.c (chill_convert_for_assignment): INDEX is unsigned HOST_WIDE_INT. * ch/ch-tree.h (DECL_NESTING_LEVEL): Use TREE_INT_CST_HIGH since unsigned. * ch/except.c (chill_handle_on_labels): ALTERNATIVE is unsigned. Use compare_tree_int. (expand_goto_except_cleanup): Likewise. * cp/class.c (dfs_modify_vtables): I is now unsigned. (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int. (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT. * cp/error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned. * cp/init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT. * cp/method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned. * cp/typeck.c (build_binary_op, case TRUNC_DIV_EXPR): Call integer_all_onesp. * cp/typeck2.c (process_init_constructor): Use compare_tree_int. * f/com.c (ffecom_f2c_set_lio_code_): Use compare_tree_int. (ffecom_sym_transform_, ffecom_transform_common_): Likewise. (ffecom_transform_equiv_): Likewise. * java/decl.c (emit_init_test_initialization): Mark KEY as unused. * java/expr.c (build_newarray): Cast TREE_INT_CST_LOW to HOST_WIDE_INT. (build_anewarray): Likewise. * java/parse.y (patch_newarray): Likewise. * java/parse.c: Regenerated. From-SVN: r32383
2000-02-29c-decl.c (current_function_decl): Move to toplev.c.Martin v. Löwis1-5/+0
* c-decl.c (current_function_decl): Move to toplev.c. (init_decl_processing): Don't add current_function_decl as a ggc root here. * dbxout.c (dbxout_symbol): Change return type to int. (dbxout_symbol_location, dbxout_syms): Likewise. (dbxout_block): Don't emit LBRAC/RBRAC pairs for blocks without any locals. Use current_function_func_begin_label if set. * dbxout.h (dbxout_symbol, dbxout_syms): Change return type. * dwarf2out.c (dwarf2out_begin_prologue): Set current_function_func_begin_label. * final.c (final_start_function): Reset it. * toplev.c (current_function_decl): Define it here. (current_function_func_begin_label): New variable. (main): Add both as ggc roots. * tree.h (current_function_func_begin_label): Declare. * ch/decl.c (current_function_decl): Move to toplev.c. * cp/decl.c (current_function_decl): Move to toplev.c. * f/com.c (current_function_decl): Move to toplev.c. * java/decl.c (current_function_decl): Move to toplev.c. From-SVN: r32268
2000-02-28* Eliminate DECL_FIELD_SIZE.Richard Kenner1-11/+10
* builtins.c (built_in_class_names, built_in_names): New variables. * c-decl.c (finish_struct): Set specified size in DECL_SIZE. * expr.c (expand_expr, case COMPONENT_REF): Get field size from DECL_SIZE, not DECL_FIELD_SIZE. * print-tree.c (print_node): Remove code that prints extra blank lines in some cases. Properly handle inline and builtin function cases. * stor-layout.c (layout_decl): Get specified size from DEC_SIZE. * tree.h (built_in_class_named, built_in_names): New declarations. (union tree_decl): Rename internal unions to u1 and u2 and change some of their components. Add new field built_in_class. (DECL_ALIGN, DECL_INCOMING_RTL, DECL_SAVED_INSNS, DECL_FRAME_SIZE): Reflect above changes. (DECL_FUNCTION_CODE, DECL_BUILT_IN_CLASS): Likewise. (DECL_SET_FUNCTION_CODE, DECL_FIELD_SIZE): Deleted. * objc/objc-act.c (objc_copy_list): Use DECL_SIZE, not DECL_FIELD_SIZE. (encode_field_decl): Likewise; also remove obsolete test for bitfield. * ch/ch-tree.h (DECL_ACTION_NESTING_LEVEL): Use new tree union name. * ch/decl.c (finish_struct): Don't clear DECL_FIELD_SIZE. * ch/typeck.c (make_chill_struct_type): Likewise. (apply_decl_field_layout): General cleanup. Set DECL_SIZE instead of DECL_FIELD_SIZE. * cp/class.c (build_vtbl_or_vbase_field, check_methods): Don't clear DECL_FIELD_SIZE. (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not DECL_FIELD_SIZE. * cp/rtti.c (expand_class_desc): Likewise. * cp/cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name. (THUNK_VCALL_OFFSET): Likewise. (THUNK_DELTA): Reflect changes in ../tree.h. * java/java-tree.h (LABEL_PC): Relect name changes in ../tree.h. (DECL_BIT_INDEX): Use underlying representation. * java/parse.h (DECL_INHERITED_SOURCE_LINE): Likewise. From-SVN: r32249
2000-02-27builtins.c (c_strlen): Use size_diffop and return ssizetype value.Richard Kenner1-8/+13
* builtins.c (c_strlen): Use size_diffop and return ssizetype value. (expand_builtin_strcpy): Pass correct type to size_binop. (expand_builtin_strcmp): Likewise. Clean up conditional structure. * c-decl.c (init_decl_processing): Don't call set_sizetype twice. (complete_array_type): Don't use size_binop for MAXINDEX. * c-typeck.c (c_sizeof): Use size_one_node and TYPE_SIZE_UNIT. (c_sizeof_nowarn, c_size_in_bytes): Likewise. (c_alignof): Use size_one_node. (build_unary_op): Pass arg of proper type to size_binop. (really_start_incremental_init, push_init_level): Use sizetype for constructor{,_bit,_unfilled}_index. (pop_init_label, output_init_element): Likewise. (output_pending_init_elements, process_init_element): Likewise. * calls.c (compute_argument_block_size): Field VAR is ssizetype. * expr.c (store_expr): Use size_int. (store_constructor): Use proper types for size_binop args. (get_inner_reference, expand_expr, case ARRAY_REF): Likewise. (expand_expr_unaligned): Likewise. (string_contant): Return object of sizetype. * expr.h (SUB_PARM_SIZE): Call size_diffop and pass proper types. (ARGS_SIZE_RTX): Call ARGS_SIZE_TREE. (ARGS_SIZE_TREE): Pass proper types to size_binop. * fold-const.c (int_const_binop): Refine when size_int is called. (fold_convert): Likewise. (size_int_wide): Rework to take KIND as arg, only take low order bits, handle new sizetype_tab datatype, and chain entries in size_table. (size_int_type_wide): New function. (size_binop): Validate types of arguments. (ssize_binop): Deleted. (size_diffop): New function. (extract_muldiv): Only fold division into multiplication for sizetypes. * function.c (assign_parms): Use size_diffop and make sure VAR field is of ssizetype; also pass proper type to size_binop. (locate_and_pad_parm, pad_to_arg_alignment): Likewise. (round_down): Deleted from here. * store-layout.c (sizetype_tab): Now an array. (sizetype_set, early_root_list): New variables. (variable_size): Use size_one_node. (round_up): Pass proper type to size_binop. (round_down): Moved to here and corrected as above. (layout_record): Pass proper arg types to size_binop. (layout_type): Likewise. If sizetype_set is zero, record the type just laid out. (make_unsigned_type): Don't call set_sizetype; (make_signed_type): Likewise; also, call fixup_signed_type. (initialize_sizetypes): New function. (set_sizetype): Make copy of types, set TYPE_IS_SIZETYPE, and set name of bitsizetype to "bit_size_type". Fix up type of sizes of all types made before call. * tm.texi (ROUND_TYPE_SIZE_UNIT): New macro. * tree.c (fix_sizetype): Deleted. (build_common_tree_nodes): Call initialize_sizetypes. (build_common_tree_nodes_2): Don't call fix_sizetype. * tree.h (TYPE_IS_SIZETYPE): New macro. (initialize_sizetype): New declaration. (enum size_type_kind): New type. (struct sizetype_tab): Deleted. (sizetype_tab): Now array; adjust sizetype macros. (size_diffop, size_int_type_wide): New functions. (size_int_wide): Change number of args and type; access macros changed. (ssize_int, sbitsize_int): New macros. * config/i960/i960.h (ROUND_TYPE_SIZE): Use size_int. (ROUND_TYPE_SIZE_UNIT): New macro. * ch/actions.c (chill_convert_for_assignment): Don't use size_binop for things that aren't sizes. (expand_varying_length_assignment): Likewise. * ch/convert.c (digest_array_tuple, convert): Likewise. * ch/typeck.c (build_chill_slice, smash_dummy_type): Likewise. (build_chill_slice_with_range): Likewise. (build_chill_slice_with_length): Likewise. (build_array_from_set): Adjust types for size_binop. * ch/expr.c (build_concat_expr, build_chill_repetition_op): Likewise. (build_chill_sizeof): Use TYPE_SIZE_UNIT. * ch/tree.c (build_string_type): Pass proper type to size_binop. * cp/class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop on things that are not sizes; ssize_binop deleted. Call size_diffop when appropriate. (dfs_build_vcall_offset_vtbl_entries): Likewise. (build_primary_vtable, build_secondary_vtable): Likewise. (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise. Variable I is HOST_WIDE_INT. (get_vfield_offset): Pass proper types to size_binop. (size_extra_vtbl_entries, layout_virtual_bases): Likewise. (finish_struct_1): Likewise. (skip_rtti_stuff): Arg N is now pointer to signed. (layout_class_type): Use size_zero_node. * cp/cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed. * cp/cvt.c (cp_convert_to_pointer): Pass proper types to size_binop. * cp/decl.c (complete_arry_type): Pass proper types to size_binop. (xref_basetypes): BINFO_OFFSET is sizetype. * cp/error.c (dump_expr): Don't use size_binop non-sizes. * cp/expr.c (cplus_expand_constant): Pass proper types to size_binop. * cp/init.c (construct_virtual_bases): Fix type error. (build_vec_delete_1): Pass proper type to size_binop and don't fold result. * cp/lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype. * cp/rtti.c (get_base_offset): Pass proper type to size_binop. * cp/search.c (dfs_find_vbases): Fix type error. (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed. (dfs_get_vbase_types): BINFO_OFFSET is sizetype. * cp/tree.c (debug_binfo): Variable N is signed. Use HOST_WIDE_INT_PRINT_DEC. * cp/typeck.c (comptypes): sizetype is same as equivalent integer type. (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT, size_one_node and size_zero_node. (c_alignof): Use size_one_node. (build_component_addr): Pass proper types to size_binop. (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes. * f/com.c (ffecom_arrayref_): Convert args to size_binop to proper type. (ffecom_tree_canonize_ptr_): Don't use size_binop for non-sizes. (ffecom_tree_canonize_ref_): Likewise. (type_for_mode): Handle TImode. * f/ste.c (ffeste_io_dofio_, ffeste_io_douio_): Use TYPE_SIZE_UNIT. (ffeste_io_ciclist_): Likewise. * java/expr.c (build_java_ret): Pass proper type to size_binop. From-SVN: r32225
2000-02-19c-common.c (decl_attributes): Set DECL_SIZE_UNIT.Richard Kenner1-20/+5
* c-common.c (decl_attributes): Set DECL_SIZE_UNIT. * c-decl.c (duplicate_decls, finish_enum): Likewise. (finish_decl): Remove -Wlarger-than code from here. * flags.h (id_clash_len): Now int. (larger_than_size): Now HOST_WIDE_INT. * fold-const.c (size_int_wide): No more HIGH parm; NUMBER is signed. Clean up checking to see if in table. (make_bit_field_ref): Remove extra parm to bitsize_int. * ggc-common.c (ggc_mark_tree_children): Mark DECL_SIZE_UNIT. * print-tree.c (print_node): Print DECL_SIZE_UNIT and TYPE_SIZE_UNIT. * stmt.c (expand_decl): Use DECL_SIZE_UNIT for stack checking size and for computing size of decl. * stor-layout.c (layout_decl): Set DECL_SIZE_UNIT. Move -Wlarger-than code to here. (layout_record): Remove extra arg to bitsize_int. Set TYPE_BINFO_SIZE_UNIT. (layout_union): Remove extra arg to bitsize_int. Use proper type for size of QUAL_UNION. (layout_type): Remove extra arg to bitsize_int. * toplev.c (id_clash_len): Now int. (larger_than_size): Now HOST_WIDE_INT. (decode_W_option): Clean up id-clash and larger-than- cases. * tree.c (get_identifier, maybe_get_identifier): Remove unneeded casts. (expr_align, case FUNCTION_DECL): DECL_ALIGN is not defined. * tree.h (BINFO_SIZE_UNIT, TYPE_BINFO_SIZE_UNIT, DECL_SIZE_UNIT): New. (struct tree_decl): New field size_unit. (size_int_wide): No HIGH operand; NUMBER is now signed. (size_int_2): Deleted. (size_int, bitsize_int): Don't use it and rework args. * varasm.c (assemble_variable, output_constructor): Use DECL_SIZE_UNIT. * ch/decl.c (layout_enum): Set DECL_SIZE_UNIT. * ch/satisfy.c (safe_satisfy_decl): Likewise. * cp/class.c (build_primary_vtable, layout_vtable_decl): Likewise. (avoid_overlap, build_base_field): Likewise. (build_base_field, build_base_fields, is_empty_class): Test DECL_SIZE with integer_zero. (layout_class_type): Set CLASSTYPE_SIZE_UNIT. * cp/cp-tree.h (struct lang_type): New field size_unit. (CLASSTYPE_SIZE_UNIT): New macro. * cp/decl.c (init_decl_processing): Set DECL_SIZE_UNIT. (cp_finish_decl): Delete -Wlarger-than processing. * cp/optimize.c (remap_decl): Walk DECL_SIZE_UNIT. * cp/pt.c (tsubst_decl): Set DECL_SIZE_UNIT. * cp/tree.c (make_binfo): binfo vector is one entry longer. (walk_tree): Walk DECL_SIZE_UNIT. * f/com.c (ffecom_sym_transform): Use DECL_SIZE_UNIT. (ffecom_transform_common_, ffecom_transform_equiv_): Likewise. (duplicate_decls): Likewise. (ffecom_tree_canonize_ptr_): Delete extra arg to bitsize_int. (finish_decl): Delete -Wlarger-than processing. * java/class.c (build_class_ref, push_super_field): Set DECL_SIZE_UNIT. * java/constants.c (build_constants_constructor): Likewise. From-SVN: r32068
2000-01-31c-decl.c (c_decode_option): Accept optional numeric argument to -Wformat and ↵Ulrich Drepper1-0/+2
set warn_format. * c-decl.c (c_decode_option): Accept optional numeric argument to -Wformat and set warn_format. * c-common.c: Don't emit warning about non-constant printf format string unless warn_format > 1. From-SVN: r31706
2000-01-29Adjust variable names, comments, help strings to c99.Ulrich Drepper1-13/+15
Recognize options with names *99 as well. From-SVN: r31690
2000-01-25c-common.c, [...]: Remove all references to obstack functions obsoleted by GC...Zack Weinberg1-283/+30
* c-common.c, c-decl.c, c-lang.c, c-lex.c, c-parse.in, c-pragma.c, c-typeck.c, objc/objc-act.c: Remove all references to obstack functions obsoleted by GC, such as push_obstacks_nochange, end_temporary_allocation, savealloc, saveable_tree_cons, etc. and code which existed only to decide whether or not to call them. Remove now-unused NESTED argument from start_function; all callers changed. Do not change behavior based on ggc_p. The use of the ixp_obstack in c-iterate.c and the util_obstack in objc/objc-act.c remain; these are not obsoleted by garbage collection. * c-tree.h: Update prototype for start_function. * c-parse.y, c-parse.c, objc/objc-parse.c, objc/objc-parse.y: Rebuild. From-SVN: r31611
2000-01-12c-common.c: PROTO -> PARAMS.Kaveh R. Ghazi1-15/+15
* c-common.c: PROTO -> PARAMS. * c-common.h: Likewise. * c-decl.c: Likewise. * c-iterate.c: Likewise. * c-lang.c: Likewise. * c-lex.c: Likewise. * c-lex.h: Likewise. * c-parse.in: Likewise. * c-pragma.c: Likewise. * c-pragma.h: Likewise. * c-tree.h: Likewise. * c-typeck.c: Likewise. * objc/objc-act.c: Likewise. * objc/objc-act.h: Likewise. From-SVN: r31362
2000-01-05c-decl.c (finish_enum): Simplify code to determine minimum and maximum ↵Zack Weinberg1-49/+46
values of the enum... 2000-01-05 11:25 -0800 Zack Weinberg <zack@rabi.columbia.edu> * c-decl.c (finish_enum): Simplify code to determine minimum and maximum values of the enum, and calculate the type. Remove check for FUNCTION_DECLs in the values list, which cannot happen. Replace the DECL_INITIAL of each enumeration constant with a copy converted to the enumeration type. When updating variant types, don't bother updating the type itself. * c-typeck.c (build_binary_op): Simplify conditional expressions when weeding out spurious signed-unsigned warnings. Add new spurious warning category: if the unsigned quantity is an enum and its maximum value fits in signed_type(result_type). Update commentary. (build_conditional_expr): Warn here if one alternative is signed and the other is unsigned. From-SVN: r31244
1999-12-04c-common.c (enum attrs): Add A_NO_LIMIT_STACK.Geoff Keating1-0/+2
* c-common.c (enum attrs): Add A_NO_LIMIT_STACK. (init_attributes): Add A_NO_LIMIT_STACK. (decl_attributes): Handle A_NO_LIMIT_STACK. * c-decl.c (duplicate_decls): Handle DECL_NO_LIMIT_STACK. * explow.c (allocate_dynamic_stack_space) [!HAVE_allocate_stack]: Handle stack bounds checking. * flags.h (flag_stack_check): Use the word 'probe' rather than 'check', because the flag doesn't actually cause any checking to be done. * function.c (expand_function_start): Set current_function_limit_stack. * function.h (struct function): Add limit_stack. (current_function_limit_stack): Define. * invoke.texi (Code Gen Options): Document new options. * rtl.h: Declare stack_limit_rtx. * toplev.c (stack_limit_rtx): New variable. (decode_f_option): Handle new options -fstack-limit-register=REG, -fstack-limit-symbol=IDENT, -fno-stack-limit. (main): Add stack_limit_rtx as GC root. * tree.h (DECL_NO_LIMIT_STACK): New macro. (struct tree_decl): New member no_limit_stack. * config/rs6000/rs6000.c (rs6000_allocate_stack_space): Handle stack_limit_rtx. * config/rs6000/rs6000.md (allocate_stack): Handle stack_limit_rtx. (conditional_trap+1): Get new mnemonic correct. (conditional_trap+2): New pattern for DImode traps. * config/m68k/m68k.c (output_function_prologue): Handle stack_limit_rtx. * config/m68k/m68k.md (trap): New insn. (conditional_trap): New insn. * md.texi (Standard Names): Document `trap' and `conditional_trap'. * optabs.c (gen_cond_trap): Use start_sequence()/end_sequence() so a cc0 setter doesn't get emitted at some random place in the function. * config/i960/i960.md (trap): New insn. (conditional_trap): New expander. (conditional_trap+1, conditional_trap+2): New insns for signed and unsigned cases. * config/i960/i960.c (i960_function_prologue): Use STARTING_FRAME_OFFSET. Handle stack_limit_rtx. Co-Authored-By: Greg McGary <gkm@gnu.org> From-SVN: r30771
1999-11-25c-common.c (check_format_info): Don't call a variadic function with a ↵Kaveh R. Ghazi1-16/+21
non-literal format string. * c-common.c (check_format_info): Don't call a variadic function with a non-literal format string. * c-decl.c (grokdeclarator, start_struct, finish_struct): Likewise. * c-typeck.c (build_component_ref, build_unary_op, lvalue_or_else, pedantic_lvalue_warning, error_init, pedwarn_init, warning_init): Likewise. * cccp.c (check_macro_name, do_xifdef, vwarning_with_line): Likewise. * collect2.c (collect_wait): Likewise. * dbxout.c (dbxout_type): Likewise. * gcc.c (do_spec_1): Likewise. * genemit.c (gen_insn, gen_expand): Likewise. * genrecog.c (write_switch, write_subroutine): Likewise. * mips-tfile.c (catch_signal, botch): Likewise. * print-rtl.c (print_rtx): Likewise. * toplev.c (default_print_error_function, report_error_function, _fatal_insn): Likewise. From-SVN: r30666
1999-11-03* c-decl.c (duplicate_decls): Copy DECL_MODE too.Richard Henderson1-0/+1
From-SVN: r30377
1999-10-26tree.h (BLOCK_TYPE_TAGS): Remove.Mark Mitchell1-2/+0
* tree.h (BLOCK_TYPE_TAGS): Remove. (BLOCK_END_NOTE): Likewise. (BLOCK_LIVE_RANGE_FLAG): Likewise. (BLOCK_LIVE_RANGE_START): Likewise. (BLOCK_LIVE_RANGE_END): Likewise. (tree_block): Remove live_range_flag, live_range_var_flag, and type_tags. Remove end_note, live_range_start, and live_range_end. (remember_end_note): Remove prototype. * tree.c (build_block): Don't set BLOCK_TYPE_TAGS. * c-decl.c (poplevel): Don't set BLOCK_TYPE_TAGS or call remember_end_note. * ggc-common.c (ggc_mark_tree_children): Don't mark BLOCK_TYPE_TAGS or BLOCK_END_NOTE. * integrate.c (adjust_copied_decl_tree): Remove. * print-tree.c (print_node): Don't print BLOCK_TYPE_TAGS. * stmt.c (last_block_end_note): Remove. (init_stmt): Don't add a GC root for it. (expand_fixup): Don't set it. (remember_end_note): Remove. (expand_end_bindings): Don't set last_block_end_note. * ch-tree.h (remember_end_note): Remove prototype. * decl.c (poplevel): Don't call remember_end_note. * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS. Don't call remember_end_note. * com.c (poplevel): Don't call remember_end_note. * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS or call remember_end_note. From-SVN: r30188
1999-10-18c-decl.c (pushdecl): Use TYPE_CONTEXT rather than TREE_PERMANENT.Bernd Schmidt1-2/+4
* c-decl.c (pushdecl): Use TYPE_CONTEXT rather than TREE_PERMANENT. (finish_decl): Duplicate test for TREE_ASM_WRITTEN in else branch of if that tests TREE_PERMANENT. From-SVN: r30068
1999-10-15c-parse.in (component_decl): Support anonymous struct/union.Alastair J. Houghton1-60/+0
* c-parse.in (component_decl): Support anonymous struct/union. (%expect): Update. * c-parse.y: Regenerate. * c-parse.c: Likewise. * objc/objc-parse.y: Likewise. * objc/objc-parse.c: Likewise. * c-decl.c (finish_struct): Don't sort the fields. (field_decl_cmp): Delete unused function. Co-Authored-By: Mumit Khan <khan@xraylith.wisc.edu> From-SVN: r30016
1999-10-10checked in wrong versionJason Merrill1-2/+2
From-SVN: r29892
1999-10-07expr.c (expand_expr, [...]): Set TREE_USED sooner.Jason Merrill1-11/+9
* expr.c (expand_expr, TARGET_EXPR): Set TREE_USED sooner. * c-decl.c (finish_struct): Use simpler method of removing elements of a singly-linked list. From-SVN: r29860
1999-10-06* c-decl.c (ggc_p): Enable.Richard Henderson1-2/+2
From-SVN: r29851
1999-09-30Use lookup table to get register sizes in dwarf2 ehBernd Schmidt1-2/+2
From-SVN: r29730
1999-09-30c-tree.h (warn_float_equal): Declare.Dirk Zoller1-0/+8
* c-tree.h (warn_float_equal): Declare. * c-decl.c (warn_float_equal): Define. (c_decode_option): Recognize -W[no-]float-equal. * c-typeck.c (build_binary_op): Conditionally warn about equality tests of floating point types. * toplev.c (documented_lan_options): Add -W[no-]float-equal. From-SVN: r29722
1999-09-28c-decl.c (init_decl_processing): If MD_INIT_BUILTINS is defined, call it.Bernd Schmidt1-0/+4
* c-decl.c (init_decl_processing): If MD_INIT_BUILTINS is defined, call it. * reg-stack.c (straighten_stack): Copy hard reg set with COPY_HARD_REG_SET. From-SVN: r29694
1999-09-24Allow to distinguish between three classes of builtin functionsBernd Schmidt1-19/+19
From-SVN: r29653
1999-09-23toplev.c (documented_lang_options): Add -fshort-wchar.Jason Merrill1-2/+12
* toplev.c (documented_lang_options): Add -fshort-wchar. * c-decl.c (c_decode_option): Likewise. (init_decl_processing): If -fshort-wchar, use 'short unsigned int' for wchar_t. * c-common.c, c-lex.c: Get WCHAR_TYPE_SIZE from wchar_type_node. * gcc.c (default_compilers): If -fshort-wchar, override __WCHAR_TYPE__. * tm.texi (C Dialect Options): Add -fshort-wchar. From-SVN: r29638
1999-09-20Add comment saying that lang_decode_options should not complain aboutNick Clifton1-1/+2
unrecognised options. From-SVN: r29522
1999-09-10Move declarations and building code for common tree nodes to tree.[ch]Bernd Schmidt1-210/+25
From-SVN: r29266
1999-09-09c-decl.c (finish_function): When processing a nested function...Richard Henderson1-0/+9
* c-decl.c (finish_function): When processing a nested function, push and pop GC context around rest_of_compilation. From-SVN: r29255
1999-09-09ggc.h (lang_cleanup_tree): Remove.Mark Mitchell1-16/+5
* ggc.h (lang_cleanup_tree): Remove. * gcc-simple.c (ggc_free_tree): Don't call lang_cleanup_tree. * ggc-callbacks.c (lang_cleanup_tree): Remove. * c-decl.c (finish_struct): Use ggc_alloc to allocate TYPE_LANG_SPECIFIC when garbage collecting. (lang_cleanup_tree): Remove. From-SVN: r29242
1999-09-09* c-decl.c (mark_binding_level): Make static to match prototype.Kaveh R. Ghazi1-1/+1
From-SVN: r29219
1999-09-08gansidecl.h (__attribute__, [...]): Delete.Kaveh R. Ghazi1-3/+3
* gansidecl.h (__attribute__, ATTRIBUTE_UNUSED_LABEL, ATTRIBUTE_UNUSED, ATTRIBUTE_NORETURN, ATTRIBUTE_PRINTF, ATTRIBUTE_PRINTF_1, ATTRIBUTE_PRINTF_2, ATTRIBUTE_PRINTF_3, ATTRIBUTE_PRINTF_4, ATTRIBUTE_PRINTF_5, GENERIC_PTR): Delete. * c-decl.c (field_decl_cmp): Use PTR instead of GENERIC_PTR. * cccp.c (pcfinclude): Likewise. * global.c (allocno_compare): Likewise. * haifa-sched.c (rank_for_schedule): Likewise. * local-alloc.c (qty_sugg_compare_1, qty_compare_1): Likewise. * reload1.c (hard_reg_use_compare, reload_reg_class_lower): Likewise. * stupid.c (stupid_reg_compare): Likewise. * tree.c (_obstack_allocated_p): Likewise. * varray.h (varray_data_tag, VARRAY_GENERIC_PTR_INIT): Likewise. From-SVN: r29208
1999-09-07c-typeck.c (type_lists_compatible_p): Use simple_type_promotes_to.Richard Henderson1-19/+9
* c-typeck.c (type_lists_compatible_p): Use simple_type_promotes_to. (self_promoting_type_p): Delete. (self_promoting_args_p): Move ... * c-common.c: ... here. (c_common_nodes_and_builtins): Initialize lang_type_promotes_to. (simple_type_promotes_to): New. * builtins.c (lang_type_promotes_to): New. (expand_builtin_va_arg): Use it to give diagnostic for illegal types. * c-tree.h (C_PROMOTING_INTEGER_TYPE_P): Move ... * c-common.h: ... here. (self_promoting_args_p, simple_type_promotes_to): Declare. * c-decl.c (duplicate_decls): Use simple_type_promotes_to. (grokdeclarator): Likewise. * tree.h (lang_type_promotes_to): Declare. * cp-tree.h (C_PROMOTING_INTEGER_TYPE_P): Delete. * typeck.c (self_promoting_args_p): Delete. * gcc.dg/va-arg-1.c: New. From-SVN: r29180
1999-09-06Merge in gcc2-ss-010999Jeff Law1-2/+8
From-SVN: r29150
1999-09-06Makefile.in (C_AND_OBJC_OBJS): Remove ggc-callbacks.o.Bernd Schmidt1-0/+106
* Makefile.in (C_AND_OBJC_OBJS): Remove ggc-callbacks.o. (c-parse.o, c-decl.o, c-lang.o, c-lex.o, c-common.o, $(out_object_file)): Depend on ggc.h. * c-common.c: Include "ggc.h". (combine_strings): If doing GC, use ggc_alloc_string. * c-decl.c: Include "ggc.h". (ggc_p): Define with value 0. (mark_binding_level): New function. (init_decl_processing): Add GC roots. (mark_c_function_context): New function. (lang_mark_false_label_stack): New function. (lang_mark_tree): New function. (lang_cleanup_tree): New function. * c-lang.c: Include "ggc.h". (lang_init): Call c_parse_init. * c-lex.c: Include "ggc.h". (check_linenum): If doing GC, don't copy filenames to permanent obstack. * c-parse.in: Include "ggc.h". (c_parse_init): New function. * c-tree.h (c_parse_init, mark_c_function_context): Declare. * objc/Make-lang.in (objc-parse.o): Depend on ggc.h. * except.c (mark_eh_state): Mark more state. * function.c (mark_function_state): Likewise. * ggc-simple.c (ggc_alloc_rtvec): Bring in sync with non-gc version. (ggc_alloc_string) [GGC_DUMP]: Fix typo. * toplev.c (mark_file_stack): New function. (compile_file): If doing GC, use ggc_alloc_string on input filename. (main): Add root for input_file_stack. * i386.c: Include "ggc.h". (ix86_mark_machine_status): New function. (override_options): Set mark_machine_status. From-SVN: r29143
1999-09-05c-decl.c (struct language_function): Renamed from struct c_function.Bernd Schmidt1-21/+10
* c-decl.c (struct language_function): Renamed from struct c_function. Delete elt NEXT. (c_function_chain): Delete. (push_c_function_context): New arg F. Don't warn about nested functions here. Fill LANGUAGE elt of F. Delete code to update c_function_chain. Don't call push_function_context. (pop_c_function_context): New arg F. Restore from there instead of from c_function_chain. Don't call pop_function_context. Clear out LANGUAGE field of F when done. * c-lang.c: Include "function.h" (lang_init): Initialize save_lang_status and restore_lang_status. * c-parse.in (nested_function, nested_function_notype): Warn about nested functions. Call push_function_context/pop_function_context instead of the _c_ variants. * c-tree.h (push_c_function_context, pop_c_function_context): Update prototype. * Makefile.in (c-lang.o): Update dependencies. * emit-rtl.c (init_emit): Use xmalloc to allocate regno_reg_rtx, regno_pointer_flag, regno_pointer_align. (gen_reg_rtx): Use xrealloc to enlarge them. (free_emit_status): New function. * function.c (mark_machine_status, mark_lang_status): New variables. (assign_stack_local_1): Renamed from assign_outer_stack_local. Merge in some bits from assign_stack_local. All callers changed to use new name. (assign_stack_local): Just call assign_stack_local_1. (free_after_compilation): New function. (put_reg_into_stack): Simplify to always call assign_stack_local_1. (trampoline_address): Likewise. (assign_parms): Use xcalloc/xrealloc to allocate parm_reg_stack_loc. (prepare_function_start): Explicitly clear some more variables. * function.h (struct function): New elt can_garbage_collect. (mark_machine_status, mark_lang_status): Declare variables. (free_after_compilation, free_emit_status, free_varasm_status, init_varasm_status): Declare functions. * toplev.c (rest_of_compilation): Call free_after_compilation when done with the current function. * varasm.c (free_varasm_status): New function. From-SVN: r29117
1999-08-09Include function.h in most files.Bernd Schmidt1-0/+1
Include function.h in most files. Remove most of the global variables duplicated in function.h. Add accessor macros for them which access current_function. Delete INLINE_HEADER rtx and related code, replace with code using struct function to store inlining related data. From-SVN: r28626
1999-08-02expr.h (PROMOTE_PROTOTYPES): Move ...Richard Henderson1-1/+1
* expr.h (PROMOTE_PROTOTYPES): Move ... * defaults.h: ... to here. * c-decl.c: Include defaults.h instead of expr.h. * c-typeck.c: Include defaults.h. From-SVN: r28433
1999-08-02Jakub Jelinek <jj@ultra.linux.cz>Jakub Jelinek1-8/+9
* c-decl.c (get_parm_info, store_parm_decls): Change all uses of PROMOTE_PROTOTYPES, so that it tests it as a C expression. Ensure expr.h is included. * c-typecheck.c (convert_arguments): Ditto. * expr.h: Supply default for PROMOTE_PROTOTYPES (0). From-SVN: r28420
1999-07-25builtins.c (expand_builtin_saveregs): Remove static, remove exp and ignore ↵Richard Henderson1-0/+6
arguments, bail if no EXPAND_BUILTIN_SAVEREGS. * builtins.c (expand_builtin_saveregs): Remove static, remove exp and ignore arguments, bail if no EXPAND_BUILTIN_SAVEREGS. (expand_builtin_next_arg): Accept ARGLIST not EXP. (stabilize_va_list): New function. (std_expand_builtin_va_start): New function. (expand_builtin_va_start): New function. (get_varargs_alias_set): New function. (std_expand_builtin_va_arg): New function. (expand_builtin_va_arg): New function. (expand_builtin_va_end): New function. (expand_builtin_va_copy): New function. (expand_builtin): Call them. * c-common.c (c_common_nodes_and_builtins): Build __builtin_va_list, __builtin_{varargs_start,stdarg_start,end,copy}. (build_va_arg): New function. * c-common.h (CTI_PTR_TYPE, ptr_type_node): Delete. (build_va_arg): Declare. * c-decl.c (ptr_type_node, va_list_type_node): New. * c-parse.gperf (__builtin_va_arg): New. * c-parse.in (VA_ARG): New token. (unary_expr): Recognize it. * expr.c (expand_expr): Expand VA_ARG_EXPR. * expr.h (std_expand_builtin_va_start): Declare. (std_expand_builtin_va_arg): Declare. (expand_builtin_va_arg): Declare. (get_varargs_alias_set): Declare. * tree.def (VA_ARG_EXPR): New. * tree.h (BUILT_IN_VARARGS_START): New. (BUILT_IN_STDARG_START, BUILT_IN_VA_END): New. (ptr_type_node, va_list_type_node): Declare. * tm.texi (EXPAND_BUILTIN_SAVEREGS): Kill unused ARGLIST argument. * m32r.h (EXPAND_BUILTIN_SAVEREGS): Likewise. * m88k.h, m88k.c: Likewise. * mn10300.h, mn10300.c: Likewise. * pa.h, pa.c: Likewise. * rs6000.h, rs6000.c: Likewise. * sh.h, sh.c: Likewise. * sparc.h, sparc.c: Likewise. * emit-rtl.c (operand_subword): Copy alias set. (change_address): Likewise. From-SVN: r28243
1999-07-20c-common.h: New file.Bernd Schmidt1-417/+9
* c-common.h: New file. * c-common.c (permanent_obstack): Delete unused declaration. (c_global_trees): New array. (c_common_nodes_and_builtins): New function; split off common code from init_decl_processing in both c-decl.c and cp/decl.c. * c-tree.h: Delete lots of declarations of tree nodes; replaced by c_global_trees and accessor macros defined in c-common.h. Include c-common.h. * c-decl.c: Delete definitions for tree nodes that were replaced by c_global_trees. (init_decl_processing): Build void_list_node. Call c_common_nodes_and_builtins; delete code to generate the common builtins here. * objc/objc-act.c (build_module_descriptor): Rename variable void_list_node to avoid clash with c-common.h. * cp/cp-tree.h: Delete lots of declarations of tree nodes; replaced by c_global_trees and accessor macros defined in c-common.h. (cp_tree_index): New enumeration. (cp_global_trees): Declare new array. Add accessor macros for it, and delete declarations of tree nodes replaced by it. (builtin_function): Delete macro, add declaration for new function. Include c-common.h. * cp/decl.c: Delete definitions for tree nodes that were replaced by cp_global_trees and c_global_trees. (init_decl_processing): Call c_common_nodes_and_builtins; delete code to generate the common builtins here. (builtin_function): New function. * cp/decl2.c (abort_fndecl): Delete declaration. * cp/except.c (expand_builtin_return_address): Delete declaration. (builtin_return_address_fndecl): Delete variable. (const_ptr_type_node): Delete declaration. * cp/lex.c (cons_up_default_function): Delete declaration of void_list_node. * cp/parse.y (void_list_node): Delete declaration. * cp/rtti.c (type_info_type_node, tinfo_fn_id, tinfo_fn_type): Delete variables. (const_string_type_node): Delete declaration. * cp/search.c (abort_fndecl): Delete declaration. * Makefile.in: Update dependencies. * objc/Make-lang.in: Likewise. * cp/Makefile.in: Likewise. From-SVN: r28188
1999-07-02For gcc:Gavin Romig-Koch1-0/+18
* c-decl.c (widest_integer_literal_type_node, widest_unsigned_literal_type) : New. (init_decl_processing): Handle/use the two new types. * c-common.c (type_for_size,type_for_mode) : Same. * c-lex.c (yylex) : Same. * c-typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) : Same. * c-tree.h (widest_integer_literal_type_node, widest_unsigned_literal_type) : New. For gcc/cp: * cp-tree.h (widest_integer_literal_type_node, widest_unsigned_literal_type) : New. * decl.c (widest_integer_literal_type_node, widest_unsigned_literal_type) : New. (init_decl_processing): Handle/use the two new types. * lex.c (real_yylex): Same. * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) : Same. From-SVN: r27923
1999-04-12c-decl.c (c_decode_option, [...]): Recognize -Wno-main so we can avoid warnings.Stan Cox1-9/+5
* c-decl.c (c_decode_option, start_decl, start_function, finish_function) : Recognize -Wno-main so we can avoid warnings. From-SVN: r26376
1999-02-18bitmap.c (bitmap_print): Qualify a char* with the `const' keyword.Kaveh R. Ghazi1-5/+5
* bitmap.c (bitmap_print): Qualify a char* with the `const' keyword. * bitmap.h (bitmap_print): Likewise. * c-decl.c (builtin_function, grokdeclarator, grokfield): Likewise. * c-lang.c (build_objc_string): Likewise. * c-lex.c (yyerror, extend_token_buffer): Likewise. Don't include limits.h or ctype.h. Remove unused variable `p'. * c-lex.h (yyerror): Qualify a char* with the `const' keyword. * c-pragma.c (handle_pragma_token): Likewise. * c-pragma.h (handle_pragma_token): Likewise. * c-tree.h (build_objc_string, builtin_function, grokfield, build_indirect_ref, lvalue_or_else, readonly_warning, error_init, pedwarn_init): Likewise. * c-typeck.c (convert_for_assignment, warn_for_assignment, push_string, warning_init, incomplete_type_error, build_indirect_ref, lvalue_or_else, readonly_warning, build_c_cast, spelling, push_member_name, print_spelling, error_init, pedwarn_init, start_init): Likewise. * objc/objc-act.c (build_objc_string): Likewise. * print-tree.c (print_node_brief, print_node): Likewise. * tree.h (lvalue_or_else, print_node, print_node_brief): Likewise. From-SVN: r25296
1999-01-31flags.h: Declare flag_no_ident.Zack Weinberg1-8/+0
� 1999-01-31 17:52 -0500 Zack Weinberg <zack@midnite.ec.rhno.columbia.edu> * flags.h: Declare flag_no_ident. * toplev.c: Define flag_no_ident. Process -f(no-)ident here. * c-decl.c: Don't define flag_no_ident. Don't process -f(no-)ident switches here. * ch/decl.c: Likewise. * cp/decl2.c: Likewise. * c-tree.h: Don't declare flag_no_ident. * ch/ch-tree.h: Likewise. * cp/cp-tree.h: Likewise. * config/elfos.h (ASM_FILE_END): Output final .ident directive only if !flag_no_ident. * config/ptx4.h: Likewise. * config/svr4.h: Likewise. * config/alpha/elf.h: Likewise. * config/arm/linux-elf.h: Likewise. * config/i386/sco5.h: Likewise. * config/i860/fx2800.h: Likewise. * config/mips/gnu.h: Likewise. * config/i386/osfrose.h: Likewise. * gcc.c (C specs): Map -Qn to -fno-ident. * ch/lang-specs.h: Likewise. * cp/lang-specs.h: Likewise. * f/lang-specs.h: Likewise. * objc/lang-specs.h: Likewise. * java/lang-specs.h: Likewise. From-SVN: r24940
1999-01-26Merge in gcc2 snapshot 19980929. See gcc/ChangeLog and gcc/FSFChangeLog forJeffrey A Law1-51/+59
details. From-SVN: r24879
1999-01-16c-decl.c (duplicate_decls): If `warn_traditional'...Kaveh R. Ghazi1-1/+9
* c-decl.c (duplicate_decls): If `warn_traditional', warn when a non-static function declaration follows a static one. * invoke.texi (-Wtraditional): Document the extra check now done by this flag. From-SVN: r24703
1998-12-09c-lang.c: (parse_options,parse_in): Added.Dave Brolley1-10/+1
Wed Dec 9 15:29:26 1998 Dave Brolley <brolley@cygnus.com> * c-lang.c: (parse_options,parse_in): Added. (lang_init_options): Initialized cpplib here. * c-decl.c (parse_options,cpp_initialized): Removed. (c_decode_option): Move initialization of cpplib to lang_init_options. From-SVN: r24219