Commit Graph

333 Commits

Author SHA1 Message Date
Stan Cox
007aaed01e c-decl.c (c_decode_option, [...]): Recognize -Wno-main so we can avoid warnings.
* c-decl.c (c_decode_option, start_decl, start_function,
	finish_function) : Recognize -Wno-main so we can avoid warnings.

From-SVN: r26376
1999-04-12 14:05:29 +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
Zack Weinberg
f64d823442 flags.h: Declare flag_no_ident.
�
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-31 17:46:23 +00:00
Jeffrey A Law
ab87f8c8d1 Merge in gcc2 snapshot 19980929. See gcc/ChangeLog and gcc/FSFChangeLog for
details.

From-SVN: r24879
1999-01-26 18:43:17 -07:00
Kaveh R. Ghazi
db838bb85b c-decl.c (duplicate_decls): If `warn_traditional'...
* 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
1999-01-16 16:43:26 +00:00
Dave Brolley
5d7da2c6d9 c-lang.c: (parse_options,parse_in): Added.
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
1998-12-09 07:47:28 -05:00
Richard Henderson
6271b19158 c-decl.c (flag_isoc9x): Default off.
* c-decl.c (flag_isoc9x): Default off.
        (c_decode_option): Kill -std=gnu, add -std=gnu89 and -std=gnu9x.
        * cccp.c (print_help, main): Likewise.
        * gcc.c (default_compilers): Update for -std=gnu*.

From-SVN: r24186
1998-12-08 02:26:36 -08:00
Zack Weinberg
c50bca0894 cpplib.c (initialize_char_syntax): Use ISALPHA and ISALNUM so it'll work on non-ASCII platforms.
1998-12-07  Zack Weinberg  <zack@rabi.phys.columbia.edu>
	* cpplib.c (initialize_char_syntax): Use ISALPHA and ISALNUM
          so it'll work on non-ASCII platforms.  Always consider $ an
          identifier character.  Take no arguments.
	  (cpp_reader_init): Call initialize_char_syntax with no
          arguments.
	  (cpp_start_read): Don't call initialize_char_syntax again.
          Clear is_idchar['$'] and is_idstart['$'] if not
          opts->dollars_in_ident.
	* cpplib.h (struct cpp_reader): Replace void *data element by
          cpp_options *opts.  Rearrange elements to make gdb printout
          less annoying (put buffer stack at end).
	  (CPP_OPTIONS): Get rid of now-unnecessary cast.
	* cppmain.c: s/data/opts/ when initializing cpp_reader
          structure.
	* c-decl.c: Likewise.
	* objc/objc-act.c: Likewise.
	* fix-header.c: Likewise.

From-SVN: r24154
1998-12-07 09:15:29 -05:00
Ulrich Drepper
6f4d72224e c-common.c (declare_function_name): Declare predefinied variable `__func__'.
* 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-12-01 13:05:17 -08: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
Kaveh R. Ghazi
0ca3fb0a16 New warning, `missing-noreturn':
* c-decl.c (warn_missing_noreturn): New global variable.
        (c_decode_option): Check for new flags -W{no-}missing-noreturn.
        (finish_function): Implement missing noreturn warning.
        * c-tree.h (warn_missing_noreturn): Declare extern.
        * invoke.texi: Document new flags.
        * toplev.c (documented_lang_options): Add description.

From-SVN: r23197
1998-10-20 07:32:08 +00:00
Kaveh R. Ghazi
c84e271261 Warning fixes:
* Makefile.in (gencheck.o): Depend on gansidecl.h.
	* c-common.c (print_char_table): Add missing initializers.
	(scan_char_table): Likewise.
	(time_char_table): Likewise.
	* c-decl.c (c_decode_option): Mark parameter `argc' with
	ATTRIBUTE_UNUSED.
	(declare_parm_level): Mark parameter `definition_flag' with
	ATTRIBUTE_UNUSED.
	* c-lex.c (readescape): Use `(unsigned)1' in shift.
	(yylex): Likewise.  Cast `sizeof' to an (int) when comparing
	against one.
	* calls.c (store_one_arg): Remove unused parameter `fndecl'.  All
	callers changed.
	(emit_call_1): Mark parameters `fndecl' and `funtype' with
	ATTRIBUTE_UNUSED.
	(expand_call): Cast result of MIN() to (unsigned int) when
	comparing against an unsigned value.
	* cccp.c (pcfinclude): Remove unused parameter `limit'.  All
	callers changed.
	(make_definition): Remove unused parameter `op'.  All callers
	changed.
	(create_definition): Cast REST_EXTENSION_LENGTH to (long) when
	comparing against the result of pointer arithmetic.
	* config/mips/mips.h (FUNCTION_ARG_BOUNDARY): Cast to (unsigned)
	when comparing against one.
	* dwarf2out.c (dwarf2out_frame_debug): Cast REGNO() and
 	HARD_FRAME_POINTER_REGNUM to (unsigned) when comparing against
 	one.
	(output_die): Move variable `i' into the scope in which it is
	used.  Change its type to `unsigned'.
	(output_die): Cast the result of `strlen' to (int) when passing it
	to ASM_OUTPUT_ASCII().
	(output_pubnames): Likewise.
	(output_line_info): Likewise.
	* emit-rtl.c (global_rtl): Add missing initializers.
	* explow.c (promote_mode): Mark parameter `for_call' with
	ATTRIBUTE_UNUSED.
	* expmed.c (expand_shift): Cast the result of GET_MODE_BITSIZE to
 	`unsigned HOST_WIDE_INT' when comparing against one.
	(synth_mult): Change type of variable `cost' to int.
	(emit_store_flag): Use `(unsigned HOST_WIDE_INT) 1' in shift.
	* expr.c (copy_blkmode_from_reg): Cast BITS_PER_WORD to (unsigned)
	when comparing against one.
	(get_inner_reference): Change variable `alignment' to unsigned.
	(expand_expr): Cast the result of GET_MODE_ALIGNMENT to (unsigned
	int) when comparing against one.
	(expand_builtin_setjmp): Change type of variable `i' to size_t.
	* fold-const.c (div_and_round_double): Cast BASE to
	(HOST_WIDE_INT) when comparing against one.
	* gencheck.c: Include gansidecl.h.
	(main): Mark parameter `argv' with ATTRIBUTE_UNUSED.
	* optabs.c (gen_cond_trap): Mark parameters `code', `op2' and
	`tcode' with ATTRIBUTE_UNUSED.
	* real.c (edivm): Cast constant value to (unsigned long) in
	expression compared against an unsigned value.
	* stmt.c (expand_return): Cast BITS_PER_WORD to (unsigned) when
	comparing against one.
	(expand_end_case): Cast CASE_VALUES_THRESHOLD to (unsigned int)
	when comparing against one.
	* stor-layout.c (mode_for_size): Cast MAX_FIXED_MODE_SIZE to
	(unsigned int) when comparing against one.  Likewise for
	GET_MODE_BITSIZE.
	(smallest_mode_for_size): Likewise.
	(save_storage_status): Mark parameter `p' with ATTRIBUTE_UNUSED.
	(restore_storage_status): Likewise.
	* toplev.c (debug_args): Add missing initializer.
	(f_options): Spelling correction.  Add missing initializers.
	(documented_lang_options): Likewise.
	(debug_end_source_file): Mark parameter `lineno' with
	ATTRIBUTE_UNUSED.
	* tree.c (valid_machine_attribute): Mark parameters `attr_args',
	`decl' and `type' with ATTRIBUTE_UNUSED.
	* varasm.c (decode_reg_name): Cast `sizeof' expression to (int)
	when comparing against one.
	(assemble_variable): Mark parameter `top_level' with
	ATTRIBUTE_UNUSED.
	(assemble_external_libcall): Mark parameter `fun' with
	ATTRIBUTE_UNUSED.
	(output_constant_pool): Mark parameters `fnname' and `fndecl' with
	ATTRIBUTE_UNUSED.

From-SVN: r23054
1998-10-13 15:25:25 +00:00
Ken Raeburn
7d384cc0b3 Fine-grained control of -fcheck-memory-usage with new no_check_memory_usage attribute.
Fine-grained control of -fcheck-memory-usage with new no_check_memory_usage
attribute.  Misc minor bugfixes and tests for it too.

From-SVN: r22983
1998-10-11 02:21:54 +00:00
Jeff Law
21a9616b39 c-common.c (type_for_mode): Only return TItype nodes when HOST_BITS_PER_WIDE_INT is >= 64 bits.
* c-common.c (type_for_mode): Only return TItype nodes when
        HOST_BITS_PER_WIDE_INT is >= 64 bits.
        * c-decl.c (intTI_type_node, unsigned_intTI_type_node): Only declare
        when HOST_BITS_PER_WIDE_INT is >= 64 bits.
        (init_decl_processing): Only create TItype nodes when
        HOST_BITS_PER_WIDE_INT is >= 64 bits.
        * c-tree.h (intTI_type_node, unsigned_intTI_type_node): Only declare
        when HOST_BITS_PER_WIDE_INT is >= 64 bits.

From-SVN: r22912
1998-10-07 22:37:30 -06:00
Nick Clifton
3a846e6e06 Add invocation of SET_DEFAULT_DECL_ATTRIBUTES, if defined.
From-SVN: r22709
1998-10-01 10:44:46 +00:00
Richard Henderson
710384268d tree.h (BUILT_IN_CALLER_RETURN_ADDRESS): Unused.
* tree.h (BUILT_IN_CALLER_RETURN_ADDRESS): Unused.  Kill.
	(BUILT_IN_FP, BUILT_IN_SP, BUILT_IN_SET_RETURN_ADDR_REG): Kill.
	(BUILT_IN_EH_STUB_OLD, BUILT_IN_EH_STUB, BUILT_IN_SET_EH_REGS): Kill.
	(BUILT_IN_EH_RETURN, BUILT_IN_DWARF_CFA): New.
	* c-decl.c (init_decl_processing): Update accordingly.
	* expr.c (expand_builtin): Likewise.
	* cp/decl.c (init_decl_processing): Likewise.
	* rtl.h (global_rtl): Add cfa entry.
	(virtual_cfa_rtx, VIRTUAL_CFA_REGNUM): New.
	(LAST_VIRTUAL_REGISTER): Update.
	* emit-rtl.c (global_rtl): Add cfa entry.
	(init_emit): Initialize it.
	* function.c (cfa_offset): New.
	(instantiate_virtual_regs): Initialize it.
	(instantiate_virtual_regs_1): Instantiate virtual_cfa_rtx.
	(expand_function_end): Call expand_eh_return.
	* tm.texi (ARG_POINTER_CFA_OFFSET): New.
	* except.c (current_function_eh_stub_label): Kill.
	(current_function_eh_old_stub_label): Likwise; update all references.
	(expand_builtin_set_return_addr_reg): Kill.
	(expand_builtin_eh_stub_old, expand_builtin_eh_stub): Kill.
	(expand_builtin_set_eh_regs): Kill.
	(eh_regs): Produce a third reg for the actual handler address.
	(eh_return_context, eh_return_stack_adjust): New.
	(eh_return_handler, eh_return_stub_label): New.
	(init_eh_for_function): Initialize them.
	(expand_builtin_eh_return, expand_eh_return): New.
	* except.h: Update prototypes.
	* flow.c (find_basic_blocks_1): Update references to the stub label.
	* function.h (struct function): Kill stub label elements.
	* libgcc2.c (in_reg_window): For REG_SAVED_REG, check that the
	register number is one that would be in the previous window.
	Provide a dummy definition for non-windowed targets.
	(get_reg_addr): New function.
	(get_reg, put_reg, copy_reg): Use it.
	(__throw): Rely on in_reg_window, not INCOMING_REGNO.  Kill stub
	generating code and use __builtin_eh_return.  Use __builtin_dwarf_cfa.
	* alpha.c (alpha_eh_epilogue_sp_ofs): New.
	(alpha_init_expanders): Initialize it.
	(alpha_expand_epilogue): Use it.
	* alpha.h: Declare it.
	* alpha.md (eh_epilogue): New.
	* m68h.h (ARG_POINTER_CFA_OFFSET): New.
	* sparc.h (ARG_POINTER_CFA_OFFSET): New.

From-SVN: r22436
1998-09-15 12:19:12 -07:00
Mark Mitchell
02e24c7ab0 tree.h (DECL_ORIGIN): New macro.
* tree.h (DECL_ORIGIN): New macro.
	* integrate.c (copy_and_set_decl_abstract_origin): New function.
	(copy_decl_list): Use it.
	(integrate_parm_decls): Likewise.
	(integrate_decl_tree): Likewise.
	* dwarf2out.c (decl_ultimate_origin): Simplify.
	* dwarfout.c (decl_ultimate_origin): Likewise.
	* c-decl.c (duplicate_decls): Use DECL_ORIGIN.
	(pushdecl): Likewise.

From-SVN: r22380
1998-09-10 10:46:00 +00:00
Jason Merrill
d9cf7c8245 c-common.c (combine_strings): Also set TREE_READONLY.
* c-common.c (combine_strings): Also set TREE_READONLY.
	Change warn_write_strings to flag_const_strings.
	* c-decl.c, c-tree.h: Likewise.
cp/
	* tree.c (lvalue_type): Fix for arrays.
	* typeck.c (string_conv_p): New fn.
	(convert_for_assignment): Use it.
	(build_unary_op): Use lvalue_type.
	* call.c (standard_conversion, convert_like): Use string_conv_p.
	(add_function_candidate): Use lvalue_type.
	* cvt.c (convert_to_reference): Likewise.
	* decl2.c (lang_decode_option): Ignore -traditional.
	* decl.c (init_decl_processing): flag_writable_strings inhibits
	flag_const_strings.
	* lang-options.h (lang_options): Add fconst-strings to the list
	of valid options.
	* decl2.c (lang_f_options, lang_decode_option): Likewise.

From-SVN: r21928
1998-08-23 22:08:45 -04:00
Jeffrey A Law
def9b0064b * From Graham
* tree.c (build_index_type): Copy TYPE_SIZE_UNIT from sizetype
        to itype.
        * c-decl.c (finish_enum): Copy TYPE_SIZ_UNIT from enumtype to tem.

From-SVN: r21810
1998-08-17 14:26:47 -06:00
Kaveh R. Ghazi
804a4e13f8 c-decl.c (init_decl_processing): Remove unneeded &.
* c-decl.c (init_decl_processing): Remove unneeded &.
        * alpha.h (alpha_initialize_trampoline): Provide prototype.
        * except.c (set_exception_lang_code, set_exception_version_code):
        Change parameter from `short' to `int' to avoid using a gcc
        extension.
        * except.h (set_exception_lang_code, set_exception_version_code):
        Likewise for prototypes.
        * flow.c (count_reg_references): Remove unused variables `regno'
        and `i'.
        * gcse.c (hash_scan_insn): Declare parameter `in_libcall_block'.
        * prefix.c (translate_name): Cast the result of `alloca'.
        * varray.h (VARRAY_FREE): Reimplement as a `do-while(0)' statement.

Co-Authored-By: Jeffrey A Law <law@cygnus.com>

From-SVN: r21781
1998-08-17 03:08:32 -06:00
Ken Raeburn
07417085a1 Function entry/exit profiling instrumentation:
* expr.h (profile_function_entry_libfunc, profile_function_exit_libfunc):
Declare new variables.
* optabs.c: Define them here.
(init_optabs): Initialize them.
* tree.h (struct tree_decl): New flag no_instrument_function_entry_exit.
(DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT): New accessor macro.
* c-decl.c (duplicate_decls): Merge it.
* c-common.c (enum attrs): New value A_NO_INSTRUMENT_FUNCTION.
(init_attributes): Use it for "no_instrument_function".
(decl_attributes): Handle it, for functions that have not yet been compiled.
Set decl flag.
* flags.h (flag_instrument_function_entry_exit): Declare new variable.
* toplev.c (flag_instrument_function_entry_exit): Define it here.
(f_options): New option "instrument-functions".
* function.h (struct function): New field instrument_entry_exit.
* function.c (current_function_instrument_entry_exit): New variable.
(push_function_context_to, pop_function_context_from): Save and restore.
(expand_function_start): Set current_ variable, maybe emit return label and
entry profile call.
(expand_function_end): Maybe emit exit profile call.
Testsuite:
* gcc.c-torture/special/eeprof-1.c: New test, for -finstrument-functions.
* gcc.c-torture/special/special.exp: Run it.

From-SVN: r21495
1998-07-30 10:38:22 +00:00
Vladimir N. Makarov
795add948b toplev.c (lang_options): Add -Wlong-long, -Wno-long-long options.
* toplev.c (lang_options): Add -Wlong-long, -Wno-long-long
	options.
	* c-decl.c (warn_long_long): Define.
	(c_decode_option): Parse -Wlong-long, -Wno-long-long options.
	(grokdeclarator): Add flag `warn_long_long' as guard for
	warning "ANSI C does not support `long long'".
	* invoke.texi: Add description of options -Wlong-long,
	-Wno-long-long.
	* gcc.1: The same as above.
	* cp-tree.h (warn_long_long): Define.
	* decl.c (grokdeclarator): Add flag `warn_long_long' as guard for
	warning "ANSI C++ does not support `long long'".
	* decl2.c (warn_long_long): Define.
	(lang_decode_option): Parse -Wlong-long, -Wno-long-long options.

From-SVN: r21007
1998-07-08 12:16:05 +00:00
Jason Merrill
4a870dba91 c-decl.c: Add warn_multichar.
* c-decl.c: Add warn_multichar.
        (c_decode_option): Handle -Wno-multichar.
        * c-lex.c (yylex): Check it.
        * c-tree.h: Declare it.
        * toplev.c (lang_options): Add it.
        * invoke.texi: Document it.

From-SVN: r20968
1998-07-06 15:53:23 -06:00
Andreas Schwab
03369c9399 c-decl.c (grokdeclarator): Don't warn about implicit int in `typedef foo = bar'.
* c-decl.c (grokdeclarator): Don't warn about implicit int in
	`typedef foo = bar'.

From-SVN: r20863
1998-07-01 02:00:35 +00:00
Jeff Law
9ec36da574 * Merge from gcc2 June 9, 1998 snapshot. See ChangeLog.13 for
details.

From-SVN: r20808
1998-06-29 15:40:49 -06:00
Mark Mitchell
41472af877 invoke.texi (-fstrict-aliasing): Document.
* invoke.texi (-fstrict-aliasing): Document.
	* rtl.texi (MEM_ALIAS_SET): Document.
	* flags.h (flag_strict_aliasing): Declare.
	* toplev.c (flag_strict_aliasing): Define.
	(f_options): Add -strict-aliasing.
	(main): Set flag_strict_aliasing if -O2 or higher.
	* tree.h (tree_type): Add alias_set field.
	(TYPE_ALIAS_SET): New macro.
	(TYPE_ALIAS_SET_KNOWN_P): Likewise.
	(get_alias_set): Declare.
	* tree.c (lang_get_alias_set): Define.
	(make_node): Initialize TYPE_ALIAS_SET.
	(get_alias_set): New function.
	* print-tree.c (print_node): Dump the alias set for a type.
	* c-tree.h (c_get_alias_set): Declare.
	* c-common.c (c_get_alias_set): New function.
	* c-decl.c (init_decl_processing): Set lang_get_alias_set.
	* expr.c (protect_from_queue): Propogage alias sets.
	(expand_assignment): Calculate alias set for new MEMs.
	(expand_expr): Likewise.
	* function.c (put_var_into_stack): Likewise.
	(put_reg_into_stack): Likewise.
	(gen_mem_addressof): Likewise.
	(assign_parms): Likewise.
	* stmt.c (expand_decl): Likewise.
	* varasm.c (make_decl_rtl): Eliminate redundant clearing of
	DECL_RTL.  Calculate alias set for new MEMs.
	* rtl.def (REG): Add dummy operand.
	(MEM): Add extra operand to store the MEM_ALIAS_SET.
	* rtl.h (MEM_ALIAS_SET): New macro.
	(gen_rtx_MEM): Declare.
	* emit-rtl.c (gen_rtx_MEM): New function.
	* gengenrtl.c (sepcial_rtx): Make MEMs special.
	* alias.c (CHECK_ALIAS_SETS_FOR_CONSISTENCY): New macro.
	(DIFFERENT_ALIAS_SETS_P): Likewise.
	(canon_rtx): Propogate the alias set to the new MEM.
	(true_dependence): Check the alias sets.
	(anti_dependence): Likewise.
	(output_dependence): Likewise.
	* explow.c (stabilize): Progoate alias sets.
	* integrate.c (copy_rtx_and_substitute): Likewise.
	* final.c (alter_subreg): Make sure not to leave MEM_IN_STRUCT_P
	in an unpredictable state.  Propogate alias sets.
	* reload1.c (reload): Clear MEM_ALIAS_SET for new MEMs about which
	we have no alias information.

From-SVN: r20719
1998-06-25 15:14:41 +00:00
Jeffrey A Law
11346e893f c-decl.c (duplicate_decls): Avoid setting TREE_ASM_WRITTEN for duplicate declarations of a function.
* c-decl.c (duplicate_decls): Avoid setting TREE_ASM_WRITTEN for
        duplicate declarations of a function.

From-SVN: r20569
1998-06-18 18:05:02 -06:00
John Carr
e0cd077072 haifa-sched.c (haifa_classify_insn): TRAP_IF is risky.
* haifa-sched.c (haifa_classify_insn): TRAP_IF is risky.
	(sched_analyze_2): Allow scheduling TRAP_IF.
	* reorg.c (mark_referenced_resources): Examine operands of TRAP_IF.
	* rtl.h (TRAP_CODE): New macro.
	* rtl.def (TRAP_IF): Change second operand type to rtx.
	* optabs.c (gen_cond_trap): New function.
	(init_traps): New function.
	(init_optabs): Call init_traps.
	* expr.h: Declare gen_cond_trap.
	* jump.c (jump_optimize): Optimize jumps to and around traps.
	* sparc.md: Define trap instructions.
	* rs6000.md: Define trap instructions.
	* rs6000.c (print_operand): New code 'V' for trap condition.
	(trap_comparison_operator): New function.
	* m88k.md: Update use of TRAP_IF.
	* tree.h (enum built_in_function): New function code BUILT_IN_TRAP.
	* c-decl.c (init_decl_processing): New builtin __builtin_trap.
	* expr.c (expand_builtin): Handle BUILT_IN_TRAP.
	* expr.c (expand_builtin): Error if __builtin_longjmp second argument
	is not 1.

From-SVN: r20543
1998-06-17 16:14:09 +00:00
Jim Wilson
3bd89472d1 Fix merging error with formerly cygnus local change.
* c-decl.c (shadow_tag_warned): Use specs not declspecs in for loop.

From-SVN: r20511
1998-06-15 06:22:59 -07:00
Graham Stott
b3fbc9ad49 * c-decl.c (grokdeclarator): Remove unused variable "last".
From-SVN: r20422
1998-06-10 16:36:37 -06:00
Graham Stott
e80716de42 * c-decl.c (start_decl): Correct test for -Wmain.
From-SVN: r20421
1998-06-10 16:29:04 -06:00
Jeffrey A Law
07fb7f791d * decl.c (init_decl_processing): Fix typo.
From-SVN: r20412
1998-06-10 04:44:38 -06:00
Dave Brolley
a0d85b7572 Integrate cpplib into the C and C++ front ends.
Wed Jun 10 13:07:02 1998  Dave Brolley  <brolley@cygnus.com>
	* objc/objc-act.c: Add cpplib declarations.
	(lang_decode_option): Initialize cpplib if necessary.
	(lang_decode_option): New argc/argv interface.
	* tree.h (lang_decode_option): New argc/argv interface.
	* toplev.c (lang_options): Add cpp options.
	(main): New interface for lang_decode_option.
	* gcc.c (default_compilers): Don't call cpp for a cpplib-enabled C compiler
	unless -E, -M or -MM is specified.
	* cpplib.h (cpp_handle_option): New function.
	* cpplib.c (cpp_handle_option): New function.
	(cpp_handle_options): Now calls cpp_handle_option.
	* c-tree.h (c_decode_option): New argc/argv interface.
	* c-lex.c (init_parse): cpplib now initialized in c_decode_option.
	* c-lang.c (lang_decode_option): New argc/argv interface.
	* c-decl.c: Add cpplib declarations.
	(c_decode_option): New argc/argv interface.
	(c_decode_option): Call cpp_handle_option.
	(c_decode_option): Now returns number of strings processed.

From-SVN: r20407
1998-06-10 06:12:36 -04:00
Andrew MacLeod
a1622f838f [multiple changes]
Thu Jun  8 14:16:15 EDT 1998  Andrew MacLeod  <amacleod@cygnus.com>
	* eh-common.h: Remove NEW_EH_MODEL compile time flag, and replace with
	flag_new_exceptions runtime flag.
	(struct old_exception_table): New struct which represents what
	the exception table looks like without the new model.
	(NEW_EH_RUNTIME): New value used as a tag in the exception table to
	flag that this is a new style table.
	* except.h: Remove compile time flag NEW_EH_MODEL.
	(expand_builtin_eh_stub_old): New prototype.
	* tree.h (enum built_in_function): Add BUILT_IN_EH_STUB_OLD.
	* expr.c (expand_builtin): New builtin func BUILT_IN_EH_STUB_OLD.
	* c-decl.c (init_decl_processing): Add new builtin function
	__builtin_eh_stub_old.
	* final.c (final_scan_insn): Replace compile time flag NEW_EH_MODEL.
	* flags.h (flag_new_exceptions): New runtime flag.
	* toplev.c (flag_new_exceptions): Initialize default to 0,
	-fnew-exceptions sets to 1.
	* except.c (output_exception_table_entry): Output New style exception
	identifier into table, and replace compile time flag NEW_EH_MODEL
	with runtime flag flag_new_exceptions.
	(output_exception_table): Replace compile time flag NEW_EH_MODEL.
	(expand_builtin_eh_stub_old): Duplicates original functionality of
	expand_builtin_eh_stub.
	(expand_builtin_eh_stub): Replace compile time flag NEW_EH_MODEL.
	* libgcc2.c (find_exception_handler): Remove NEW_EH_MODEL #ifdefs.
	(old_find_exception_handler): New func, same as find_exception_handler
	except it works on the old style exception table.
	(__throw): Replace NEW_EH_MODEL. Detect new model based on presence
	of identifier in the exception table, and call appropriate routines.
1998-06-08  Andrew MacLeod  <amacleod@cygnus.com>
	* except.c (init_exception_processing): Remove NEW_EH_MODEL compile
	time flag.  Call __cp_eh_info instead of __cp_exception_info.
	* exception.cc (struct cp_eh_info): Remove NEW_EH_MODEL flag.
	(__cp_exception_info): Return offset into cp_eh_info structure to
	match what use to be the start of this structure.
	(__cp_eh_info): New function to return a pointer to cp_eh_info struct.
	(__cplus_type_matcher, __cp_push_exception): Remove NEW_EH_MODEL
	compile time flag.
	(__uncatch_exception, __check_eh_spec, std::uncaught_exception): Call
	__cp_eh_info instead of __cp_exception_info.

From-SVN: r20336
1998-06-08 12:43:28 +00: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
Jeff Law
38e012594e typo typo fixes fixes
From-SVN: r19601
1998-05-06 15:09:07 -06:00
Robert Lipe
5f6da3024b toplev.h: New file.
Wed May  6 06:35:38 1998  Robert Lipe  <robertl@dgii.com>
        * toplev.h: New file.   Protypes for functions in toplev.c.
        * tree.h, rtl.h: Deleted protos for functions in toplev.c.
        * c-common.c, c-convert.c, c-decl.c, c-iterate.c, c-lex.c,
        c-parse.in, c-parse.y, c-pragma.c, c-typeck.c, calls.c,
        convert.c, dwarf2out.c, except.c, expr.c, final.c, fold-const.c,
        function.c, hash.c, profile.c, real.c, reg-stack.c, regclass.c,
        reload.c, reload1.c, stmt.c, stor-layout.c, tlink.c, tree.c,
        varasm.c: include it.

From-SVN: r19563
1998-05-06 04:45:47 +00:00
Jeff Law
f5963e6170 * Check in merge from gcc2. See ChangeLog.12 for details.
From-SVN: r19553
1998-05-05 17:18:02 -06:00
Jeffrey A Law
a6d7e15639 c-common.c (type_for_mode): Handle TI types.
* c-common.c (type_for_mode): Handle TI types.
        * c-decl.c (intTI_type_node, unsigned_int_TI_type_node): Define.
        (init_decl_processing): Handle TI types.
        * c-tree.h (intTI_type_node, unsigned_int_TI_type_node): Declare.

From-SVN: r19355
1998-04-21 07:25:56 -06:00
Jeff Law
e5e809f419 * Check in merge from gcc2. See ChangeLog.11 and ChangeLog.12
for details.

        * haifa-sched.c: Mirror recent changes from gcc2.

From-SVN: r18984
1998-04-04 06:32:39 -07:00
Kaveh R. Ghazi
670ee92097 Major cutover to using system.h:
* Makefile.in (alias.o, bitmap.o, c-aux-info.o, c-common.o,
        c-decl.o, c-iterate.o, c-lang.o, c-lex.o, c-pragma.o, c-typeck.o,
        caller-save.o, calls.o, collect2.o, combine.o, cse.o, dbxout.o,
        dwarf2out.o, dwarfout.o, emit-rtl.o, except.o, explow.o, expmed.o,
        expr.o, final.o, flow.o, function.o, getpwd.o, global.o,
        integrate.o, jump.o, local-alloc.o, loop.o, optabs.o, pexecute.o,
        prefix.o, print-rtl.o, print-tree.o, profile.o, real.o, recog.o,
        reg-stack.o, regclass.o, regmove.o, reload.o, reload1.o, reorg.o,
        rtl.o, rtlanal.o, sdbout.o, stmt.o, stor-layout.o, stupid.o,
        tlink.o, toplev.o, tree.o, unroll.o, varasm.o, xcoffout.o): Depend
        on system.h.
        * alias.c, bitmap.c, c-aux-info.c, c-common.c, c-decl.c,
        c-iterate.c, c-lang.c, c-lex.c, c-pragma.c, c-typeck.c,
        caller-save.c, calls.c, collect2.c, combine.c, cse.c, dbxout.c,
        dwarf2out.c, dwarfout.c, emit-rtl.c, except.c, explow.c, expmed.c,
        expr.c, final.c, flow.c, function.c, gcc.c, getpwd.c, global.c,
        integrate.c, jump.c, local-alloc.c, loop.c, optabs.c, pexecute.c,
        prefix.c, print-rtl.c, print-tree.c, profile.c, real.c, recog.c,
        reg-stack.c, regclass.c, regmove.c, reload.c, reload1.c, reorg.c,
        rtl.c, rtlanal.c, sched.c, sdbout.c, stmt.c, stor-layout.c,
        stupid.c, tlink.c, toplev.c, tree.c, unroll.c, varasm.c,
        xcoffout.c: Include system.h.  Organize include ordering so
        that stdarg/varargs comes before other system headers.  Remove
        spurious casts of functions assured of a prototype in system.h.

From-SVN: r18726
1998-03-20 14:58:42 +00:00
Manfred Hollstein
f8344bea51 c-decl (finish_struct): Change type of min_align to unsigned.
a
gcc/ChangeLog:
	* c-decl (finish_struct): Change type of min_align to unsigned.
	* cplus-dem.c (demangle_function_name): Change type of variable i to size_t;
	remove unused variable len.
	* dwarf2out.c (reg_save): Add explicit cast of -1 to unsigned and a
	comment indicating this is proper behaviour.
	(reg_loc_descriptor): Remove redundant comparison of unsigned variable
	reg >= 0.
	(based_loc_descr): Likewise.
	* enquire.c (bitpattern): Change type of variable i to unsigned.
	* final.c (output_asm_insn): Don't cast insn_noperands to unsigned.
	* flow.c (life_analysis): Change type of variable i to size_t;
	remove unused variable insn.
	* gcc.c (translate_options): Change type of variables optlen, arglen and
	complen to size_t.
	(input_filename_length): Change type to size_t.
	(do_spec_1): Change type of variable bufsize to size_t.
	(main): Change type of variables i and j to size_t;
 	remove subblock local definition of variable i.
	(lookup_compiler): Change type of second argument to size_t;
	change type of variable i to size_t.
	* genemit.c (output_init_mov_optab): Change type of variable i to size_t.
	* genopinit.c (get_insn): Change type of variable pindex to size_t.
	* genrecog.c (add_to_sequence): Change type of variable i to size_t.
	* global.c (global_alloc): Change type of variable i to size_t.
	* regclass.c (init_reg_sets): Change type of variables i and j to unsigned.
	* stmt.c (expand_end_bindings): Change type of variable i to size_t.
	(expand_end_case): Change type of variable count to size_t.
	* toplev.c (main): Change type of variable j to size_t.
	(set_target_switch): Change type of variable j to size_t.
	(print_switch_values): Change type of variable j to size_t;
	remove unused variable flags.
	* varasm.c (assemble_variable): Change type of variable align to size_t.
	(const_hash_rtx): Change type of variable i to size_t.
gcc/cp/ChangeLog:
Sun Mar  8 17:13:38 1998  Manfred Hollstein  <manfred@s-direktnet.de>
	* decl2.c (lang_decode_option): Change j's type to size_t.
	* tree.c (layout_vbasetypes): record_align and desired_align are of
	type unsigned int; const_size and nonvirtual_const_size likewise.

From-SVN: r18491
1998-03-12 00:02:52 +00:00
Brendan Kehoe
d9525bec09 tree.h (merge_machine_{type,decl}_attributes): Declare.
./ChangeLog:	* tree.h (merge_machine_{type,decl}_attributes): Declare.
	(split_specs_attrs, strip_attrs): Add prototypes.
	* tree.c (merge_machine_{type,decl}_attributes): New functions.
	* c-decl.c (duplicate_decls): Call merge_machine_decl_attributes.
	Update olddecl's attributes too.
	* c-common.c (strip_attrs): New function.
	* c-typeck.c (common_type): Call merge_machine_type_attributes.
	* varasm.c (make_function_rtl): New target macro REDO_SECTION_INFO_P.
	(make_decl_rtl): Likewise.
	* c-decl.c (shadow_tag_warned): Call split_specs_attrs.
./cp/ChangeLog:	* decl.c (duplicate_decls): Call merge_machine_decl_attributes.
	Update olddecl's attributes too.
	(strip_attrs): Remove function.
	* typeck.c (common_type): Call merge_machine_type_attributes.

From-SVN: r18065
1998-02-18 05:38:57 -05:00
Robert Lipe
ccd043a956 c-common.c: Include <stdlib.h> and <string.h>/<strings.h>.
* c-common.c: Include <stdlib.h> and <string.h>/<strings.h>.
        * calls.c (expand_call): Remove unused variables funtree,
        n_regs, and tmpmode.
        * dbxout.c, except.c: Include <string.h>/<strings.h>.
        * explow.c: (plus_constant_for_output_wide) Removed unused
        variable all_constant.
        * c-decl.c, genattr.c, genattrtab.c, getconfig.c, genemit.c
        genextract.c, genflags.c, genopinit.c genoutput.c, genpeep.c,
        genrecog.c, global.c, integrate.c , stupid.c : Include
        <stdlib.h>.
        * genextract.c: (walk_rtx) Remove unused variable link.
        * genrecog.c: (concat) Remove unreferenced static function.
        * prefix.c: Include <string.h>/<strings.h>, <stdlib.h>
        * stmt.c: Include <stdlib.h>.
        (expand_asm_operands): Remove unused variable val1.
        (expand_return): Remove unused variable block.
        (pushcase): Remove unused variables l and n.
        (pushcaserange): Likewise.
        * unroll.c (unroll_loop): Remove unused variable temp.

From-SVN: r17766
1998-02-07 15:55:54 -07:00
Greg McGary
6553db017b * c-decl.c (pushdecl): Set DECL_ORIGINAL_TYPE once only.
From-SVN: r17765
1998-02-07 15:44:35 -07:00
J"orn Rennecke
f8dac6eb3f expr.c (get_inner_reference): Use sbitsizetype for type sizes.
* expr.c (get_inner_reference): Use sbitsizetype for type sizes.
        * fold-const.c (size_int): Replace with
        (size_int_wide).
        (make_bit_field_ref): Use bitsize_int for bit position.
        * stor-layout.c (sizetype): Delete.
        (sizetype_tab, sbitsizetype, ubitsizetype): Declare.
        (layout_record, layout_union, layout_type):
        Use bitsize_int for bit size.
        (set_sizetype): New function.
        (make_signed_type, make_unsigned_type): Use it.
        * c-decl.c (init_decl_processing): Likewise.
        * tree.h (size_int): Don't delcare, #define.
        (size_int_wide, sizetype_tab, sbitsize, ubitsize): Declare.
        (set_sizetype): Declare.
        (bitsize_int, size_int_2, BITS_PER_UNIT_LOG, sizetype, bitsizetype):
        Define.
        * c-typeck.c (c_sizeof, c_sizeof_nowarn, c_size_in_bytes):
        Convert result to sizetype.
        (really_start_incremental_init, push_init_level):
        Set type of constructor_bit_index to sbitsizetype.
        (push_init_level): Use unsigned arithmetic to determine padding.
        (output_init_element): Likewise.

From-SVN: r17577
1998-02-01 04:47:59 -07:00
J"orn Rennecke
2a851b5ccf Patch from Joern to fix dwarf1 bug: emit debug info for types defined in
parameter lists.
	* c-decl.c (grokdeclarator): Get parameter tags from
	last_function_parm_tags.
	* dwarfout.c (output_formal_types): Set TREE_ASM_WRITTEN before
	traversing the parameter types.
	(output_type): No early exit for FUNCTION_TYPE / METHOD_TYPE context.

From-SVN: r17490
1998-01-26 10:13:41 -08:00
Richard Henderson
6c174fc0e6 c-decl.c (init_decl_processing): Provide proper fallback symbol for __builtin_memset.
* c-decl.c (init_decl_processing): Provide proper fallback symbol
for __builtin_memset.
* expr.c (expand_builtin) [MEMSET]: Arg 3 type code is INTEGER_TYPE
not INTEGER_CST.  Assert arg 3 is a constant.
* alpha.c (mode_width_operand): Accept 64-bit modes.
(mode_mask_operand): Likewise.
(print_operand): Likewise for 'M' and 'U' codes.
(alpha_expand_unaligned_load): New function.
(alpha_expand_unaligned_store): Likewise.
(alpha_expand_unaligned_load_words): Likewise.
(alpha_expand_unaligned_store_words): Likewise.
(alpha_expand_block_move): Likewise.
(alpha_expand_block_clear): Likewise.
* alpha.h (MOVE_RATIO): New define.
* alpha.md (extxl, ext*h, ins*l, mskxl): Name them.
(insql, insxh, mskxh, extv, extzv, insv, movstrqi, clrstrqi): New.
* alpha.h (ASM_OUTPUT_LOOP_ALIGN, ASM_OUTPUT_ALIGN_CODE): Set to 3.
(CONSTANT_ALIGNMENT, DATA_ALIGNMENT): Disable.

From-SVN: r17278
1998-01-01 20:48:04 -08:00
Nick Clifton
d300e55140 c-pragma.c (handle_pragma_token): Generate warning messages about unknown pragmas if warn_unknown_pragmas is set.
* c-pragma.c (handle_pragma_token): Generate warning messages
        about unknown pragmas if warn_unknown_pragmas is set.
        * c-decl.c (c_decode_option): Parse -Wunknown-pragmas command
        line option to set variable: warn_unknown_pragmas.

From-SVN: r17168
1997-12-21 08:24:48 -07:00
Kaveh R. Ghazi
1d300e19b6 bitmap.c (bitmap_clear): Ensure `inline' is at the beginning of the declaration.
* bitmap.c (bitmap_clear): Ensure `inline' is at the beginning
        of the declaration.
        * c-decl.c (finish_decl): Use parentheses around && within ||.
        * rtl.c: Include stdlib.h.
        (read_skip_spaces): Add parentheses around assignments used as
        truth values.
        (read_rtx): Initialize list_rtx.
        * cppexp.c (parse_number): Use || when operands are truth values.
        * alias.c (find_base_value): Add default case.
        (memrefs_conflict): Likewise.
        * combine.c (sets_function_arg_p): Likewise.
        * genemit.c (gen_exp): Likewise.
        * local-alloc.c (contains_replace_regs): Likewise.
        * rtlanal.c (jmp_uses_reg_or_mem): Likewise.
        * fold-const.c (fold_convert): Use "&&" for truth values.
        (fold): Add default case.
        * sdbout.c (sdbout_field_types): Fix typo in declaration.
        (sdbout_one_type): Add default case.
        * alpha.c (alpha_sa_mask): Prototype only if OPEN_VMS.
        (some_operand): Add default case.
        (input_operand): Likewise.
        (signed_comparison_operator): Likewise.
        (divmod_operator): Likewise.
        (alpha_set_memflags_1): Likewise.
        * reload1.c (reload_cse_simplify_operands): Ensure function
        always returns a value.
        * scan-decls.c (scan_decls): Likewise.
        * c-lex.c (skip_white_space): Fix typo in declaraion.
        * c-typeck.c (comp_target_types): Add parentheses around assignment
        used as truth value.
        (print_spelling): Likewise.
        (constructor_implicit, constructor_result): Remove unused variables.
        * collect2.c (scan_library): Protect prototype with
        #ifdef SCAN_LIBRARIES.
        * emit-rtl.c (find_line_note): Fix typo in declaration.
        * final.c (asm_insn_count): Protect prototype with
        #ifdef HAVE_ATTR_length.
        * flow.c (find_auto_inc): Protect prototype with #ifdef AUTO_INC_DEC.
        (try_pre_increment_1, try_pre_increment): Likewise.
        * regclass.c (auto_inc_dec_reg_p): Protect prototype with
        #ifdef FORBIDDEN_INC_DEC_CLASSES.  Make return type explicit.
        * gcov-io.h (__store_long, __write_long, __read_long): Fix
        unsigned/signed comparisons.
        * gcov.c (read_files): Remove unused "first_type" variable.
        (scan _for_source_files): Initialize s_ptr.
        (function_summary): Eliminate "%lf" formatting, use %ld for
        longs.
        (output_data): Initialize branch_probs and last_line_num.
        Eliminate "%lf" formatting, use "%ld" for longs.

Co-Authored-By: Jeffrey A Law <law@cygnus.com>

From-SVN: r17158
1997-12-20 04:31:54 -07:00