Commit Graph

40665 Commits

Author SHA1 Message Date
Jason Merrill
5ce89b2ef0 c-decl.c (finish_function): Warn about a non-void function with no return statement and no abnormal exit.
* c-decl.c (finish_function): Warn about a non-void function with
        no return statement and no abnormal exit.
        (current_function_returns_abnormally): New variable.
        (start_function): Clear it.
        (struct c_language_function): Add returns_abnormally.
        (push_c_function_context): Save it.
        (pop_c_function_context): Restore it.
        (builtin_function): Set TREE_THIS_VOLATILE on return fns.
        (grokdeclarator): Set C_FUNCTION_IMPLICIT_INT on functions without
        an explicit return type.
        * c-tree.h: Declare current_function_returns_abnormally.
        (C_FUNCTION_IMPLICIT_INT): New macro.
        * c-typeck.c (build_function_call): Set it.
        (c_expand_return): Set current_function_returns_value even if the
        value is erroneous.

From-SVN: r49551
2002-02-06 15:40:18 -05:00
Jakub Jelinek
caaf2272c0 re PR c/5420 (bad code generated with gcc3.1/ia64)
PR c/5420:
	* c-common.c (c_unsafe_for_reeval): Make COMPOUND_LITERAL_EXPR
	unsafe for reevaluation.

	* gcc.c-torture/execute/20020206-2.c: New test.

From-SVN: r49550
2002-02-06 20:37:31 +01:00
Jakub Jelinek
d512928893 re PR c/5482 (cyclone-0.2, ICE in emit_move_insn, at expr.c:2746)
PR c/5482:
	* c-common.c (c_expand_expr) [STMT_EXPR]: If last expression is not
	EXPR_STMT, but COMPOUND_STMT, recurse into it.

	* gcc.c-torture/execute/20020206-1.c: New test.

From-SVN: r49549
2002-02-06 20:32:04 +01:00
Jakub Jelinek
5364626ac4 re PR rtl-optimization/5429 (gcc 3.1 20020114 fails with Internal compiler error in verify_wide_reg_1, at flow.c:526)
PR optimization/5429:
	* gcc.c-torture/compile/20020206-1.c: New test.

From-SVN: r49548
2002-02-06 20:27:05 +01:00
Richard Henderson
7fb750990c cfganal.c (keep_with_call_p): Source for fixed_reg dest must be a general_operand.
* cfganal.c (keep_with_call_p): Source for fixed_reg dest must
        be a general_operand.  Dest for function value must be a pseudo.

From-SVN: r49547
2002-02-06 10:16:02 -08:00
Loren J. Rittle
99a4deb8a9 acinclude.m4: Add C++ linkage check for strtof.
* acinclude.m4: Add C++ linkage check for strtof.
	* aclocal.m4: Rebuilt.
	* config.h.in: Rebuilt.
	* configure: Rebuilt.
	* config/locale/c_locale_generic.cc: Conditionally include
	<ieeefp.h>.  Improve handling and error checking of float
	and long double input for non-C99 configurations.

From-SVN: r49546
2002-02-06 17:31:43 +00:00
Nick Clifton
23fb1469b5 Do not use an explicit alignment value as certain file formats cannot support
particularly large alignments.

From-SVN: r49545
2002-02-06 16:18:33 +00:00
Nick Clifton
1b8afbe758 Expect the compilation to fail because the COFF format does not support the
weak attribute.

From-SVN: r49544
2002-02-06 12:15:53 +00:00
Paolo Carlini
6662d4c337 locale_facets.tcc (money_get::do_get(string)): In case money_base::symbol deal properly with multi-char sign for patterns...
2002-02-06  Paolo Carlini  <pcarlini@unitus.it>

	* include/bits/locale_facets.tcc (money_get::do_get(string)):
	In case money_base::symbol deal properly with multi-char sign
	for patterns {X,Y,Z,symbol} and {X,Y,symbol,none}.
	* testsuite/22_locale/money_get_members_char.cc: Add test07.
	* testsuite/22_locale/money_get_members_wchar_t.cc: Add test07.

From-SVN: r49543
2002-02-06 12:13:00 +00:00
Nick Clifton
d3a8b6a672 Accept LABEL_REFs as well as SYMBOL_REFs from the constant pool.
From-SVN: r49542
2002-02-06 09:08:19 +00:00
GCC Administrator
f5ee37f2ce Daily bump.
From-SVN: r49540
2002-02-06 08:16:45 +00:00
Alexandre Oliva
3c1299c5ad dbxout.c (dbxout_parms): Apply DEBUGGER_ARG_OFFSET to parameters passed by invisible reference.
* dbxout.c (dbxout_parms): Apply DEBUGGER_ARG_OFFSET to parameters
passed by invisible reference.

From-SVN: r49539
2002-02-06 07:40:38 +00:00
Richard Henderson
c2c9f6c92e * config/sparc/sparc.h (ARG_POINTER_CFA_OFFSET): No stack bias.
From-SVN: r49538
2002-02-05 22:58:31 -08:00
Bryce McKinlay
65c9eafb7b Oops, forgot these in last check-in.
From-SVN: r49537
2002-02-06 05:45:23 +00:00
Hans-Peter Nilsson
a824924d41 Implement using "base addresses" in insn operands as default.
* config/mmix/mmix.c (mmix_conditional_register_usage): if
	-mabi=gnu, modify fixed_regs to fit the GNU ABI.
	(mmix_extra_constraint): Use 'R' to indicate that GETA should be
	used to read the rtx value.
	(mmix_target_asm_function_epilogue): Fix spacing.
	(mmix_constant_address_p): Handle TARGET_BASE_ADDRESSES.
	(mmix_legitimate_address): Ditto.
	(mmix_encode_section_info): Set SYMBOL_REF_FLAG on rtx:es that
	should be loaded with a GETA insn.  Don't allocate needless extra
	char for nul termination and fix misleading comment.
	(mmix_print_operand_address): Handle constants if
	TARGET_BASE_ADDRESSES.
	(mmix_output_register_setting): Use base addressing if
	TARGET_BASE_ADDRESSES and the number of insns is 3.
	* config/mmix/t-mmix (MULTILIB_EXTRA_OPTS): New.
	* config/mmix/mmix.md ("movdi"): Change the alternative with GETA
	to use R as constraint, add LDA to match s.
	* config/mmix/mmix.h (TARGET_BASE_ADDRESSES): New.
	(TARGET_DEFAULT): Add TARGET_MASK_BASE_ADDRESSES.
	(TARGET_SWITCHES): Add -mbase-addresses, -mno-base-addresses.
	(FIXED_REGISTERS): Make registers $231..$246 fixed by default.
	(MMIX_MMIXWARE_ABI_REG_ALLOC_ORDER): Move $231..$246 last, in
	order with other fixed registers.
	(MMIX_GNU_ABI_REG_ALLOC_ORDER): Put forward $231, in order with
	other parameter/call-clobbered registers.
	* doc/invoke.texi (Option Summary) <MMIX Options>: Add
	-mbase-addresses, -mno-base-addresses.
	(MMIX Options): Ditto.

From-SVN: r49536
2002-02-06 05:13:12 +00:00
Eric Christopher
282cb01bc2 crti.asm: Add changes for mips16.
2002-02-05  Eric Christopher  <echristo@redhat.com>

	* config/mips/crti.asm: Add changes for mips16. mips16 uses
	register 7 as RA instead of $31.
	* config/mips/crtn.asm: Ditto.
	* config/mips/mips.c (mips_move_2words): Add case for
	TARGET_MIPS16 when HOST_BITS_PER_WIDE_INT >= 64.
	(compute_frame_size): Fix typo.
	(save_restore_insns): Ditto.  Make documentation about using
	register $7 as return register more precise.
	(mips_expand_epilogue): Fix comment. Add code to work around not
	being able to add to the stack pointer directly.
	* config/mips/mips.h (EH_RETURN_DATA_REGNO): Change register number
	to 2 for TARGET_MIPS16 as we need 6 and 7 as clobbers in the
	epilogue.

From-SVN: r49535
2002-02-06 02:50:09 +00:00
Bryce McKinlay
8c78e3a3cd configure.in: Set up PLATFORMOBJS not PLATFORM_SPECIFIC_SOURCES.
* configure.in: Set up PLATFORMOBJS not PLATFORM_SPECIFIC_SOURCES.
	Symlink PLATFORMH to platform.h.
	* Makefile.am (libgcj_la_DEPENDENCIES, libgcj_la_LIBADD): Add
	PLATFORMOBJS.
	* java/lang/natSystem.cc: #include platform.h not posix.h.
	* Makefile.in: Rebuilt with libgcj automake.
	* configure: Rebuilt.

From-SVN: r49534
2002-02-06 01:46:46 +00:00
John David Anglin
73c342b9c8 * pa.h (PREDICATE_CODES): Add reg_before_reload_operand.
From-SVN: r49533
2002-02-06 00:21:26 +00:00
Aldy Hernandez
ef238c58cf altivec.h: Change elem to _S_elem.
2002-02-06  Aldy Hernandez  <aldyh@redhat.com>

        * config/rs6000/altivec.h: Change elem to _S_elem.

From-SVN: r49532
2002-02-05 23:19:13 +00:00
David Billinghurst
8a921c08a7 pr5473.f: New test
2002-02-05  David Billinghurst <David.Billinghurst@riotinto.com>

	* g77.dg/pr5473.f:  New test

From-SVN: r49531
2002-02-05 22:34:37 +00:00
Jason Thorpe
ad08e60e89 netbsd.h (WCHAR_TYPE): Define.
* config/netbsd.h (WCHAR_TYPE): Define.
(WCHAR_TYPE_SIZE): Ditto.
(WINT_TYPE): Ditto.
* config/alpha/netbsd.h (WCHAR_TYPE): Remove.
(WCHAR_UNSIGNED): Ditto.
(WCHAR_TYPE_SIZE): Ditto.
(WINT_TYPE): Ditto.
* config/arm/netbsd.h: Likewise.
* config/i386/netbsd-elf.h: Likewise.
* config/i386/netbsd.h: Likewise.
* config/m68k/netbsd-elf.h: Likewise.
* config/m68k/netbsd.h: Likewise.
* config/ns32k/netbsd.h: Likewise.
* config/sparc/netbsd.h: Likewise.
* config/vax/netbsd.: Likewise.

From-SVN: r49528
2002-02-05 19:01:56 +00:00
Alexandre Oliva
1af6141b86 class.c: Include target.h.
* class.c: Include target.h.
(check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
bit-field layout.
* Make-lang.in: Adjust deps.

From-SVN: r49527
2002-02-05 18:01:51 +00:00
Alexandre Oliva
f913c102a4 target.h (struct gcc_target): Added ms_bitfield_layout_p.
* target.h (struct gcc_target): Added ms_bitfield_layout_p.
* target-def.h (TARGET_MS_BITFIELD_LAYOUT_P): New.  Added to...
(TARGET_INITIALIZER): this.
* doc/tm.texi (TARGET_MS_BITFIELD_LAYOUT_P): Document.
(BITFIELD_NBYTES_LIMITED): Markup fix.
* tree.h (default_ms_bitfield_layout_p): Declare.
(record_layout_info): Added prev_field.
* tree.c (default_ms_bitfield_layout_p): New fn.
* c-decl.c (finish_struct): Disregard EMPTY_FIELD_BOUNDARY and
PCC_BITFIELD_TYPE_MATTERS for MS bit-field layout.
* stor-layout.c: Include target.h.
(start_record_layout): Initialize prev_field.
(place_field): Handle MS bit-field layout, and disregard
EMPTY_FIELD_BOUNDARY, BITFIELD_NBYTES_LIMITED and
PCC_BITFIELD_TYPE_MATTERS in this case.  Update prev_field.
* Makefile.in (stor-layout.o): Adjust dependencies.

From-SVN: r49526
2002-02-05 17:56:34 +00:00
Jason Merrill
c13db5d119 demangle.h (cplus_demangle_v3): Add "options" parm.
* demangle.h (cplus_demangle_v3): Add "options" parm.
        (cplus_demangle_v3_type): Remove prototype.
        (DMGL_VERBOSE): New macro.
        (DMGL_TYPES): New macro.

        * cplus-dem.c (flags): Add DMGL_VERBOSE
        (cplus_demangle_v3_p): Remove.
        (demangle_it): Add DMGL_TYPES to passed flags.
        * cp-demangle.c (cplus_demangle_v3_all): Remove.
        (cplus_demangle_v3_type): Remove.
        (cplus_demangle_v3): Add options parm.

        * collect2.c (dump_file): Pass DMGL_VERBOSE to cplus_demangle.

From-SVN: r49525
2002-02-05 11:33:31 -05:00
Paolo Carlini
e07554eb17 locale_facets.tcc (money_get::do_get(string)): First construct a tentative returned string...
2002-02-05  Paolo Carlini  <pcarlini@unitus.it>

	* include/bits/locale_facets.tcc (money_get::do_get(string)):
	First construct a tentative returned string, then, only if the
	parsing succeeds, copy it into the string passed by reference.
	* testsuite/22_locale/money_get_members_char.cc: Add test06.
	* testsuite/22_locale/money_get_members_wchar_t.cc: Add test06.

From-SVN: r49523
2002-02-05 11:35:48 +00:00
Andreas Jaeger
4505024e9e * crtstuff.c: Fix comments.
From-SVN: r49522
2002-02-05 11:31:06 +01:00
Richard Henderson
2e279a9b08 re PR fortran/3393 (ICE in extract_insn, at recog.c:2173)
PR fortran/3393
        * loop.c (loop_iv_add_mult_emit_before): Copy multiplier as well.
        (loop_iv_add_mult_sink, loop_iv_add_mult_hoist): Likewise.

From-SVN: r49521
2002-02-05 01:49:31 -08:00
Richard Henderson
794ad79db4 re PR fortran/3392 (ICE in function_arg, at config/mips/mips.c:4007)
PR fortran/3392
        * config/mips/mips.c (function_arg): Handle TImode.
        (function_arg_advance): Likewise.

From-SVN: r49520
2002-02-05 01:27:15 -08:00
Richard Henderson
7a97f559c5 * Makefile.in: Undo munging last change.
From-SVN: r49519
2002-02-05 00:38:02 -08:00
Aldy Hernandez
8f909017bf altivec.h (vec_step_help): Rename to __vec_step_help.
2002-02-05  Aldy Hernandez  <aldyh@redhat.com>

        * config/rs6000/altivec.h (vec_step_help): Rename to
        __vec_step_help.

From-SVN: r49518
2002-02-05 08:28:23 +00:00
GCC Administrator
ee67be75ad Daily bump.
From-SVN: r49517
2002-02-05 08:18:42 +00:00
Aldy Hernandez
81a2b9333d altivec-4.c: AltiVec builtin predicates changed format.
2002-02-05  Aldy Hernandez  <aldyh@redhat.com>

        * gcc.dg/altivec-4.c: AltiVec builtin predicates changed format.
        Fix testcase accordingly.

From-SVN: r49515
2002-02-05 08:12:31 +00:00
Richard Henderson
d83726b8d1 Undo munging last update.
From-SVN: r49514
2002-02-05 00:05:41 -08:00
Aldy Hernandez
66daa9e3e0 altivec.h: Fix typos.
2002-02-05  Aldy Hernandez  <aldyh@redhat.com>

        * config/rs6000/altivec.h: Fix typos.

From-SVN: r49513
2002-02-05 07:56:33 +00:00
Richard Henderson
8d2809bcf8 built-in-setjmp.c: Prototype stuff.
* gcc.c-torture/execute/built-in-setjmp.c: Prototype stuff.
        (buf): Change to be an array of pointers, not ints.

From-SVN: r49512
2002-02-04 22:37:02 -08:00
Jason Thorpe
2696e97b86 * config/arm/netbsd.h: Correct a comment.
From-SVN: r49511
2002-02-05 02:39:31 +00:00
Aldy Hernandez
3deb275873 rs6000.c (altivec_init_builtins): Fix typo building void typed builtins.
2002-02-05  Aldy Hernandez  <aldyh@redhat.com>

        * config/rs6000/rs6000.c (altivec_init_builtins): Fix typo
        building void typed builtins.

        * config/rs6000/altivec.h (vec_ld*): Fix typos.
        (vec_step): Implement for C++.

From-SVN: r49510
2002-02-05 02:18:55 +00:00
Adam Megacz
d7799ba140 win32.cc: Created it.
2002-02-04  Adam Megacz <adam@xwt.org>

        * win32.cc: Created it.
          configure.in: Added PLATFORM_SPECIFIC_SOURCES,
          which is set to posix.cc or win32.cc.
          Makefile.am: Updated it to use $(PLATFORM_SPECIFIC_SOURCES).

From-SVN: r49509
2002-02-05 02:08:16 +00:00
Adam Megacz
d08e89a9ec configure.in: Corrected mingw case branches; added * before and after.
2002-02-04  Adam Megacz <adam@xwt.org>

        * configure.in: Corrected mingw case branches; added * before
          and after.

From-SVN: r49508
2002-02-05 02:05:05 +00:00
Adam Megacz
4a8e624f35 configure.in: Add -lgdi32 -lwsock32 -lws2_32 to libgcj.spec if compiling for win32
2002-02-04  Adam Megacz <adam@xwt.org>

        * configure.in: Add -lgdi32 -lwsock32 -lws2_32 to libgcj.spec
          if compiling for win32

From-SVN: r49507
2002-02-05 02:04:15 +00:00
Adam Megacz
1d3efb36e8 win32-threads.cc: #undef STRICT after gc.h inclusion
2002-02-04  Adam Megacz <adam@xwt.org>

        * win32-threads.cc: #undef STRICT after gc.h inclusion

From-SVN: r49506
2002-02-05 01:59:44 +00:00
Jason Merrill
d8a6f584c5 * error.c (dump_type): Be more helpful about VECTOR_TYPE.
From-SVN: r49505
2002-02-04 20:46:01 -05:00
Richard Kenner
2c79137a49 * final.c (final_scan_insn): Add case for NOTE_INSN_LOOP_END_TOP_COND.
From-SVN: r49503
2002-02-04 19:29:01 -05:00
Phil Edwards
fd58f127a6 [multiple changes]
2002-02-04  Phil Edwards  <pme@gcc.gnu.org>

	* docs/doxygen/TODO:  Impl-defined behavior now documented...
	* docs/html/17_intro/howto.html:  ...here.
	* docs/doxygen/mainpage.doxy:  Remove, rename...
	* docs/doxygen/mainpage.html:  ...to this.  Tweak HTML, add license.
	* docs/doxygen/style.css:  Add small text.
	* docs/doxygen/run_doxygen:  Adjust for new mainpage.
	* docs/doxygen/user.cfg.in:  Likewise.

2002-02-04  Stephan Buys  <s.buys@icon.co.za>

	* include/bits/stl_map.h:  Initial doxygen markup.
	* include/std/std_fstream.h:  Initial doxygen markup.

From-SVN: r49502
2002-02-05 00:14:37 +00:00
Richard Henderson
ebbb0a63f4 combine.c (nonzero_bits): Re-introduce special case for sp/fp/ap wrt REGNO_POINTER_ALIGN.
* combine.c (nonzero_bits): Re-introduce special case for
        sp/fp/ap wrt REGNO_POINTER_ALIGN.

From-SVN: r49501
2002-02-04 15:06:04 -08:00
Aldy Hernandez
ae4b4a02e8 extend.texi: Warn about unsupported usage of altivec builtins.
2002-01-31  Aldy Hernandez  <aldyh@redhat.com>

        * doc/extend.texi: Warn about unsupported usage of altivec
        builtins.

        * config/rs6000/rs6000.md (altivec_vcmp*_p): Remove.
        (altivec_predicate_*): New.

        * config/rs6000/altivec.h: Rewrite predicates to use new builtins.
        Add C++ version of vec_*() functions.

        * config/rs6000/rs6000.c (bdesc_altivec_preds): New.
        (bdesc_2arg): Remove altivec predicates.
        (altivec_expand_builtin): Handle predicates.
        (altivec_init_builtins): Handle predicates.
        (altivec_expand_predicate_builtin): New.

From-SVN: r49500
2002-02-04 22:50:56 +00:00
John David Anglin
f6bcf44c5e pa.c (DO_FRAME_NOTES): Move forward.
* pa.c (DO_FRAME_NOTES): Move forward.
	(store_reg): Revise handling of frame notes.
	(load_reg): Likewise.
	(set_reg_plus_d): Likewise.
	(hppa_expand_prologue): Likewise.
	(hppa_expand_epilogue): Likewise.

From-SVN: r49499
2002-02-04 22:41:59 +00:00
John David Anglin
703b0080a4 * unwind-dw2-fde-glibc.c: Define _GNU_SOURCE if not defined.
From-SVN: r49498
2002-02-04 22:21:12 +00:00
Jakub Jelinek
6f9fdf4db2 PR c/4475, c++/3780:
* c-common.def (SWITCH_STMT): Add SWITCH_TYPE operand.
	* c-common.h (SWITCH_TYPE): Define.
	* c-typeck.c (c_start_case): Set SWITCH_TYPE.
	* stmt.c (all_cases_count): Set lastval to thisval at end of loop.
	Rename spareness variable to sparseness.
	(expand_end_case_type): Renamed from expand_end_case, use orig_type
	if non-NULL instead of TREE_TYPE (orig_index).
	* tree.h (expand_end_case_type): Renamed from expand_end_case.
	(expand_end_case): Define using expand_end_case_type.
	* c-semantics.c (genrtl_switch_stmt): Pass SWITCH_TYPE
	to expand_end_case_type.
	* doc/c-tree.texi (SWITCH_STMT): Document SWITCH_TYPE.

	* semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
	(finish_switch_cond): Set SWITCH_TYPE.

	* gcc.dg/Wswitch.c: Fix typos.  Don't return unconditionally
	before all tests.  Move warning one line above to match where it
	C frontend emits.
	* gcc.dg/Wswitch-2.c: New test.
	* g++.dg/warn/Wswitch-1.C: New test.
	* g++.dg/warn/Wswitch-2.C: New test.

From-SVN: r49497
2002-02-04 23:05:15 +01:00
John David Anglin
79109502a0 pa.h (PREFERRED_STACK_BOUNDARY): Define to match standard rounding.
* pa.h (PREFERRED_STACK_BOUNDARY): Define to match standard rounding.
	(BIGGEST_ALIGNMENT): Change to 128.

From-SVN: r49496
2002-02-04 21:37:14 +00:00