Commit Graph

24045 Commits

Author SHA1 Message Date
Nathan Sidwell 4a9e5c6725 Reimplement dynamic cast and catch matching.
* cp-tree.h (get_dynamic_cast_base_type): Prototype new function
	* search.c (dynamic_cast_base_recurse): New function.
	(get_dynamic_cast_base_type): New function for dynamic cast.
	* rtti.c (build_dynamic_cast_1): Determine source and target
	class relationship. Call __dynamic_cast_2.
	* tinfo.h (__user_type_info::upcast): New catch dispatcher.
	(__user_type_info::dyncast): New dynamic cast dispatcher.
	(__user_type_info::sub_kind): New nested enumeration.
	(__user_type_info::contained_p): sub_kind predicate.
	(__user_type_info::contained_public_p): Likewise.
	(__user_type_info::contained_nonpublic_p): Likewise.
	(__user_type_info::contained_nonvirtual_p: Likewise.
	(__user_type_info::upcast_result): New nested struct.
	(__user_type_info::dyncast_result): New nested struct.
	(*::do_upcast): New catch function.
	(*::do_dyncast): New dynamic cast function.
	(__user_type_info::find_public_subobj): New dynamic cast
	helper dispatcher.
	(*::do_find_public_subobj): New dynamic cast helper function.
	* tinfo.cc (__user_type_info::upcast): Define catch dispatcher.
	(__user_type_info::dyncast): Define dynamic cast dispatcher.
	(*::do_upcast): Define catch function.
	(*::do_dyncast): Define dynamic cast function.
	(*::do_find_public_subobj): Define dynamic cast helper function.
	* tinfo2.cc (__throw_type_match_rtti_2): Use upcast.
	(__dynamic_cast): Backwards compatibility wrapper. Use dyncast.
	(__dynamic_cast_2): New dynamic cast runtime.

From-SVN: r29544
1999-09-21 14:40:13 +00:00
Jeffrey A Law e36e6e0261 Makefile.in (gc.o, gc_gc.o): Do not pass -fgnu-runtime to the compiler when building C code.
* Makefile.in (gc.o, gc_gc.o): Do not pass -fgnu-runtime to
        the compiler when building C code.

From-SVN: r29543
1999-09-21 07:48:59 -06:00
Jeffrey A Law e151ac883e * pa.c (pa_add_gc_roots): Fix thinko in last change.
From-SVN: r29542
1999-09-21 06:48:36 -06:00
Richard Earnshaw 46826921eb stmt.c (any_pending_cleanups): Don't crash when current_function->stmt is unset.
* stmt.c (any_pending_cleanups): Don't crash when
        current_function->stmt is unset.

From-SVN: r29541
1999-09-21 05:31:14 -06:00
Alex Samuel acfaa91e95 Add myself to the list.
From-SVN: r29540
1999-09-21 08:53:52 +00:00
Mark Mitchell 9f52c201b7 Force check-in to ensure that it is up to date.
From-SVN: r29539
1999-09-21 07:45:38 +00:00
Jeff Law c0a3450d59 Daily bump.
From-SVN: r29538
1999-09-21 01:45:11 -06:00
Mark Mitchell bce9471e0c cp-tree.h (finish_stmt_expr): Change prototype.
* cp-tree.h (finish_stmt_expr): Change prototype.
	* expr.c (cplus_expand_expr): Adjust call accordingly.
	* init.c (finish_init_stmts): Likewise.
	* parse.y (primary): Likewise.
	* pt.c (tsubst_copy): Likewise.
	* semantics.c (finish_stmt_expr): Don't take two parameters.
	Don't remove generated BLOCKs from the block-tree.

From-SVN: r29537
1999-09-21 07:41:01 +00:00
Alexandre Oliva 5ba57b5522 cp-tree.h (finish_stmt_expr): Change prototype.
* cp-tree.h (finish_stmt_expr): Change prototype.
        * expr.c (cplus_expand_expr): Adjust call accordingly.
        * init.c (finish_init_stmts): Likewise.
        * parse.y (primary): Likewise.
        * pt.c (tsubst_copy): Likewise.
        * semantics.c (finish_stmt_expr): Don't take two parameters.
        Don't remove generated BLOCKs from the block-tree.

From-SVN: r29536
1999-09-21 04:06:31 +00:00
Alexandre Oliva a7e1e2acfd emit-rtl.c (init_emit_once): Initialize const_int_rtx before other initializations that may use it for...
* emit-rtl.c (init_emit_once): Initialize const_int_rtx before
other initializations that may use it for relative offsets.

From-SVN: r29535
1999-09-21 04:04:16 +00:00
Alexandre Oliva 0c723adada sol2.h (PREFERRED_DEBUGGING_TYPE): Use stabs.
* config/i386/sol2.h (PREFERRED_DEBUGGING_TYPE): Use stabs.
(ASM_SPEC): Moved from sol2dbg.h.  Added work-around for gas.
* config/i386/sol2dbg.h: Removed.
* config/i386/sol2gas.h: New file, to enable gas work-around.
* configure.in: Use i386/sol2gas.h on Solaris/x86 --with-gas.
Don't use sol2dbg.h.
* configure: Rebuilt.

From-SVN: r29534
1999-09-21 00:55:08 +00:00
Mark Mitchell 447cfcb9e1 cp-tree.h (finish_stmt_expr): Change prototype.
* cp-tree.h (finish_stmt_expr): Change prototype.
	* expr.c (cplus_expand_expr): Adjust call accordingly.
	* init.c (finish_init_stmts): Likewise.
	* parse.y (primary): Likewise.
	* pt.c (tsubst_copy): Likewise.
	* semantics.c (finish_stmt_expr): Don't take two parameters.
	Don't remove generated BLOCKs from the block-tree.

From-SVN: r29533
1999-09-20 21:26:06 +00:00
Mark Mitchell ea003f6d7c * invoke.texi (-fthis-is-variable): Remove documentation.
From-SVN: r29532
1999-09-20 20:24:42 +00:00
Mark Mitchell 9bfadf57a2 Remove support for assigning to `this'.
* NEWS: Note that fact.
	* class.c (build_vbase_path): Don't check flag_this_is_variable.
	* cp-tree.h (EXPR_STMT_ASSIGNS_THIS): Remove.
	(language_function): Remove assigns_this, just_assigned_this, and
	x_base_init_expr.  Add x_vcalls_possible_p.  Add vtbls_set_up_p.
	(base_init_expr): Remove.
	(current_vcalls_possible_p): New macro.
	(vtbls_set_up_p): Likewise.
	(emit_base_init): Change prototype.
	* decl.c (finish_destructor_body): New function, split out from
	finish_function.
	(current_function_assigns_this): Remove.
	(current_function_just_assigned_this): Likewise.
	(start_function): Don't set them.
	(finish_function): Don't check them.  Don't emit
	base-initialization code here.  Generate code for destructors when
	doing semantic analysis.
	(finish_stmt): Don't check current_function_just_assigned_this.
	* decl2.c (lang_f_options): Remove this-is-variable.
	(lang_decode_option): Likewise.
	(grokclassfn): Don't check flag_this_is_variable.
	* init.c (emit_base_init): Return the expression generated.
	(construct_virtual_bases): Don't push/pop obstacks.  Fix
	typo.
	(build_new_1): Don't check flag_this_is_variable.
	(get_temp_regvar): Don't set DECL_REGISTER.
	(build_vec_init): Don't call use_variable.
	* lang-options.h: Remove "-fthis-is-variable" and
	"-fno-this-is-variable".
	* pt.c (tsubst_expr): Don't check EXPR_STMT_ASSIGNS_THIS.
	* search.c (expand_upcast_fixups): Use finish_expr_stmt, not
	expand_expr_stmt.
	* semantics.c (finish_expr_stmt_real): Rename to ...
	(finish_expr_stmt): This.  Remove assigned_this parameter.
	(begin_if_stmt): Call do_pushlevel before starting the statement.
	(begin_compound_stmt): Don't declare __FUNCTION__ in scope-less
	blocks.
	(setup_vtbl_ptr): Emit initialization code for bases and members
	at semantic-analysis time.  Emit code to initialize vtables in
	destructors here.
	(expand_stmt): Use finish_expr_stmt, not finish_expr_stmt_real.
	Don't handle CTOR_INITIALIZER any more.
	* typeck.c (build_modify_expr): Don't check for assignments to
	this.
	(c_expand_return): Don't suggest assigning to `this'.

	* Makefile.in (decl.o): Depend on RTL_H.
	(decl2.o): Likewise.
	(class.o): Likewise.
	(call.o): Likewise.
	(method.o): Likewise.
	(search.o): Likewise.
	(tree.o): Likewise.
	(pt.o): Likewise.

	* decl.c (duplicate_decls): When a builtin function is redeclared
	as static, make sure it is mangled correctly.

	* ir.texi (CTOR_INITIALIZER): Remove mention.  Fix typo.  Add
	detail about the statement-tree.

From-SVN: r29531
1999-09-20 20:19:04 +00:00
Richard Henderson 2307e37238 basic-block.h (compute_bb_for_insn): Declare.
* basic-block.h (compute_bb_for_insn): Declare.
        * flow.c (compute_bb_for_insn): Export.  Don't accept the varray
        to use; set size of basic_block_for_insn directly.
        (find_basic_blocks): Update.

From-SVN: r29530
1999-09-20 13:11:36 -07:00
Tom Tromey 8801244b4f configure: Rebuilt.
* configure: Rebuilt.
	* configure.in: Send output of `-fuse-divide-subroutine' test
	compilation to /dev/null.

From-SVN: r29529
1999-09-20 20:09:42 +00:00
Kaveh R. Ghazi b8024b5942 * flow.c (verify_flow_info): Fix typo, "abort;" -> "abort ();".
From-SVN: r29528
1999-09-20 19:14:48 +00:00
Kaveh R. Ghazi 451fbdf217 crtstuff.c (ON_EXIT): Delete empty macro definition.
* crtstuff.c (ON_EXIT): Delete empty macro definition.
       (__do_global_ctors_aux): Call atexit(), not ON_EXIT().

From-SVN: r29527
1999-09-20 18:59:09 +00:00
Jeffrey A Law 8d02813512 Revert this change. Gavin's patch to operand_equal_p is a better fix.
* fold-const.c (fold_range_test): Do not try to fold the range
         test if the rhs or lhs has side effects.

From-SVN: r29526
1999-09-20 11:12:03 -06:00
Andreas Schwab 7161fcc7c5 Makefile.in (parse.o): Depend on $(JAVA_TREE_H).
1999-09-15  Andreas Schwab  <schwab@suse.de>

	* Makefile.in (parse.o): Depend on $(JAVA_TREE_H).

From-SVN: r29525
1999-09-20 16:27:29 +00:00
Nathan Sidwell ebaacb57d2 * parse.y (primary): Use build_functional_cast for CV_QUALIFIER.
From-SVN: r29524
1999-09-20 16:19:26 +00:00
Jeffrey A Law bb457bd901 basic-block.h (compute_flow_dominators): Declare.
* basic-block.h (compute_flow_dominators): Declare.

        * gcse.c (alloc_code_hoist_mem): New function.
        (free_code_hoist_mem, compute_code_hoist_vbeinout): Likewise.
        (compute_code_hoist_data, hoist_expr_reaches_here_p): Likewise.
        (hoist_code, one_code_hoisting_pass): Likewise.
        (gcse_main): If optimizing for size, then hoist expressions
        computed in multiple dominated basic blocks.

From-SVN: r29523
1999-09-20 08:53:51 -06:00
Nick Clifton 03d32d1a08 Add comment saying that lang_decode_options should not complain about
unrecognised options.

From-SVN: r29522
1999-09-20 14:26:59 +00:00
Jeffrey A Law dfdb644f4f gcse.c (invalid_nonnull_info): New function.
* gcse.c (invalid_nonnull_info): New function.
        (delete_null_pointer_checks): Likewise.
        * rtl.h (delete_null_pointer_checks): Declare.
        * toplev.c (rest_of_compilation): Call delete_null_pointer_checks.

From-SVN: r29521
1999-09-20 07:58:33 -06:00
Nick Clifton 39dd8003d3 Pass all command line options to both language dependent and language independent
decoders.

From-SVN: r29520
1999-09-20 13:48:12 +00:00
Jeffrey A Law 558389e375 flow.c (merge_blocks_move_predecessor_nojumps): New function.
* flow.c (merge_blocks_move_predecessor_nojumps): New function.
        (merge-blocks_move_successor_nojumps): Likewise.
        (merge_blocks): Allow merging of some blocks, even if it requires
        physical movement of the blocks, but not if it requires new jumps.

From-SVN: r29519
1999-09-20 06:34:26 -06:00
Jeffrey A Law bfd384967d bitmap.c (debug_bitmap_file): Renmaed from bitmap_debug_file.
* bitmap.c (debug_bitmap_file): Renmaed from bitmap_debug_file.
        Callers and prototype changed.
        * bitmap.h: Fix debug_bitmap and debug_bitmap_file prototypes.

From-SVN: r29518
1999-09-20 05:52:22 -06:00
Alexandre Oliva c97c62ef68 sol2.h (LINK_SPEC): Avoid the duplication of -YP when both -p and -pg are present.
* config/sparc/sol2.h (LINK_SPEC): Avoid the duplication of
-YP when both -p and -pg are present.  From i386/sol2.h.

From-SVN: r29516
1999-09-20 10:08:10 +00:00
Bernd Schmidt a091679a29 Make it possible to prototype port-specific functions (and convert i386 to use this)
From-SVN: r29515
1999-09-20 10:05:28 +00:00
Bernd Schmidt 6baf1cc8f8 Make it possible to prototype port-specific functions (and convert i386 to use this)
From-SVN: r29514
1999-09-20 10:00:03 +00:00
Jeff Law 34a24f1806 Daily bump.
From-SVN: r29513
1999-09-20 01:45:08 -06:00
Richard Henderson 2cccc34002 * c-pragma.c (mark_align_stack): Dereference the void* properly.
From-SVN: r29512
1999-09-19 14:19:38 -07:00
Richard Henderson c911d5ebf6 Forgot to commit last time.
From-SVN: r29511
1999-09-19 14:10:58 -07:00
Mark Mitchell 7015a8146a Fix typo in last change
From-SVN: r29510
1999-09-19 17:00:01 +00:00
Mark Mitchell 3b10cf4be7 rtl.h (insns_safe_to_move_p): New function.
* rtl.h (insns_safe_to_move_p): New function.
	* loop.c (find_and_verify_loops): Use it.
	* rtlanal.c (insns_safe_to_move_p): Define it.

From-SVN: r29509
1999-09-19 16:04:01 +00:00
Mark Mitchell 47d7090eeb * ir.texi: New file.
From-SVN: r29508
1999-09-19 15:50:40 +00:00
Richard Henderson da9da1341c c-pragma.c: Include ggc.h.
* c-pragma.c: Include ggc.h.
        * Makefile.in (c-pragma.o): Update.

From-SVN: r29507
1999-09-19 02:56:11 -07:00
Jeff Law aadf648665 Daily bump.
From-SVN: r29506
1999-09-19 01:45:10 -06:00
Mark Mitchell 88848bdeab gxxint.texi: G++ now implements namespaces.
* gxxint.texi: G++ now implements namespaces.

	* decl.c (pop_label): Don't warn about unused labels more than
	once.
	* semantics.c (finish_goto_stmt): Always marked used labels as
	used.

From-SVN: r29505
1999-09-19 00:33:09 +00:00
Mark Mitchell 57b524174e decl.c (layout_var_decl): Change prototype.
* decl.c (layout_var_decl): Change prototype.  Call layout_decl
	even when the declaration is external.
	(cp_finish_decl): Adjust call to layout_var_decl.
	* pt.c (tsubst_expr): Make sure to initialize stmt before using it.

From-SVN: r29504
1999-09-18 23:56:18 +00:00
Alexandre Oliva b534921ac0 sol2.h (CPP_SPEC): Support -[p]threads
* config/i386/sol2.h (CPP_SPEC): Support -[p]threads
(LIB_SPEC): Likewise.
(LINK_SPEC): Do not assert -z text with -shared -mimpure-text.
Reindent -YP/-p/-pg.
Copied from config/sparc/sol2.h.

From-SVN: r29503
1999-09-18 19:09:32 +00:00
Richard Henderson 568767a62c c-pragma.c (mark_align_stack): New.
* c-pragma.c (mark_align_stack): New.
        (init_pragma): New.
        * c-pragma.h (init_pragma): Declare it.
        * c-lex.c (init_parse): Call it.

From-SVN: r29502
1999-09-18 11:54:36 -07:00
Alexandre Oliva 4a8021dcbd configure.in: Pick up thread library on Solaris/x86 just like on Solaris/sparc.
* configure.in: Pick up thread library on Solaris/x86 just
like on Solaris/sparc.
* configure: Rebuilt.

From-SVN: r29501
1999-09-18 18:25:50 +00:00
Alex Samuel 5da077de9b rtl.h (global_rtx_index): New enum.
* rtl.h (global_rtx_index): New enum.
        (global_rtl): Change to array of rtx.
        (pc_rtx, cc0_rtx): Redefine accordingly.
        (cc0_rtx, stack_pointer_rtx, frame_pointer_rtx): Likewise.
        (hard_frame_pointer_rtx, arg_pointer_rtx): Likewise.
        (virtual_incoming_args_rtx, virtual_stack_vars_rtx): Likewise.
        (virtual_outgoing_args_rtx, virtual_cfa): Likewise.
        (const_int_rtx): Change to array of rtx.
        (const0_rtx, const1_rtx, const2_rtx, constm1_rtx): Redefine
        accordingly.
        * emit-rtl.c (global_rtl): Change to array of rtx.
        (const_int_rtx): Change to aray of rtx.
        (gen_rtx_CONST_INT): Redefine accordingly.
        (init_emit_once): Allocate and initialize global_rtl.  Likewise
        for const_int_rtx.  Add both as GC roots.
        * genattrtab.c (global_rtl): Update declaration.

From-SVN: r29500
1999-09-18 11:16:44 -07:00
Alexandre Oliva 711b552c22 * overload1.C: New test.
From-SVN: r29499
1999-09-18 18:06:20 +00:00
Ulrich Drepper 7cd33af0c5 Update.
From-SVN: r29498
1999-09-18 18:06:11 +00:00
Ulrich Drepper 4c457b6be7 (USER_H): Add iso646.h back.
From-SVN: r29497
1999-09-18 18:05:59 +00:00
Jeffrey A Law 2a780534dd haifa-sched.c (sched_analyze): Use free_INSN_LIST_list instead of zapping the LOG_LINKS of sched_before_next_call.
* haifa-sched.c (sched_analyze): Use free_INSN_LIST_list instead of
        zapping the LOG_LINKS of sched_before_next_call.

From-SVN: r29496
1999-09-18 06:06:24 -06:00
Alexandre Oliva 7b318668a3 * inline1.C: New test.
From-SVN: r29495
1999-09-18 11:23:55 +00:00
Martin v. Löwis 03b256e4c6 typeck.c (get_member_function_from_ptrfunc): Always consider virtuality inside member pointer.
* typeck.c (get_member_function_from_ptrfunc): Always consider
	virtuality inside member pointer.

From-SVN: r29494
1999-09-18 10:46:07 +00:00