aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-parse.c
AgeCommit message (Collapse)AuthorFilesLines
2000-07-12gcc_update (files_and_dependencies): Remove generated YACC files.Mark Mitchell1-3903/+0
* gcc_update (files_and_dependencies): Remove generated YACC files. * c-parse.c: Remove. * c-parse.h: Likewise. * c-parse.y: Likewise. * objc/objc-parse.c: Likewise. * objc/objc-pasre.y: Likewise. * Makefile.in ($(PARSE_H)): Depend directly on parse.y. * parse.c: Remove. * parse.h: Likewise. * parse-scan.c: Remove. From-SVN: r34982
2000-07-10c-parse.y: Regenerate.Ben Chelf1-142/+81
2000-07-10 Benjamin Chelf <chelf@codesourcery.com> * c-parse.y: Regenerate. * c-pasre.c: Likewise. From-SVN: r34944
2000-06-19c-parse.in (undeclared_variable_notice): Moved to c-typeck.c.Zack Weinberg1-472/+378
* c-parse.in (undeclared_variable_notice): Moved to c-typeck.c. (primary: IDENTIFIER): Just call build_external_ref. * c-parse.y, c-parse.c, objc/objc-parse.y, objc/objc-parse.c: Regenerate. * c-lex.c (lastiddecl): Remove. (yylex): Replace all instances of lastiddecl with local variables. * c-typeck.c (build_external_ref): New function. Treat decls with C_DECL_ANTICIPATED mostly the same as nonexistent decls. Look up the decl from the id here. Call lookup_objc_ivar. * c-lang.c (lookup_objc_ivar): Stub. * objc/objc-act.c (lookup_objc_ivar): New function. * c-tree.h: Prototype lookup_objc_ivar and build_external_ref. * c-lex.h: Don't declare lastiddecl. From-SVN: r34602
2000-06-05tree.h (VOID_TYPE_P): New macro.Nathan Sidwell1-294/+293
* tree.h (VOID_TYPE_P): New macro. (COMPLETE_OR_VOID_TYPE_P): Use VOID_TYPE_P. * c-decl.c (grokdeclarator): Use VOID_TYPE_P. (get_parm_info): Likewise. (store_parm_decls): Likewise. (combine_parm_decls): Likewise. (finish_function): Likewise. * c-typeck.c (build_function_call): Likewise. (build_binary_op): Likewise. (build_conditional_expr): Likewise. (internal_build_compound_expr): Likewise. (convert_for_assignment): Likewise. * stmt.c (expend_expr_stmt): Likewise. (warn_if_unused_value): Likewise. (expand_return): Likewise. * c-parse.in (primary): Likewise. * c-parse.y, c-parse.c, c-parse.h: Regenerate. * objc/objc-parse.y, objc/objc-parse.c: Regenerate. From-SVN: r34402
2000-05-09top level:Zack Weinberg1-8/+7
* Makefile.in (WARN_CFLAGS): Add -Wwrite-strings. (tree.o): Depend on output.h. * c-decl.c (pending_invalid_xref_file, current_function_prototype_file): Constify. (pushdecl): Constify a local char *. (define_label): Constify filename parameter. * c-lex.c (init_parse): Constify parameter and return value. * c-typeck.c (c_expand_asm_operands): Constify filename parameter. * c-tree.h: Update prototypes. * c-parse.in: Constify filename member of %union, and if_stmt_file. * c-parse.y, c-parse.c, c-parse.h, objc/objc-parse.y, objc/objc-parse.c: Regenerate. * dwarfout.c (dwarfout_init): Constify main_input_filename parameter. * dwarfout.h: Update prototypes. * expr.c (expand_expr): Constify a local char *. * flags.h: Constify main_input_filename. * function.c (expand_function_end): Constify filename parameter. * genrecog.c (make_insn_sequence): Use a character array for c_test_pos. (main): Remove unused variables. * input.h: Constify input_filename, main_input_filename, and file_stack.name. Update prototypes. * output.h: Declare first_global_object_name and weak_global_object_name here, as const char *. * stmt.c (expand_asm_operands): Constify filename parameter. * toplev.c (compile_file, push_srcloc, debug_start_source_file): Constify filename parameter. (input_filename, main_input_filename): Constify. * toplev.h: Update prototypes. * tree.c: Include output.h. Don't declare first_global_object_name or weak_global_object_name. Clean up string bashing in get_file_function_name_long. * tree.h (struct tree_decl): Constify filename member. (input_filename): Constify. Update prototypes. * varasm.c (first_global_object_name, weak_global_object_name): Constify. (assemble_start_function, assemble_variable): Clean up string bashing. * gcc.c: Constify all spec-related strings initialized, transitively, from string constants. Constify all strings and string variables related to multilibs. (set_spec, read_specs): Cast argument to free to PTR. (used_arg): Do not modify multilib_matches. Use strncmp plus length comparison to compare multilib switches. * genmultilib: Constify everything declared in multilib.h. ch: * ch-tree.h: Update prototypes. Remove prototypes for functions declared elsewhere. * decl.c (define_label): Constify filename parameter. * grant.c (globalize_decl, set_default_grant_file): Constify local char * variables. Don't declare first_global_object_name or asm_out_file. * lang.c (chill_real_input_filename): Constify. * lex.c (init_parse): Constify parameter and return value. * parse.c: Don't declare input_filename. (ch_expand_asm_operands): Constify filename parameter. (parse_multi_dimension_case_action): Constify local char *. * satisfy.c (safe_satisfy_decl): Constify local char *. cp: * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file, and pending_inline.filename. Update prototypes. * decl.c (define_label): Constify filename parameter. * decl2.c (warn_if_unknown_interface): Constify local char *. * input.c Constify input_source.filename. Don't declare input_filename or lineno. Constify filename parameter to feed_input. * lex.c (init_parse): Constify parameter and return value. (cp_pragma_interface, cp_pragma_implementation): Constify filename argument. (reinit_parse_for_method, reinit_parse_for_block, reinit_parse_for_expr, feed_defarg, handle_cp_pragma): Constify local char *. * pt.c: Don't declare lineno or input_filename. (print_template_context, tsubst_friend_function, tsubst_decl, tsubst, instantiate_decl): Constify local char *. * semantics.c (expand_body): Constify local char *. * tree.c (build_srcloc): Constify filename parameter. * typeck.c (c_expand_asm_operands): Constify filename parameter. f: * com.c (ffecom_subscript_check_): Constify array_name parameter. Clean up string bashing. (ffecom_arrayref_, ffecom_char_args_x_): Constify array_name parameter. (ffecom_do_entry_, ffecom_gen_sfuncdef_, ffecom_start_progunit_, ffecom_sym_transform_, ffecom_sym_transform_assign_): Constify local char *. (init_parse): Constify parameter and return value. * lex.c: Include dwarfout.h instead of prototyping dwarfout_* functions here. (ffelex_file_pop_, ffelex_file_push_): Constify filename parameter. (ffelex_hash_, ffelex_include_): Constify local char *. * std.c (ffestd_exec_end): Constify local char *. * where.c (ffewhere_file_new): Constify filename parameter. * where.h: Update prototypes. java: * check_init.c (check_init): Constify local char *. * class.c (push_class): Constify local char *. * java_tree.h: Update prototypes. * jcf-io.c (open_class): Constify filename parameter and return value. (find_class): Remove redundant string copy. Cast return from open_class. * jcf-parse.c (read_class, parse_class_file, yyparse): Constify local char *. * jcf-write.c (generate_bytecode_insns, generate_classfile): Constify local char *. * jcf.h (JCF): Constify filename and classname. (JCF_FINISH): Cast args to FREE to char * when appropriate. * lang.c (init_parse): Constify parameter and return value. * lex.c (java_get_line_col): Constify filename parameter. * parse.h: Constify parser_ctxt.filename. Update prototypes. * parse.y (java_parser_context_suspend, issue_warning_error_from_context, safe_layout_class): Constify local char *. * parse.c: Regenerate. From-SVN: r33804
2000-04-21Update. Build with the same version of bison.Jeff Law1-4/+5
From-SVN: r33322
2000-03-21tree.h (COMPLETE_TYPE_P): New macro.Nathan Sidwell1-7/+6
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-20c-parse.in (SAVE_WARN_FLAGS): Use size_int.Martin v. Löwis1-24/+19
* c-parse.in (SAVE_WARN_FLAGS): Use size_int. * c-parse.y, c-parse.c, objc/objc-parse.y, objc/objc-parse.c: Regenerated. From-SVN: r32648
2000-03-17* Clean up usages of TREE_INT_CST_LOW.Richard Kenner1-1/+1
* c-parse.in (RESTORE_WARN_FLAGS): Use tree_low_cst. * c-parse.y, c-parse.c, objc/objc-parse.y, objc/objc-parse.c: Regenerated. * c-tree.h (min_precision): Move declaration to here. * c-typeck.c (build_binary_op): Use host_integerp and tree_low_cst. (build_unary_op, add_pending_init): Use bit_position. (pending_init_member, process_init_element): Likewise. (really_start_incremental_init, push_init_level, pop_init_level): Don't make copies of nodes or modify them in place, use consistent types when tracking positions, and use tree routines computations. (set_init_index, output_init_element): Likewise. (output_pending_init_elements, process_init_element): Likewise. * dbxout.c (dbxout_type_fields): Use bit_position, host_integerp, tree_low_cst and int_bit_position; also minor cleanup. (dbxout_type_method_1, dbxout_range_type, dbxout_type): Likewise. (print_cst_octal): Precision is unsigned. (dbxout_symbol): Ensure DECL_INITIAL is in-range and use tree_low_cst. * dwarf2out.c (ceiling): Input and output are unsigned HOST_WIDE_INT. (simple_type_align_in_bits): Result is unsigned int. Use tree_int_low_cst and host_integerp. (simple_type_size_in_bits): Result is unsigned HOST_WIDE_INT. (field_byte_offset): Result is HOST_WIDE_INT. Change types of internal variables so alignments are unsigned int, offsets are HOST_WIDE_INT and sizes are unsigned HOST_WIDE_INT. Use host_integerp, tree_low_cst, and int_bit_position. (add_bit_offset_attribute): Likewise. (add_data_member_location_attribute): Use tree_cst_low. (add_bound_info): Use host_integerp, integer_zerop, and integer_onep. (add_bit_size_attribute): Use tree_low_cst. (add_pure_or_virtual_attribute, gen_enumeration_type_die): Likewise. * dwarfout.c: Similar changes to dwarf2out.c. * expr.c (expand_expr, case ARRAY_REF): Remove redundant code. * genoutput.c (n_occurences): Return -1 for null string. (strip_whitespace): Accept null string and make into function. (scan_operands): Reflect above changes. * sdbout.c (plain_type_1): Use host_integerp and tree_low_cst. (sdbout_field_types, sdbout_one_type): Likewise; also use bit_position. * ssa.c (rename_registers): Add missing cast of arg to bzero. * tree.c (int_size_in_bytes): Check for too big to represent. (bit_position, int_bit_position, host_integerp, tree_low_cst): New fns. * tree.h (host_integerp, tree_low_cst, bit_position, int_bit_position): New declarations. (min_precision): Delete from here. * varasm.c (decode_addr_const): Use host_integerp, bit_position, and int_bit_position. * objc/objc-act.c (encode_method_prototype): Sizes are HOST_WIDE_INT. (encode_method_def): Likewise. (build_ivar_list_initializer): Use int_bit_position. (generate_shared_structures): Convert size. (encode_type, encode_complete_bitfield): Use integer_zerop. (encode_bitfield): Use tree_low_cst and int_bit_position. * ch/typeck.c (min_precision): New function. (build_chill_slice): Use host_integerp and tree_low_cst. (expand_constant_to_buffer): Likewise and also int_bit_position. LO is unsigned HOST_WIDE_INT (build_chill_array_ref_1): Make `i' be HOST_WIDE_INT; use tree_low_cst. (extract_constant_from_buffer): Sizes are now HOST_WIDE_INT. Use host_integerp and tree_low_cst. (build_chill_bin_type): Use host_integerp and tree_low_cst. (layout_chill_range_type): Use tree_int_cst_sgn, compare_tree_int, tree_low_cst, and min_precision. (apply_chill_array_layout): Cleanups for types of variables and use tree_int_cst_sgn, compare_tree_int, and tree_low_cst. (apply_chill_field_layout): Likewise. * cp/class.c (build_vbase_path): Use integer_zerop. (build_vtable_entry): Use tree_low_cst. (get_vfield_offset): Use bit_position. (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT. Use tree_low_cst. (check_bitfield_decl): Set DECL_SIZE using convert. (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop. (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT. Use tree_low_cst. (finish_struct_1): Use bit_position. (dump_class_hierarchy): Use tree_low_cst. * cp/cp-tree.h (min_precision): Add declaration. * cp/decl.c (xref_tag, xref_basetypes): Use tree_low_cst. * cp/error.c (dump_type_suffix): Use host_integerp and tree_low_cst. (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst. * cp/expr.c (cplus_expand_constant): Use bit_position. * cp/init.c (build_vec_init): Use host_integerp and tree_low_cst. * cp/rtti.c (get_base_offset): Use bit_position. * cp/typeck.c (build_binary_op): Use integer_zerop, compare_tree_int, host_integerp, and tree_low_cst. (pointer_int_sum): Use integer_zerop. (build_component_addr): Use bit_position. * java/class.c (make_field_value): Properly handle sizes. (get_dispatch_vector): Use tree_low_cst and host_integerp. (layout_class_method): Count using trees. * java/decl.c (push_promoted_type): Set TYPE_{MIN,MAX}_VALUE with copy_node. * java/expr.c (java_array_data_offset): Use int_bit_position. (build_newarray, build_anewarray): Use host_integerp and tree_low_cst. (build_invokevirtual): Use tree_low_cst and do computations with trees. From-SVN: r32607
2000-03-14c-parse.y, [...]: Regenerate.Greg McGary1-1181/+1196
* c-parse.y, c-parse.c, c-parse.h: Regenerate. * objc/objc-parse.y, objc/objc-parse.c: Regenerate. From-SVN: r32541
2000-02-28regenJason Merrill1-378/+378
From-SVN: r32236
2000-01-30c-parse.in: Apply Ulrich's changes from c-parse.y.Zack Weinberg1-3/+3
* c-parse.in: Apply Ulrich's changes from c-parse.y. * c-parse.y, objc/objc-parse.y, c-parse.c, objc/objc-parse.c: Regenerate. From-SVN: r31698
2000-01-29Regenerated.Ulrich Drepper1-9/+9
From-SVN: r31694
2000-01-25c-common.c, [...]: Remove all references to obstack functions obsoleted by GC...Zack Weinberg1-477/+412
* 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-18c-parse.in (SAVE_WARN_FLAGS): Create an INTEGER_CST.Martin v. Löwis1-13/+16
* c-parse.in (SAVE_WARN_FLAGS): Create an INTEGER_CST. (RESTORE_WARN_FLAGS): Unpack it. Change semantic type of extension to ttype. * c-common.c (split_specs_attrs): Expect an INTEGER_CST. * c-parse.y, c-parse.c, objc/objc-parse.y, objc/objc-parse.c: Regenerate. From-SVN: r31478
2000-01-12c-common.c: PROTO -> PARAMS.Kaveh R. Ghazi1-1/+1
* 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
1999-12-17c-parse.in (string action): Do not warn about ANSI string concatenation in ↵Zack Weinberg1-112/+180
system headers. 1999-12-17 13:21 -0800 Zack Weinberg <zack@rabi.columbia.edu> * c-parse.in (string action): Do not warn about ANSI string concatenation in system headers. Affects C parser only. * c-parse.y, c-parse.c, c-parse.h: Rebuild. From-SVN: r30998
1999-12-10c-parse.in (string): With -Wtraditional, warn if ANSI string concatenation ↵Kaveh R. Ghazi1-279/+282
is utilized. * c-parse.in (string): With -Wtraditional, warn if ANSI string concatenation is utilized. * invoke.texi (-Wtraditional): Document it. From-SVN: r30863
1999-10-26c-parse.in (cast_expr): Constify.Kaveh R. Ghazi1-1/+1
* c-parse.in (cast_expr): Constify. * cccp.c (special_symbol): Likewise. * cse.c (hash_cse_reg_info, cse_reg_info_equal_p): Likewise. * dwarf2out.c (base_type_die): Likewise. * global.c (allocno_compare): Likewise. * local-alloc.c (qty_compare_1, qty_sugg_compare_1): Likewise. * regclass.c (fix_register): Likewise. * rtl.h (fix_register): Likewise. * stupid.c (stupid_reg_compare): Likewise. * toplev.c (decode_f_option): Likewise. * tree.c (build_complex_type): Likewise. From-SVN: r30196
1999-10-15c-parse.in (component_decl): Support anonymous struct/union.Alastair J. Houghton1-828/+837
* 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-09-22c-parse.in: save and restore warn_pointer_arith on __extension__ along with ↵Jim Kingdon1-382/+392
pedantic. * c-parse.in: save and restore warn_pointer_arith on __extension__ along with pedantic. (SAVE_WARN_FLAGS, RESTORE_WARN_FLAGS): Added. Set the type of extension to itype rather than $<itype>1 kludge. * extend.texi (Alternate Keywords): Adjust documentation. * c-parse.c, c-parse.y, objc-parse.c, objc-parse.y: Rebuilt. From-SVN: r29588
1999-09-07Linas Vepstas <linas@linas.org>Linas Vepstas1-378/+377
* c-common.c: Use ISGRAPH, ISLOWER, toupper. * c-lex.c, cccp.c, cexp.c, cexp.y, cppexp.c, dwarf2out.c, genattr.c, genattrtab.c, genemit.c, genextract.c, genpeep.c, tree.c: Likewise. * system.h (IN_CTYPE_DOMAIN): Define to 1 if HOST_EBCDIC. * defaults.h (TARGET_ESC): Add default. From-SVN: r29192
1999-09-06Merge in gcc2-ss-010999Jeff Law1-179/+110
From-SVN: r29150
1999-09-06Makefile.in (C_AND_OBJC_OBJS): Remove ggc-callbacks.o.Bernd Schmidt1-375/+386
* 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-197/+203
* 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-09-02c-parse.in (compstmt_primary_start): New, broken out of first part of ↵Richard Henderson1-1431/+1530
compstmt handling in primary. * c-parse.in (compstmt_primary_start): New, broken out of first part of compstmt handling in primary. (primary): Use it. Add an error clause. (compstmt_nostart): Renamed from compstmt; remove all initial invocations of compstmt_start. (compstmt): New. From-SVN: r29059
1999-08-31c-parse.in (language_string): Constify.Kaveh R. Ghazi1-1/+1
* c-parse.in (language_string): Constify. * dwarf2out.c (language_string): Remove declaration. * dwarfout.c (language_string): Likewise. * toplev.c (language_string, init_parse, finish_parse): Likewise. * tree.h (language_string, init_parse, finish_parse): Declare. * i386/sun386.h (language_string): Remove declaration. * mips.h (language_string): Likewise. * nextstep.h (language_string): Likewise. * nextstep21.h (language_string): Likewise. * rs6000.c (language_string): Likewise. In ch: * parse.c (language_string): Constify. In cp: * parse.y (language_string): Constify. In f: * com.c (language_string): Constify. In java: * lang.c (language_string): Constify. From-SVN: r29000
1999-08-04c-lex.c: Sync with C++ frontend.Jason Merrill1-1312/+1238
* c-lex.c: Sync with C++ frontend. (linemode): New variable. (parse_float): imag, conversion_errno, and type are output only. (yylex): Adjust. Move initial '.' case into main switch. Use linemode. (handle_generic_pragma): Just deal with tokens. (readescape): Use ISXDIGIT and ISGRAPH. * c-parse.in: Add END_OF_LINE token. * c-lex.c (lang_init): Generalize. (nextchar): Remove. Replace uses with UNGETC. (skip_white_space): Handle linemode here. Optimize for cpplib. (skip_white_space_on_line): Remove. (extend_token_buffer_to): New fn. (extend_token_buffer): Use it. (read_line_number, check_newline): Just deal with tokens. (token_getch, token_put_back): New fns. (yylex): Use them. More cpplib optimizations. Simplify. * c-lex.c (init_parse): Set cpp_token to CPP_DIRECTIVE. (consume_string): Make this smart about USE_CPPLIB. (check_newline): Rewrite to be intelligent about USE_CPPLIB. (yylex): Rewrite to be intelligent about USE_CPPLIB. Also, clean up cases where we redundantly set token_buffer[0]. (read_line_number): New fn. (ignore_escape_flag): New variable. From-SVN: r28507
1999-07-25builtins.c (expand_builtin_saveregs): Remove static, remove exp and ignore ↵Richard Henderson1-1520/+1625
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-04-26c-parse.in (absdcl1): Allow attributes in explicit typespecs.Mumit Khan1-871/+883
* c-parse.in (absdcl1): Allow attributes in explicit typespecs. (%expect): Update. * c-parse.y: Regenerate. * c-parse.c: Likewise. * objc/objc-parse.c: Likewise. * objc/objc-parse.y: Likewise. Co-Authored-By: Donn Terry <donn@interix.com> From-SVN: r26663
1999-04-22c-parse.in (expr_no_commas): Verify we've an expr before calling ↵Richard Henderson1-297/+306
C_SET_EXP_ORIGINAL_CODE. * c-parse.in (expr_no_commas): Verify we've an expr before calling C_SET_EXP_ORIGINAL_CODE. From-SVN: r26590
1999-01-11Update FSF address in copyright header.Jeff Law1-1/+2
From-SVN: r24614
1999-01-06Copyright fixes.Jeff Law1-3/+3
From-SVN: r24535
1999-01-04c-common.c (decl_attributes): Allow applying attribute `unused' on a LABEL_DECL.Kaveh R. Ghazi1-615/+609
* c-common.c (decl_attributes): Allow applying attribute `unused' on a LABEL_DECL. * c-parse.in (label): Parse attributes after a label, and call `decl_attributes' to handle them. * gansidecl.h (ATTRIBUTE_UNUSED_LABEL): Define. * genrecog.c (OUTPUT_LABEL, write_tree_1, write_tree): When generating labels, mark them with ATTRIBUTE_UNUSED_LABEL. * invoke.texi: Note that labels can be marked `unused'. From-SVN: r24478
1998-12-01c-common.c (declare_function_name): Declare predefinied variable `__func__'.Ulrich Drepper1-1123/+1176
* c-common.c (declare_function_name): Declare predefinied variable `__func__'. * c-decl.c (flag_isoc9x): Set to 1 by default. (c_decode_option): Handle -std= option. Remove -flang-isoc9x. (grokdeclarator): Always emit warning about implicit int for ISO C 9x. * c-parse.in: Allow constructors in ISO C 9x. Rewrite designator list handling. Allow [*] parameters. Don't warn about comma at end of enum definition for ISO C 9x. * cccp.c (c9x): New variable. (rest_extension): New variable. (print_help): Document new -std= option. (main): Recognize -std= option. Set c9x appropriately. (create_definition): Recognize ISO C 9x vararg macros. * gcc.c (default_compilers): Adjust specs for -std options. (option_map): Add --std. (display_help): Document -std. * toplev.c (documented_lang_options): Add -std and remove -flang-isoc9x. * c-lex.c (yylex): Recognize hex FP constants and call REAL_VALUE_ATOF or REAL_VALUE_HTOF based on base of the constants. * fold-const.c (real_hex_to_f): New function. Replacement function for hex FP conversion if REAL_ARITHMETIC is not defined. * real.c (asctoeg): Add handling of hex FP constants. * real.h: Define REAL_VALUE_HTOF if necessary using ereal_atof or real_hex_to_f. Co-Authored-By: Richard Henderson <rth@cygnus.com> Co-Authored-By: Stephen L Moshier <moshier@world.std.com> From-SVN: r24049
1998-10-21invoke.texi: Document -flang-isoc9x.Mark Mitchell1-3/+3
* invoke.texi: Document -flang-isoc9x. * Makefile.in (OBJS): Add splay-tree.o. (c-common.o): Depend on rtl.h. (splay-tree.o): List dependencies and provide build rule. * rtl.h (record_alias_subset): New function. * alias.c: Include splay-tree.h. (alias_set_entry): New type. (CHECK_ALIAS_SETS_FOR_CONSISTENCY): Remove. (DIFFERENT_ALIAS_SETS_P): Use mem_in_disjoint_alias_sets_p. (mems_in_disjoin_alias_sets_p): New function. (alias_set_compare): Likewise. (insert_subset_children): Likewise. (get_alias_set_entry): Likewise. * tree.h (TYPE_RESTRICT): New macro. (TYPE_UNQUALIFIED): New manifest constant. (TYPE_QUAL_CONST): Likewise (TYPE_QUAL_VOLATILE): Likewise. (TYPE_QUAL_RESTRICT): Likewise. (tree_type): Add restrict_flag. Reduce count of free bits. (DECL_POINTER_ALIAS_SET): New macro. (DECL_POINTER_ALIAS_SET_KNOWN_P): Likewise. (tree_decl): Add pointer_alias_set. (build_qualified_type): New function. (build_type_variant): Define in terms of build_qualified_type. * tree.c (set_type_quals): New function. (make_node): Initializae DECL_POINTER_ALIAS_SET. (build_type_attribute_variant): Use build_qualified_type and set_type_quals. (build_type_variant): Rename, and modify, to become... (build_qualified_type): New function. (build_complex_type): Use set_type_quals. * c-tree.h (C_TYPE_OBJECT_P): New macro. (C_TYPE_FUNCTION_P): Likewise. (C_TYPE_INCOMPLETE_P): Likewise. (C_TYPE_OBJECT_OR_INCOMPLETE_P): Likewise. (c_apply_type_quals_to_decl): New function. (c_build_qualified_type): New function. (c_build_type_variant): Define in terms of c_build_qualified_type. (flag_isoc9x): Declare. * c-typeck.c (qualify_type): Use c_build_qualified_type. (common_type): Change to use TYPE_QUALS. (comptypes): Likewise. (convert_for_assignment): Likewise. * c-aux-info.c (gen_type): Likewise. Deal with `restrict'. * c-decl.c (flag_isoc9x): Define. (c_decode_option): Handle -flang-isoc9x. (grokdeclarator): Update to handle restrict. Use TYPE_QUALS, c_build_qualified_type, etc. Use c_apply_type_quals_to_decl. * c-lex.c (init_lex): Deal with restrict. (init_lex): Don't treat restrict as a reserved word in -traditional mode, or without -flang-isoc9x. * c-lex.h (rid): Add RID_RESTRICT. * c-parse.gperf (restrict, __restrict, __restrict__): Make equivalent to RID_RESTRICT. * c-parse.in (TYPE_QUAL): Update comment. * c-common.c: Include rtl.h. (c_find_base_decl): New function. (c_build_type_variant): Rename, and modify, to become ... (c_build_qualified_type): New function. (c_apply_type_quals_to_decl): Likewise. (c_get_alias_set): For INDIRECT_REFs, check to see if we can find a particular alias set for the reference. * toplev.c (documented_lang_options): Add -flang-isoc9x. From-SVN: r23212
1998-07-06c-parse.in (struct_head, [...]): New nonterminals.Jason Merrill1-1196/+1221
* c-parse.in (struct_head, union_head, enum_head): New nonterminals. (structsp): Use them. Update files generated from c-parse.in. * extend.texi (Type Attributes): Document it. From-SVN: r20971
1998-05-07More toplev.h cleanup, regnerate c-parse.c.Jim Wilson1-362/+363
From-SVN: r19614
1998-05-05* Check in merge from gcc2. See ChangeLog.12 for details.Jeff Law1-367/+373
From-SVN: r19553
1998-04-06More system.h cutover patches:Kaveh R. Ghazi1-8/+1
* c-parse.in: Include system.h, and remove stuff now made redundant. * cccp.c: Likewise. * cexp.y: Likewise. * protoize.c: Likewise. Properly check for cpp stringification. * Makefile.in (c-parse.o, cccp.o, cexp.o, protoize.o, unprotoize.o): Depend on system.h. * objc/Make-lang.in (objc-parse.o): Likewise. From-SVN: r19020
1998-03-23c-parse.in: Recognize protocol qualifiers in class definitions for objc.H.J. Lu1-368/+367
* c-parse.in: Recognize protocol qualifiers in class definitions for objc. Include "output.h". (yyerror): Remove redundant decl. (yyprint): Fix prototype. From-SVN: r18788
1998-02-24c-parse.y (undeclared variable error): Tweak error message to be clearer.Jeffrey A Law1-4/+4
* c-parse.y (undeclared variable error): Tweak error message to be clearer. From-SVN: r18226
1997-11-02Update mainline egcs to gcc2 snapshot 971021.Jeff Law1-16/+22
From-SVN: r16278
1997-11-02This commit was generated by cvs2svn to compensate for changes in r16274,Jeff Law1-1145/+1132
which included commits to RCS files with non-trunk default branches. From-SVN: r16275
1997-08-11Initial revisionmisc/cutover-egcs-1Jeff Law1-0/+3859
From-SVN: r14764