Commit Graph

22 Commits

Author SHA1 Message Date
Mark Mitchell f09f1de5cf Makefile.in (c-common.o): Don't depend on c-tree.h or c-lex.h.
* Makefile.in (c-common.o): Don't depend on c-tree.h or c-lex.h.
	* c-common.c (ridpointers): Declare.
	* c-common.h (enum rid): Declare.
	(NORID): Likewise.
	(ridpointers): Likewise.
	* c-lex.c (ridpointers): Don't declare.
	(init_lex): Initialize ridpointers.
	* c-lex.h (enum rid): Don't declare.
	(NORID): Likewise.
	(RID_FIRST_MODIFIER): Likewise.
	(ridpointers): Likewise.

	* cp-tree.h (ridpointers): Don't declare.
	* decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
	(record_builtin_java_type): Likewise.
	(init_decl_processing): Likewise.
	* lex.c: Move inclusion of lex.h.
	(ridpointers): Don't define.
	(init_parse): Initialize ripdointers.  Use CP_RID_MAX instead of
	RID_MAX.
	* lex.h (enum rid): Rename to ...
	(enum cp_rid): ... this.
	(ridpointers): Don't declare.
	* parse.y: Move inclusion of lex.h.
	* parse.c: Regenerated.
	* spew.c: Move inclusion of lex.h.

	* cp-tree.h (struct language_function): Remove temp_name_counter.
	(temp_name_counter): Remove.
	(get_temp_name): Change prototype.
	(get_guard): New function.
	(get_guard_cond): Likewise.
	(set_guard): Likewise.
	* cvt.c (build_up_reference): Adjust call to get_temp_name.
	* decl.c (expand_static_init): Use get_guard and friends to
	implement guard variables.
	* decl2.c (get_temp_name): Assume that the variables created are
	always static.
	(get_sentry): Rename to ...
	(get_guard): ... this.  Implement new ABI guard	variables.
	(get_guard_bits): New function.
	(get_guard_cond): Likewise.
	(set_guard): Likewise.
	(start_static_initialization_or_destruction): Use them.
	(do_static_initialization): Replace sentry with guard throughout.
	(do_static_destruction): Likewise.
	* init.c (create_temporary_var): Add comment.

From-SVN: r34815
2000-06-30 18:20:42 +00:00
Zack Weinberg 7e585d16ce c-parse.in (undeclared_variable_notice): Moved to c-typeck.c.
* 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-19 22:28:28 +00:00
Greg McGary 4b4f19ec78 c-lex.h (enum rid): Add RID_BOUNDED & RID_UNBOUNDED.
* c-lex.h (enum rid): Add RID_BOUNDED & RID_UNBOUNDED.
	* c-lex.c (init_lex): Handle RID_BOUNDED & RID_UNBOUNDED.
	* c-parse.gperf (__bounded, __bounded__, __ptrbase, __ptrbase__,
	__ptrextent, __ptrextent__, __ptrvalue, __ptrvalue__,
	__unbounded, __unbounded__): New keywords.
	* c-parse.in (PTR_VALUE PTR_BASE PTR_EXTENT): New tokens.

From-SVN: r32540
2000-03-14 19:42:11 +00:00
Kaveh R. Ghazi 6e090c767a c-common.c: PROTO -> PARAMS.
* 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-12 22:47:13 +00:00
Kaveh R. Ghazi 5d5993dd31 bitmap.c (bitmap_print): Qualify a char* with the `const' keyword.
* 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-02-18 20:38:48 +00:00
Jeff Law 4283012f9f Copyright fixes.
From-SVN: r24535
1999-01-06 13:44:41 -07:00
Mark Mitchell 3932261a55 invoke.texi: Document -flang-isoc9x.
* 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-10-21 09:53:40 +00:00
Richard Frith-Macdonald f1488abaa3 c-lex.c (remember_protocol_qualifiers): Handle RID_BYREF.
* c-lex.c (remember_protocol_qualifiers): Handle RID_BYREF.
        (init_lex): Initialize ridpointers[RID_BYREF].
        * c-lex.h (enum rid): Add RID_BYREF.
        * c-parse.gperf: Add RID_BYREF as a type qualifier.
        * objc/objc-act.c (is_objc_type_qualifiers): Handle RID_BYREF.
        (encode_type_qualifiers): Similarly
        * c-gperf.h: Rebuilt.

From-SVN: r22918
1998-10-08 05:28:08 -06:00
Dave Brolley c87248620c configure.in (extra_c_objs): add prefix.o.
Thu May 21 11:51:15 1998  Dave Brolley  <brolley@cygnus.com>
	* configure.in (extra_c_objs): add prefix.o.
	(extra_cxx_objs): extra objects for C++ with cpplib.
	* configure: Regenerate.
	* c-tree.h: (get_directive_line): Different prototype for cpplib.
	(GET_DIRECTIVE_LINE): Macro wrapper for get_directive_line.
	* c-lex.h: (get_directive_line): Not needed here for cpplib.
	* c-lex.c: (yy_cur,yy_lim,yy_get_token): Move to c-common.c.
	(GET_DIRECTIVE_LINE): Move to c-common.c and rename to get_directive_line.
	* c-common.c (parse_in,parse_options,cpp_token): Declare for cpplib.
	(yy_cur,yy_lim,yy_get_token,get_directive,line): Moved here from c-lex.c

From-SVN: r19926
1998-05-21 04:54:04 -04:00
Kaveh R. Ghazi d6f4ec5199 Warning fixes:
* Makefile.in (c-lang.o): Depend on c-tree.h, c-lex.h and toplev.h.
	(c-lex.o): Depend on output.h.
	(c-common.o): Likewise.
	(stmt.o): Likewise.
	(calls.o): Likewise.
	(integrate.o): Depend on toplev.h.
	(regclass.o): Depend on output.h.
	(final.o): Depend on reload.h.
	* c-common.c: Include output.h.
	(check_format_info): Remove unused variable `integral_format'.
	* c-decl.c (print_lang_decl): Mark parameters `file', `node' and
	`indent' with ATTRIBUTE_UNUSED.
	(print_lang_type): Likewise.
	(maybe_build_cleanup): Likewise for parameter `decl'.
	(copy_lang_decl): Likewise for parameter `node'.
	* c-lang.c: Include c-tree.h, c-lex.h and toplev.h.
	(lang_print_xnode): Mark parameters `file', `node' and `indent'
 	with ATTRIBUTE_UNUSED.
	(lookup_interface): Likewise for parameter `arg'.
	(is_class_name): Likewise.
	(maybe_objc_check_decl): Likewise for parameter `decl'.
	(maybe_objc_comptypes): Likewise for parameters `lhs', `rhs' and
	`reflexive'.
	(maybe_objc_method_name): Likewise for parameter `decl'.
	(build_objc_string): Likewise for parameters `len' and `str'.
	* c-lex.c: Include output.h.
	* c-lex.h (position_after_white_space): Correct typo in prototype.
	* c-tree.h (finish_file, c_expand_start_cond, c_expand_start_else,
 	c_expand_end_cond, init_iterators): Add prototypes.
	* caller-save.c (set_reg_live): Mark parameters `reg' and `setter'
	with ATTRIBUTE_UNUSED.
	* calls.c: Include output.h.
	* cccp.c (pipe_closed): Mark parameter `signo' with
 	ATTRIBUTE_UNUSED.
	* combine.c: Move inclusion of expr.h to after insn-config.h.
	* iris6.h (ASM_IDENTIFY_GCC, ASM_IDENTIFY_LANGUAGE): Don't define
	as empty, rather define as ((void)0).
	* sparc.c (sparc_check_64): Add braces around ambiguous `else'.
	Add parentheses around assignment used as truth value.
	* cplus-dem.c (squangle_mop_up): Change return type to void.
	(internal_cplus_demangle): Remove unused parameter `options'.
	All callers changed.
	(cplus_demangle_opname): Remove function wide variable `int i' and
 	replace with `size_t i' at each location where it is used.
	(cplus_demangle_opname): change type of `i' from int to size_t.
	* cppexp.c (right_shift): Mark parameter `pfile' with
	ATTRIBUTE_UNUSED.
	* cpphash.c (cpp_lookup): Likewise.
	(cpp_hash_cleanup): Likewise.
	* cpplib.c (parse_name): Add a prototype and make it static.
	(null_underflow): Mark parameter `pfile' with ATTRIBUTE_UNUSED.
	(null_cleanup): Likewise for parameters `pbuf' and `pfile'.
	(macro_cleanup): Likewise for parameter `pfile'.
	(file_cleanup): Likewise.
	* cpplib.h (cpp_reader_init, cpp_options_init, cpp_start_read,
 	cpp_read_check_assertion, skip_rest_of_line): Add prototypes.
	* crtstuff.c (force_to_data, __CTOR_LIST__, force_to_data,
	__DTOR_END__, __FRAME_END__): Mark with ATTRIBUTE_UNUSED.
	* cse.c (cse_check_loop_start): Mark parameter `set' with
 	ATTRIBUTE_UNUSED.
	* dbxout.c (flag_minimal_debug, have_used_extensions,
	source_label_number): Move inside macro wrapper check against
	defined (DBX_DEBUGGING_INFO) || defined (XCOFF_DEBUGGING_INFO).
	* dwarf2out.c (gen_entry_point_die): Hide prototype and definition.
	* except.h (doing_eh): Provide prototype.
	* expr.c: Move inclusion of expr.h to after insn-config.h.
	* final.c: Include reload.h.
	(shorten_branches): Cast the first argument of bzero to char *.
	* fix-header.c (cpp_print_containing_files): Mark parameter
 	`pfile' with ATTRIBUTE_UNUSED.
	(cpp_fatal): Likewise.
	* flow.c (find_basic_blocks_1): Cast the first argument of bzero
	to char *.
	* genattrtab.c (make_length_attrs): Change the type of variable
	`i' from int to size_t.
	(zero_fn): Mark parameter `exp' with ATTRIBUTE_UNUSED.
	(one_fn): Likewise.
	* genextract.c (main): When generating insn-extract.c, mark
	variable `junk' with ATTRIBUTE_UNUSED.
	* gengenrtl.c (gencode): When generating genrtl.c, cast the first
	argument of bzero to char*.
	* integrate.c: Include toplev.h.
	* libgcc2.c: Wrap `struct exception_table' and
	`find_exception_handler' in macro DWARF2_UNWIND_INFO.
	* objc/Make-lang.in (objc-act.o): Depend on toplev.h.
	* objc/objc-act.c: Include toplev.h.
	(lang_print_xnode): Mark parameters `file', `node' and `indent'
	with ATTRIBUTE_UNUSED.
	(finish_protocol): Likewise for parameter `protocol'.
	* output.h (declare_weak): Add prototype.
	(decode_reg_name): Don't wrap with TREE_CODE macro.
	(assemble_alias): Add prototype.
	* regclass.c: Include output.h.
	* reload.h (reloads_conflict): Add prototype.
	* rtl.h (print_rtl_single, mark_elimiation, reg_class_subset_p,
	output_func_start_profiler): Add prototypes.
	* rtlanal.c (reg_set_p_1): Mark parameters `x' and `pat' with
 	ATTRIBUTE_UNUSED.
	* scan-decls.c: Include scan.h.
	* scan.h (recognized_function, recognized_extern): Add prototypes.
	* stmt.c: Include output.h.
	* toplev.c (error_for_asm, warning_for_asm): Remove prototypes.
	(output_lang_identify): Hide prototype and definition.
	(float_signal): Mark parameter `signo' with ATTRIBUTE_UNUSED.
	(pipe_closed): Likewise.
	* toplev.h (count_error, strip_off_ending, error_for_asm,
 	warning_for_asm): Add prototypes.

From-SVN: r19712
1998-05-13 12:40:39 +00:00
Brendan Kehoe 0806342bc1 c-lex.h (is_class_name): Fix arg type to be tree, not void.
* c-lex.h (is_class_name): Fix arg type to be tree, not void.
	(make_pointer_declarator, reinit_parse_for_function): Fix typo.

From-SVN: r19040
1998-04-08 05:57:52 -04:00
Bernd Schmidt 56c0e996b8 c-lex.c (is_class_name): Delete declaration.
* c-lex.c (is_class_name): Delete declaration.
        (whitespace_cr): Make static and add prototype.
        * c-lex.h (make_pointer_declarator, reinit_parse_for_function,
        yylex, get_directive_line): Turn declarations into prototypes.
        (position_after_whitespace, check_newline, yyerror,, is_class_name,
        forget_protocol_qualifiers, remember_protocol_qualifiers): Add
        prototypes.
        * genattr.c (extend_range, write_upcase, gen_attr, write_units): Add
        prototypes.
        * gencodes.c (gen_insn): Add prototype.
        * genconfig.c (walk_insn, gen_insn, gen_expand, gen_split,
        gen_peephole): Add prototypes.
        * genflags.c (num_operands, gen_proto, gen_nonproto, gen_insn): Add
        prototypes.
        * gengenrtl.c (type_from_format, accessor_from_format, special_rtx,
        special_format, find_formats, gendecl, genmacro, gendef, genlegend,
        genheader, gencode): Add prototypes.
        * genopinit.c (gen_insn): Add prototype.
        * genoutput.c (output_prologue, output_epilogue, scan_operands,
        process_template, validate_insn_alternatives, gen_insn, gen_peephole,
        gen_expand, gen_split, n_occurrences): Add prototypes.
        * genpeep.c (gen_peephole): Add prototype.
        * loop.c (find_and_verify_loops, mark_loop_jump, prescan_loop,
        reg_in_basic_block_p, consec_sets_invariant_p, libcall_other_reg,
        labels_in_range_p, count_loop_regs_set, note_addr_stored,
        loop_reg_used_before_p, scan_loop, replace_call_address,
        skip_consec_insns, libcall_benefit, ignore_some_movables,
        force_movables, combine_movables, rtx_equal_for_loop_p, move_movables,
        strength_reduce, valid_initial_value_p, find_mem_givs, record_biv,
        check_final_value, record_giv, update_giv_derive, basic_induction_var,
        simplify_giv_expr, general_induction_var, consec_sets_giv,
        check_dbra_loop, express_from, combine_givs_p, combine_givs,
        product_cheap_p, maybe_eliminate_biv, maybe_eliminate_biv_1,
        last_use_this_basic_block, record_initial, update_reg_last_use,
        iteration_info, analyze_loop_iterations, insert_bct,
        instrument_loop_bct, indirect_jump_in_function_p): Turn declarations
        into prototypes.

From-SVN: r19038
1998-04-07 17:47:11 -06:00
Richard Kenner 940d9d638b Update FSF address.
From-SVN: r9959
1995-06-15 07:33:25 -04:00
Tom Wood 163051e752 (RID_IN, RID_OUT, RID_INOUT, RID_BYCOPY, RID_ONEWAY,
RID_ID): New Objective-C keywords.

From-SVN: r4062
1993-04-09 23:06:58 +00:00
Richard Stallman 43517f90ee (RID_COMPLEX): New constant.
From-SVN: r3629
1993-03-04 17:59:30 +00:00
Richard Kenner 78c02237e2 Fix typo.
From-SVN: r3614
1993-03-02 18:57:59 -05:00
Richard Stallman dae1d30408 (get_directive_line): Declared.
From-SVN: r3591
1993-03-02 07:15:10 +00:00
Richard Stallman 726b521731 (RID_ITERATOR): New alternative.
From-SVN: r3583
1993-03-02 02:33:39 +00:00
Richard Stallman ab83232a37 entered into RCS
From-SVN: r200
1992-01-17 22:47:27 +00:00
Richard Stallman 32454fccc1 *** empty log message ***
From-SVN: r132
1991-12-24 02:15:13 +00:00
Richard Stallman b6c21411b9 *** empty log message ***
From-SVN: r126
1991-12-22 21:51:18 +00:00
Richard Stallman 4d69ceb3ae Initial revision
From-SVN: r82
1991-11-30 06:21:16 +00:00