Commit Graph

39872 Commits

Author SHA1 Message Date
Nathan Sidwell
303d1c55d3 re PR c++/5213 (ICE on (possibly) illegal code)
cp:
	PR c++/5213
	* pt.c (convert_template_argument): Be more careful determining
	when RECORD_TYPE templates are or are not templates.
testsuite:
	* g++.dg/template/ttp3.C: New test.

From-SVN: r48468
2002-01-02 12:44:44 +00:00
Paolo Carlini
f53d0ff143 stl_algobase.h (copy_n + helpers, [...]): Move to...
2002-01-02  Paolo Carlini  <pcarlini@unitus.it>

	* include/bits/stl_algobase.h (copy_n + helpers,
	lexicographical_compare_3way + helpers):  Move to...
	* include/ext/algorithm:  ...here.
        * include/bits/stl_uninitialized.h (uninitialized_copy_n +
        helpers):  Move to...
        * include/ext/memory:  ...here, new file.
        * include/Makefile.am (ext_headers):  Add new file.
        * include/Makefile.in:  Regenerate.
        * testsuite/ext/headers.cc:  Include <ext/memory>.
	* include/backward/algobase.h:  Include <ext/memory> and
	<ext/algorithm>, tweak.
        * include/ext/ropeimpl.h:  Include <ext/memory>, tweak.
	* include/ext/stl_rope.h:  Include <ext/memory>, tweak.

From-SVN: r48467
2002-01-02 12:16:56 +00:00
Nathan Sidwell
d46a33b322 re PR c++/775 (2.97 error declaring nested class a friend)
cp:
	PR c++/775
	* cp-tree.h (handle_class_head): Adjust prototype.
	* decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
	parameters. Use for all class heads.
	* parse.y (named_class_head_sans_basetype, named_class_head,
	named_complex_class_head_sans_basetype,
	named_class_head_sans_basetype_defn,
	unnamed_class_head): Remove.
	(class_head, class_head_apparent_template): Recognize class heads
	(class_head_decl, class_head_defn): New reductions. Process class
	heads.
	(structsp): Adjust class definition and class declaration
	reductions.
	(maybe_base_class_list): Give diagnostic on empty list.
testsuite:
	* g++.dg/template/friend2.C: New test.
	* g++.old-deja/g++/brendan/crash8.C: Adjust location of error.

From-SVN: r48466
2002-01-02 11:37:00 +00:00
Nathan Sidwell
4542128ef1 re PR c++/4379 (Member pointer to member reference not allowed when declared directly, but allowed as template parameter.)
cp:
	PR c++/4379
	* typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
	single non-static member.
	(unary_complex_lvalue): If it cannot be a pointer to member, don't
	make it so. Check it is not pointer to reference.
testsuite:
	* g++.dg/other/ptrmem1.C: New test.
	* g++.dg/other/ptrmem2.C: New test.

From-SVN: r48465
2002-01-02 11:32:34 +00:00
Nathan Sidwell
903c623438 re PR c++/5132 (NaN = 0.0 * HUGE_VAL fails to compile in templates)
cp:
	PR c++/5132
	* decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
	are processing a template decl.
testsuite:
	* g++.dg/template/ctor1.C: New test.

From-SVN: r48464
2002-01-02 11:29:15 +00:00
Nathan Sidwell
477558bf39 PR c++/5116, c++/764
cp:
	PR c++/5116, c++/764
	* call.c (build_new_op): Make sure template class operands are
	instantiated. Simplify arglist construction.
testsuite:
	* g++.dg/template/friend2.C: New test.

From-SVN: r48463
2002-01-02 11:26:12 +00:00
GCC Administrator
dbac42475c Daily bump.
From-SVN: r48461
2002-01-02 08:16:12 +00:00
Kazu Hirata
aefc5826e7 fixunssfsi.c: Update copyright.
* config/h8300/fixunssfsi.c: Update copyright.
	Fix comment typos.
	Fix formatting.
	* config/h8300/h8300.c: Update copyright.
	Eliminate warnings.

From-SVN: r48460
2002-01-02 07:57:15 +00:00
Kazu Hirata
b1c9bc51b6 romp.c: Fix comment formatting.
* config/romp/romp.c: Fix comment formatting.
	* config/romp/romp.h: Likewise.
	* config/romp/romp.md: Likewise.
	* config/s390/s390.c: Likewise.
	* config/stormy16/stormy16.c: Likewise.
	* config/stormy16/stormy16.h: Likewise.

From-SVN: r48459
2002-01-02 06:47:47 +00:00
Tom Rix
252b88f78c Fix for rs6000_emit_allocate_stack's use of rs6000_emit_set_long_const for ppc64.
From-SVN: r48458
2002-01-02 03:48:53 +00:00
Kaveh R. Ghazi
99e9e773cb * warn_summary: Add -ada subdirectory flag.
From-SVN: r48457
2002-01-02 03:35:21 +00:00
Alexandre Oliva
1574ef130f c-common.h (genrtl_expr_stmt_value): Declare.
* c-common.h (genrtl_expr_stmt_value): Declare.
* c-semantics.c (genrtl_goto_stmt): Redirect to...
(genrtl_goto_stmt_value): ... this new function.  Pass new
argument down to expand_expr_stmt_value, taking
TREE_ADDRESSABLE into account.
* c-common.c (c_expand_expr): Mark the last EXPR_STMT of a
STMT_EXPR as addressable, i.e., one whose result we want.
* expr.c (expand_expr): Don't save expression statement value
of labeled_blocks or loop_exprs.
* stmt.c (expand_expr_stmt): Redirect to...
(expand_expr_stmt_value): ... this new function.  Use new
argument to tell whether to save expression value.
(expand_end_stmt_expr): Reset last_expr_type and
last_expr_value if we don't have either.
* tree-inline.c (declare_return_variable): Mark its use
statement as addressable.
* tree.h: Document new use of TREE_ADDRESSABLE.
(expand_expr_stmt_value): Declare.

From-SVN: r48456
2002-01-02 02:31:58 +00:00
Andreas Tobler
6180abdb9d ieeefp.h: Define __IEEE_BIG_ENDIAN for Darwin.
2001-12-29 Andreas Tobler <a.tobler@schweiz.ch>

	* libjava/java/lang/ieeefp.h: Define __IEEE_BIG_ENDIAN for
	Darwin.

From-SVN: r48455
2002-01-01 23:36:11 +00:00
Joseph Myers
29f7a20865 configure.in: Prepend ${srcdir}/config/${cpu_type}/ instead of ${srcdir}/ginclude/ to every...
* configure.in: Prepend ${srcdir}/config/${cpu_type}/ instead of
	${srcdir}/ginclude/ to every entry in extra_headers.
	* configure: Regenerate.
	* ginclude/math-3300.h: Rename to config/m68k/math-3300.h.
	* ginclude/math-68881.h: Rename to config/m68k/math-68881.h.
	* ginclude/ppc-asm.h: Rename to config/rs6000/ppc-asm.h.
	* ginclude/proto.h: Rename to config/convex/proto.h.

From-SVN: r48454
2002-01-01 23:21:01 +00:00
Richard Kenner
4c445c4ba5 Fix corrupted hunk
From-SVN: r48453
2002-01-01 17:28:36 -05:00
Richard Kenner
2cc2d4bbcd attribs.c (handle_vector_size_attribute): Use host_integerp and tree_int_cst; remove warnings.
* attribs.c (handle_vector_size_attribute): Use host_integerp
	and tree_int_cst; remove warnings.
	* caller-save.c (insert_restore): Add cast to get rid of warning.
	(insert_save): Likewise.
	* emit-rtl.c (adjust_address_1, offset_address): Likewise.
	* regmove.c (find_matches): Add temporary var to kill a warning.

From-SVN: r48452
2002-01-01 17:22:25 -05:00
Douglas B Rupp
16b617648e vms.h (DWARF2_UNWIND_INFO, [...]): Define.
* config/alpha/vms.h (DWARF2_UNWIND_INFO, EH_RETURN_HANDLER_RTX,
	LINK_EH_SPEC, MD_FALLBACK_FRAME_STATE_FOR): Define.
	* config/alpha/t-vms (EXTRA_PARTS): Add vms-dwarf2eh.o
	(vms-dwarf2eh.o): Add Makefile rule.
	* config/alpha/vms-ld.c (main): Handle vms-dwarf2eh.o.
	* config/alpha/vms-dwarf2eh.asm: New file.

From-SVN: r48451
2002-01-01 17:15:20 -05:00
Douglas B Rupp
f01c9bcdd8 * gcc.c (delete_if_ordinary): Delete all versions.
From-SVN: r48450
2002-01-01 16:48:58 -05:00
Hans-Peter Nilsson
d022094fd9 Update copyright years list
From-SVN: r48449
2002-01-01 21:11:23 +00:00
Hans-Peter Nilsson
91312b81c9 mmix.md: Update FIXME to not mention define_constants.
* config/mmix/mmix.md: Update FIXME to not mention
	define_constants.
	(MMIX_rJ_REGNUM): New define_constants constant.
	("movqi", "movsi", "movdi", "*movdicc_real_foldable",
	"*movdicc_real"): Adjust contraints formatting.
	("*bCC_foldable"): Add %+ for P in output format and delete FIXME
	for branch prediction.
	("*bCC", "*bCC_inverted_foldable", "*bCC_inverted"): Add %+ in
	output template.
	("*call_real", "*call_value_real", "nonlocal_goto_receiver",
	"*nonlocal_goto_receiver_expanded"): Use MMIX_rJ_REGNUM instead of
	number.  Delete related FIXMEs.
	* config/mmix/mmix.h (MMIX_INCOMING_RETURN_ADDRESS_REGNUM): Change
	from number to MMIX_rJ_REGNUM.
	(TARGET_MASK_BRANCH_PREDICT): New.
	(TARGET_DEFAULT): Change to TARGET_MASK_BRANCH_PREDICT.
	(TARGET_SWITCHES): Update comment.  Correct -mno-toplevel-symbols
	value.  Add -mbranch-predict and -mno-branch-predict.
	(TARGET_VERSION): Drop date.
	(ADDITIONAL_REGISTER_NAMES): Use MMIX_rJ_REGNUM, not number.
	* config/mmix/mmix.c (mmix_encode_section_info): Correct condition
	for finding out global symbols.
	(mmix_asm_output_labelref): Revert condition for global symbol.
	(mmix_print_operand): <case '+'>: Emit P for a likely branch.
	(mmix_print_operand_punct_valid_p): A '+' is valid.

From-SVN: r48448
2002-01-01 20:52:28 +00:00
Hans-Peter Nilsson
db993cf385 * gcc.dg/mmix-1.c: New test.
From-SVN: r48447
2002-01-01 20:48:31 +00:00
Roger Sayle
709f271858 stubs.c (sinf,cosf): Implement stubs to enable the equivalent ___builtin__ versions.
2002-01-01  Roger Sayle <roger@eyesopen.com>

	* libmath/stubs.c (sinf,cosf): Implement stubs to enable the
	equivalent ___builtin__ versions.

	* include/c_shadow/bits/std_cmath.h: All __builtin math functions
	are available in libstdc++ as the necessary stub implementations
	are provided by libmath/stubs.c.

From-SVN: r48445
2002-01-01 20:50:16 +01:00
Jason Thorpe
240bb1c62c * MAINTAINERS (Write After Approval): Add myself.
From-SVN: r48444
2002-01-01 18:27:37 +00:00
Jason Thorpe
40ded87230 configure.in: Add support for NetBSD cross compiles.
* configure.in: Add support for NetBSD cross compiles.
* configure: Regenerate.

From-SVN: r48443
2002-01-01 18:12:06 +00:00
Douglas B Rupp
af328d8dd7 configure.in (uintptr_t): Use AC_CHECK_TYPE.
* configure.in (uintptr_t): Use AC_CHECK_TYPE.
	* configure: Regenerated.

From-SVN: r48442
2002-01-01 05:01:43 -05:00
GCC Administrator
3cce904905 Daily bump.
From-SVN: r48440
2002-01-01 08:16:26 +00:00
Tom Tromey
12cfb4fc72 parse.y (dump_java_tree): New function.
* parse.y (dump_java_tree): New function.
	(source_end_java_method): Call it.
	(end_class_declaration): Likewise.
	* lang.c (java_decode_option): Call dump_switch_p.

From-SVN: r48439
2002-01-01 01:42:15 +00:00
Richard Henderson
f95e79cc11 * config/ia64/ia64.c (mark_reg_gr_used_mask): Mind HARD_REGNO_NREGS.
From-SVN: r48437
2001-12-31 16:23:22 -08:00
Ira Ruben
a4219437e2 aclocal.m4 (libiberty_AC_FUNC_STRNCMP): Use anon mmap as 2nd try.
* aclocal.m4 (libiberty_AC_FUNC_STRNCMP): Use anon mmap as 2nd try.
* configure: Regenerated.

From-SVN: r48436
2001-12-31 18:23:49 -05:00
Richard Henderson
3ada20eee1 regrename.c (build_def_use): Don't rename asm operands that were originally hard registers.
* regrename.c (build_def_use): Don't rename asm operands that
        were originally hard registers.
        (copyprop_hardreg_forward_1): Likewise.
        (find_oldest_value_reg): Copy ORIGINAL_REGNO from source.
        * varasm.c (make_decl_rtl): Use gen_rtx_raw_REG.  Set ORIGINAL_REGNO.

        * gcc.dg/asm-5.c: New.

From-SVN: r48435
2001-12-31 15:16:08 -08:00
Douglas B Rupp
5a598cccec vms.h (HAS_INIT_SECTION, [...]): Remove.
* config/alpha/vms.h (HAS_INIT_SECTION, NEED_ATEXIT): Remove.
	(NAME__MAIN, SYMBOL__MAIN): Define.

From-SVN: r48434
2001-12-31 18:03:52 -05:00
Richard Henderson
f6598df3a0 alpha.c (reg_no_subreg_operand): Reject all non-registers.
* config/alpha/alpha.c (reg_no_subreg_operand): Reject all
        non-registers.

From-SVN: r48433
2001-12-31 13:33:58 -08:00
Richard Henderson
7687c5b8c6 * final.c (alter_subreg): Assign REGNO after changing the rtx code.
From-SVN: r48432
2001-12-31 13:33:36 -08:00
Richard Henderson
a124fcda15 cfgrtl.c (delete_insn): Check for not NOTE_INSN_DELETED_LABEL before decrementing LABEL_NUSES from a...
* cfgrtl.c (delete_insn): Check for not NOTE_INSN_DELETED_LABEL
        before decrementing LABEL_NUSES from a jump table.

From-SVN: r48431
2001-12-31 13:33:19 -08:00
Paolo Carlini
6d66e50d52 iterator: Add #include <bits/std_iterator.h>, tweak.
2001-12-31  Paolo Carlini  <pcarlini@unitus.it>

	* include/ext/iterator:  Add #include <bits/std_iterator.h>, tweak.
	* testsuite/ext/headers.cc:  Add <ext/iterator>.

From-SVN: r48430
2001-12-31 19:30:24 +00:00
Paolo Carlini
36955a954f algo.h: Add two more using declarations.
2001-12-31  Paolo Carlini  <pcarlini@unitus.it>

	* include/backward/algo.h:  Add two more using declarations.
	* include/backward/iterator.h:  Include <ext/iterator>,
	add using declaration.
	* include/ext/algorithm:  Add #pragma GCC system_header.

From-SVN: r48429
2001-12-31 18:03:47 +00:00
Phil Edwards
3d90ff9352 stl_bvector.h: Change calls to 3-argument distance() into standard 2-argument version.
2001-12-31  Phil Edwards  <pme@gcc.gnu.org>

	* include/bits/stl_bvector.h:  Change calls to 3-argument distance()
	into standard 2-argument version.
	* include/bits/stl_deque.h:  Likewise.
	* include/bits/stl_tempbuf.h:  Likewise.
	* include/bits/stl_tree.h:  Likewise.
	* include/bits/stl_vector.h:  Likewise.
	* include/ext/stl_hashtable.h:  Likewise.
	* include/bits/stl_iterator_base_funcs.h:  Move distance() extension...
	* include/ext/iterator:  to here.  New file.
	* include/Makefile.am (ext_headers):  Add new file, alphabatize.
	* include/Makefile.in:  Regenerate.

From-SVN: r48428
2001-12-31 16:16:17 +00:00
Paolo Carlini
c49b2550b7 eb130.C: hash_set is now in namespace __gnu_cxx
2001-12-31  Paolo Carlini  <pcarlini@unitus.it>

        * g++.old-deja/g++.robertl/eb130.C: hash_set is now
	in namespace __gnu_cxx

From-SVN: r48427
2001-12-31 15:27:36 +00:00
Phil Edwards
0de92bd834 stl_deque.h: Doxygenate with initial/example hooks.
2001-12-31  Phil Edwards  <pme@gcc.gnu.org>

	* include/bits/stl_deque.h:  Doxygenate with initial/example hooks.
	Clean up spacing and indentation.

From-SVN: r48426
2001-12-31 14:53:47 +00:00
Paolo Carlini
63fea34ee3 slist: Move into __gnu_cxx, tweak, add using declarations.
2001-12-31  Paolo Carlini  <pcarlini@unitus.it>

	* include/ext/slist:  Move into __gnu_cxx,
	tweak, add using declarations.

From-SVN: r48423
2001-12-31 10:26:01 +00:00
Paolo Carlini
e538847e1c hash_map: Move into __gnu_cxx, tweak, add using declarations.
2001-12-31  Paolo Carlini  <pcarlini@unitus.it>

	* include/ext/hash_map:  Move into __gnu_cxx,
	tweak, add using declarations.
	* include/ext/hash_set:  Ditto.
	* include/ext/ropeimpl.h:  Ditto.
	* include/ext/stl_hash_fun.h:  Ditto.
	* include/ext/stl_hashtable.h:  Ditto.
	* include/ext/stl_rope.h:  Ditto.
	* src/ext-inst.cc: Tweak.
	* testsuite/ext/rope.cc: Tweak.

From-SVN: r48422
2001-12-31 10:22:00 +00:00
Paolo Carlini
a2ee914480 algo.h: Include <ext/algorithm>, tweak using declarations.
2001-12-31  Paolo Carlini  <pcarlini@unitus.it>

        * include/backward/algo.h:  Include <ext/algorithm>,
        tweak using declarations.

From-SVN: r48421
2001-12-31 09:10:39 +00:00
GCC Administrator
2b0ee5c813 Daily bump.
From-SVN: r48419
2001-12-31 08:16:10 +00:00
Graham Stott
b8fcefb506 * halfpic.h: Remove foward defs of tree_node and rtx_def.
From-SVN: r48418
2001-12-31 06:03:23 +00:00
Graham Stott
b88098a30b * toplev.h: Remove forward def of tree_node, rtx_def.
From-SVN: r48417
2001-12-31 05:54:02 +00:00
Graham Stott
b52155b696 except.h: Remove forward def of tree_node, rtx_def and define of tree, rtx.
* except.h: Remove forward def of tree_node, rtx_def and
        define of tree, rtx. Also remove undefs.

From-SVN: r48416
2001-12-31 05:44:58 +00:00
Graham Stott
d505d66461 basic-block.h: Remove forward def of tree_node and define of tree.
* basic-block.h: Remove forward def of tree_node and
        define of tree.

From-SVN: r48415
2001-12-31 05:44:08 +00:00
Graham Stott
47f1618a35 except.h: Remove forward def of tree_node, rtx_def and define of tree, rtx.
* except.h: Remove forward def of tree_node, rtx_def and
        define of tree, rtx. Also remove undefs.

        * basic-block.h: Remove forward def of tree_node and
        define of tree.

From-SVN: r48414
2001-12-31 05:42:52 +00:00
Graham Stott
b90d6aac62 Remove extranwous changelog header.
From-SVN: r48413
2001-12-31 04:46:11 +00:00
Richard Henderson
d73b1f074b cfglayout.c (scope_def, [...]): Remove.
* cfglayout.c (scope_def, scope_forest_info, forest,
        relate_bbs_with_scopes, make_new_scope, build_scope_forest,
        remove_scope_notes, insert_intra_before_1, insert_intra_1,
        insert_intra_bb_scope_notes, insert_inter_bb_scope_notes,
        rebuild_scope_notes, free_scope_forest_1, dump_scope_forest,
        dump_scope_forest_1, get_next_bb_note, get_prev_bb_note): Remove.
        (fixup_reorder_chain): Don't set scope for bb.
        (insn_scopes, scope_to_insns_initialize, set_block_levels,
        change_scope, scope_to_insns_finalize): New.
        (cfg_layout_initialize, cfg_layout_finalize): Update to match.
        * cfglayout.h (scope_def, scope): Remove.
        (reorder_block_def): Remove scope member.
        (scope_to_insns_initialize, scope_to_insns_finalize): Declare.
        * haifa-sched.c: Revert reemit_other_notes change.
        * sched-ebb.c (schedule_ebbs): Don't call remove_unnecessary_notes.
        Use scope_to_insns_initialize and scope_to_insns_finalize.
        * sched-rgn.c (schedule_insns): Likewise.

        * gcc.dg/debug-6.c: New.

From-SVN: r48412
2001-12-30 20:19:35 -08:00