summaryrefslogtreecommitdiff
path: root/gcc/cp
Commit message (Collapse)AuthorAgeFilesLines
* decl.c (start_function): Don't call temporary_allocation for a nested function.Jim Wilson1998-03-022-2/+10
| | | | | | | * decl.c (start_function): Don't call temporary_allocation for a nested function. From-SVN: r18374
* typeck.c (mark_addressable): Don't assume a FUNCTION_DECL has ↵Jason Merrill1998-02-122-6/+14
| | | | | | | | | DECL_LANG_SPECIFIC. * typeck.c (mark_addressable): Don't assume a FUNCTION_DECL has DECL_LANG_SPECIFIC. From-SVN: r17896
* decl2.c (comdat_linkage): Also set DECL_COMDAT.Jason Merrill1998-02-123-25/+39
| | | | | | | | | | | | | | | | | * decl2.c (comdat_linkage): Also set DECL_COMDAT. (finish_file): Check DECL_COMDAT instead of weak|one_only. (import_export_vtable): Use make_decl_one_only instead of comdat_linkage for win32 tweak. (import_export_decl): Likewise. * pt.c (mark_decl_instantiated): Likewise. * decl2.c (import_export_vtable): If we support one_only but not weak symbols, mark instantiated template vtables one_only. (import_export_decl): Likewise for tinfo functions. (finish_vtable_vardecl): Also write out vtables from explicitly instantiated template classes. * pt.c (mark_class_instantiated): Revert last change. From-SVN: r17883
* Some patches for 1.0.2:Jason Merrill1998-02-1111-3428/+3543
| | | | | | | | | | | | | | | | | | | | | | | | | | | * decl.c (grokdeclarator): Use DECL_USE_TEMPLATE instead when deciding to override DECL_ASSEMBLER_NAME. * pt.c (instantiate_decl): Call cp_finish_decl for vars even if we don't define them yet. * parse.y (nomods_initdcl0): Add constructor_declarator case. * tinfo2.cc: Add tinfo for signed char. * search.c (compute_access): Handle protected constructors in derived classes as accessible. * lex.c (file_name_nondirectory): Also check for '/'. * pt.c (type_unification_real): Just accept function parms that don't use any template parms. * parse.y (typename_sub*): Fix std::. * lex.c (DIR_SEPARATOR): Define to be '/' if not already defined. (file_name_nondirectory): Use. * call.c (build_user_type_conversion_1): Handle user-defined template conversion operators correctly. * cvt.c (build_up_reference): A TARGET_EXPR has side effects. * pt.c (instantiate_class_template): Don't do injection when processing_template_decl is true, as pollutes current_binding_level for base classes. * typeck.c (build_const_cast): Handle references here instead of handing off to convert_to_reference. From-SVN: r17861
* flow.c (find_basic_blocks): Don't create a new basic block for calls in a ↵Jason Merrill1998-02-115-22/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | LIBCALL block. * flow.c (find_basic_blocks): Don't create a new basic block for calls in a LIBCALL block. * flow.c (flow_analysis): Be consistent with find_basic_blocks in determining when a new basic block starts. * flow.c (find_basic_blocks): A CALL_INSN that can throw starts a new basic block. (find_basic_blocks_1): Likewise. * except.c (get_dynamic_handler_chain): Only make the call once per function. * except.c (expand_fixup_region_end): New fn. (expand_fixup_region_start): Likewise. (expand_eh_region_start_tree): Store cleanup into finalization here. * stmt.c (expand_cleanups): Use them to protect fixups. * except.c (get_dynamic_handler_chain): Build up a FUNCTION_DECL. * optabs.c (init_optabs): Lose get_dynamic_handler_chain_libfunc. * expr.h: Likewise. cp/: * decl.c (copy_args_p): Handle copy elision for types with virtual bases. * call.c (build_over_call): Likewise. * exception.cc (__cp_pop_exception): Lose handler arg. * except.c (do_pop_exception): Likewise. (push_eh_cleanup): Let the cleanup mechanism supply the handler. (expand_end_catch_block): Likewise. From-SVN: r17856
* * method.c (make_thunk): Avoid name buffer overflow.Scott Snyder1998-02-082-1/+6
| | | | From-SVN: r17785
* decl.c (cp_finish_decl): When bailing on a comdat variable, also unset ↵Jason Merrill1998-01-252-3/+11
| | | | | | | | | DECL_NOT_REALLY_EXTERN. * decl.c (cp_finish_decl): When bailing on a comdat variable, also unset DECL_NOT_REALLY_EXTERN. From-SVN: r17480
* * pt.c (instantiate_decl): Defer all templates but inline functions.Jason Merrill1997-12-202-8/+13
| | | | From-SVN: r17159
* cp-tree.h (struct lang_decl_flags): Add comdat.Jason Merrill1997-12-194-20/+40
| | | | | | | | | | * cp-tree.h (struct lang_decl_flags): Add comdat. (DECL_COMDAT): New macro. * decl.c (duplicate_decls): Propagate it. (cp_finish_decl): Handle it. * decl2.c (import_export_decl): Just set DECL_COMDAT on VAR_DECLs. From-SVN: r17149
* except.c (expand_start_catch_block): suspend_momentary for the terminate ↵Jason Merrill1997-12-192-2/+10
| | | | | | | | | | handler. * except.c (expand_start_catch_block): suspend_momentary for the terminate handler. Critical EH bugfix for egcs-1.0.1. From-SVN: r17147
* Update from Jason.Jeff Law1997-12-021-8/+17
| | | | From-SVN: r16900
* Remove last delta.Jeff Law1997-12-021-1/+0
| | | | From-SVN: r16899
* Minor addition to template stuff that isn't supported.Jeff Law1997-12-021-0/+1
| | | | From-SVN: r16898
* Various doc updates.Jeff Law1997-12-011-268/+265
| | | | From-SVN: r16874
* * except.c: Call terminate without caching so many bits.Jason Merrill1997-11-272-13/+5
| | | | From-SVN: r16813
* class.c: Remove static pending_hard_virtuals.Jason Merrill1997-11-272-14/+21
| | | | | | | | | * class.c: Remove static pending_hard_virtuals. (add_virtual_function): Take pointers to pending_virtuals and pending_hard_virtuals. (finish_struct_1): Pass them. Declare pending_hard_virtuals. From-SVN: r16800
* rtti.c (build_dynamic_cast): Handle template case here.Jason Merrill1997-11-265-10/+30
| | | | | | | | | | | | | * rtti.c (build_dynamic_cast): Handle template case here. (build_dynamic_cast_1): Not here. * typeck2.c (digest_init): Make copies where appropriate. * decl2.c (delete_sanity): resolve_offset_ref. * except.c (expand_throw): Call mark_used on the destructor. From-SVN: r16777
* pt.c (unify): Handle `void' template parameters in specializations.Mark Mitchell1997-11-262-0/+6
| | | | | | | * pt.c (unify): Handle `void' template parameters in specializations. From-SVN: r16775
* * except.c (expand_throw): Call mark_used on the destructor.Jason Merrill1997-11-262-0/+5
| | | | From-SVN: r16774
* * init.c (build_new): Copy size to the saveable obstack.Jason Merrill1997-11-252-0/+7
| | | | From-SVN: r16721
* init.c (build_new): Stick a CLEANUP_POINT_EXPR inside the TRY_CATCH_EXPR for ↵Jason Merrill1997-11-252-0/+7
| | | | | | | | | now. * init.c (build_new): Stick a CLEANUP_POINT_EXPR inside the TRY_CATCH_EXPR for now. From-SVN: r16708
* exception.cc (struct cp_eh_info): Add handlers field.Jason Merrill1997-11-253-10/+37
| | | | | | | | | | | | * exception.cc (struct cp_eh_info): Add handlers field. (__cp_push_exception): Initialize it. (__cp_pop_exception): Decrement it. Don't pop unless it's 0. (__throw_bad_exception): Remove. * except.c (call_eh_info): Add handlers field. (get_eh_handlers): New fn. (push_eh_cleanup): Increment handlers. From-SVN: r16699
* revert large changesJason Merrill1997-11-212-9/+11
| | | | From-SVN: r16656
* revert large changesJason Merrill1997-11-219-272/+105
| | | | From-SVN: r16655
* except.c (expand_start_eh_spec): Use the try/catch code.Jason Merrill1997-11-216-84/+128
| | | | | | | | | | | | | | * except.c (expand_start_eh_spec): Use the try/catch code. (expand_end_eh_spec): Likewise. Call __check_eh_spec instead of doing everything inline. (init_exception_processing): throw_type_match now takes const void pointers. * exception.cc (__check_eh_spec): New fn. * inc/exception: Neither terminate nor unexpected return. * decl.c: Make const_ptr_type_node public. * tinfo2.cc (__throw_type_match_rtti): Take the typeinfos constly. From-SVN: r16652
* except.c (expand_start_catch_block): We only need the rethrow region for ↵Jason Merrill1997-11-212-19/+22
| | | | | | | | | | non-sjlj exceptions. * except.c (expand_start_catch_block): We only need the rethrow region for non-sjlj exceptions. (expand_end_catch_block): Likewise. Use outer_context_label_stack. From-SVN: r16647
* Makefile.in (LIB2FUNCS): Remove C++ memory management support.Jason Merrill1997-11-207-32/+153
| | | | | | | | | | | | | | | | | | | | | | ./: * Makefile.in (LIB2FUNCS): Remove C++ memory management support. * libgcc2.c: Remove __builtin_new, __builtin_vec_new, set_new_handler, __builtin_delete, and __builtin_vec_delete. * except.c (output_exception_table): Don't bother with __EXCEPTION_END__. cp/: * Make-lang.in (CXX_LIB2FUNCS): Add new op new and op delete objs. (various.o): Likewise. * inc/new: Add placement deletes. Add throw specs for default new. * new.cc (set_new_handler): Move here from libgcc2. * new1.cc (new (nothrow)): Catch a bad_alloc thrown from the handler. (new): Move from libgcc2. Throw bad_alloc. * new2.cc: Move the rest of the op news and op deletes from libgcc2. * decl.c (init_decl_processing): Update exception specs on new and delete. From-SVN: r16619
* method.c (build_decl_overload_real): Don't mess with global placement delete.Jason Merrill1997-11-206-22/+51
| | | | | | | | | | | | | | | | | * method.c (build_decl_overload_real): Don't mess with global placement delete. * init.c (build_new): Check for null throw spec, not nothrow_t. * decl.c (duplicate_decls): Don't complain about different exceptions from an internal declaration. * call.c (build_op_delete_call): Fix check for member fns again. * decl2.c (import_export_decl): Interface hackery affects virtual synthesized methods. From-SVN: r16611
* decl.c (start_decl): Don't just complain about a mismatched scope, fix it.Jason Merrill1997-11-192-1/+9
| | | | | | | * decl.c (start_decl): Don't just complain about a mismatched scope, fix it. From-SVN: r16590
* decl.c (make_implicit_typename): Handle case where t is not actually from ↵Jason Merrill1997-11-195-13/+19
| | | | | | | | | | | | | context. * decl.c (make_implicit_typename): Handle case where t is not actually from context. * tree.c (get_type_decl): Lose identifier case. * spew.c (yylex): Lose useless call to identifer_typedecl_value. * parse.y (nonnested_type): Just use lookup_name. (complex_type_name): Just use IDENTIFIER_GLOBAL_VALUE. From-SVN: r16588
* decl.c (make_implicit_typename): New fn.Jason Merrill1997-11-192-5/+41
| | | | | | | * decl.c (make_implicit_typename): New fn. (lookup_name_real): Use it. Use current_class_type as the context. From-SVN: r16580
* pt.c (do_poplevel): Don't prohibit jumps into this contour.Bruno Haible1997-11-182-1/+5
| | | | | | | | Mon Nov 17 23:42:03 1997 Bruno Haible <haible@ilog.fr> * pt.c (do_poplevel): Don't prohibit jumps into this contour. From-SVN: r16559
* call.c (build_new_method_call): Handle getting a TEMPLATE_ID_EXPR around a ↵Jason Merrill1997-11-186-45/+122
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TEMPLATE_DECL. * call.c (build_new_method_call): Handle getting a TEMPLATE_ID_EXPR around a TEMPLATE_DECL. Don't look for a field if we got template parms. * typeck.c (build_x_function_call): Remember the TEMPLATE_ID_EXPR, not just the args. * decl2.c (build_expr_from_tree): Tweak last change. * pt.c (tsubst_copy): Use get_first_fn instead of TREE_VALUE. (maybe_fold_nontype_arg): Split out from tsubst_copy. * tree.c (get_first_fn): Just return a TEMPLATE_ID_EXPR. Mon Nov 10 20:08:38 1997 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu> * pt.c (tsubst_copy): Handle explicit template arguments in function calls. * typeck.c (build_x_function_call): Likewise. * decl2.c (build_expr_from_tree): Lookup function name if it hasn't been done. * pt.c (tsubst): Instantiate template functions properly when template parameter does not appear in function arguments and return type. (comp_template_args): Handle member templates required by tsubst. Mon Nov 10 20:08:29 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de> * pt.c (coerce_template_parms): Tweak error message. From-SVN: r16556
* search.c (dfs_record_inheritance): Ignore template type parms.Jason Merrill1997-11-174-10/+40
| | | | | | | | | | | | * search.c (dfs_record_inheritance): Ignore template type parms. Fixes 13688. * friend.c (do_friend): Warn about non-template friends in templates. * call.c (build_op_delete_call): Fix handling of inherited delete. From-SVN: r16552
* call.c (build_new_op): Fix copy error.Jason Merrill1997-11-155-55/+187
| | | | | | | | | | | | | | | | * call.c (build_new_op): Fix copy error. (build_op_new_call): New fn. (build_op_delete_call): New fn. * cp-tree.h: Declare them. * init.c (build_new): Use them. Support placement delete. (build_x_delete): Use build_op_delete_call. (build_delete): Likewise. * decl2.c (delete_sanity): Likewise. (coerce_delete_type): Don't complain about placement delete. Support placement delete. From-SVN: r16500
* removed unused parm to build_new_function_callJason Merrill1997-11-134-7/+10
| | | | From-SVN: r16465
* init.c (build_new): Make the cleanup last longer.Jason Merrill1997-11-132-1/+22
| | | | | | | * init.c (build_new): Make the cleanup last longer. (expand_vec_init): Call do_pending_stack_adjust. From-SVN: r16450
* thinkoJason Merrill1997-11-122-8/+2
| | | | From-SVN: r16447
* pt.c (do_type_instantiation): Fix typo.Jason Merrill1997-11-124-7/+38
| | | | | | | | | | | | | | | * pt.c (do_type_instantiation): Fix typo. (mark_class_instantiated): If we support one_only but not weak symbols, don't mark this as known. * init.c (build_new): Handle cookies in EH cleanup. Wed Nov 12 08:11:55 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com> * call.c (build_method_call): Call complete_type before checking for destructor. From-SVN: r16445
* init.c (build_new): Handle freeing allocated memory when the constructor throws.Jason Merrill1997-11-125-8/+47
| | | | | | | | | | | | | | | | * init.c (build_new): Handle freeing allocated memory when the constructor throws. * call.c (build_new_method_call): Fix flags arg. * pt.c (do_type_instantiation): Don't try to instantiate member templates. (mark_decl_instantiated): If we support one_only but not weak symbols, mark this one_only. * decl2.c (import_export_vtable): Don't defer handling of vtables if MULTIPLE_SYMBOL_SPACES. From-SVN: r16437
* except.c (expand_end_catch_block): Lose call to __sjpopnthrow.Jason Merrill1997-11-112-11/+5
| | | | | | | | * except.c (expand_end_catch_block): Lose call to __sjpopnthrow. Fixes sjlj failures. From-SVN: r16434
* except.c (do_pop_exception): Return a value.Jason Merrill1997-11-112-0/+5
| | | | | | | | * except.c (do_pop_exception): Return a value. Oops. From-SVN: r16430
* [multiple changes]Jason Merrill1997-11-102-0/+7
| | | | | | | | | | | | | | | Sun Oct 19 09:07:38 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> * stmt.c (using_eh_for_cleanups_p): New variable. (using_eh_for_cleanups): New function. (expand_decl_cleanup): Don't call expand_eh_region_start_tree unless using EH for cleanups. Sun Oct 26 01:28:29 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> * decl.c (init_decl_processing): Call using_eh_for_cleanups. From-SVN: r16424
* stmt.c (expand_decl_cleanup_no_eh): New fn.Jason Merrill1997-11-106-54/+148
| | | | | | | | | | | | | | | | | | | | | | | | | | | * stmt.c (expand_decl_cleanup_no_eh): New fn. * except.c (expand_leftover_cleanups): do_pending_stack_adjust. Complete nested exception support. * except.c (do_pop_exception): Split out... (push_eh_cleanup): From here. Handle the EH region by hand. (expand_start_catch_block): Add a new level for the catch parm. Move the rethrow region outside the two cleanup regions. Protect the initializer for the catch parm with terminate. (expand_end_catch_block): Likewise. End the region for the eh_cleanup. * exception.cc (__cp_pop_exception): Now takes two parms. Handle popping off the middle of the stack. * tree.c (lvalue_p, real_lvalue_p): Handle TRY_CATCH_EXPR, WITH_CLEANUP_EXPR, and UNSAVE_EXPR. (build_cplus_new): Only wrap CALL_EXPRs. * init.c (expand_default_init): Handle a TRY_CATCH_EXPR around the constructor call. Sun Nov 9 18:00:26 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> * Make-lang.in (c++.distdir): Make inc subdirectory. From-SVN: r16420
* decl.c (add_block_current_level): Delete.Jim Wilson1997-11-093-12/+6
| | | | | | | | * decl.c (add_block_current_level): Delete. * init.c (build_vec_delete_1): Delete build_block and add_block_current_level calls. From-SVN: r16387
* * method.c (emit_thunk): Don't let the backend defer generic thunks.Jason Merrill1997-11-072-0/+11
| | | | From-SVN: r16360
* except.c (call_eh_info): Split out...Jason Merrill1997-11-063-24/+57
| | | | | | | | | | | * except.c (call_eh_info): Split out... (push_eh_info): From here. (expand_builtin_throw): Use it. (expand_start_catch_block): Move region start back. * class.c (build_vbase_path): Propagate the result type properly. From-SVN: r16348
* This commit was manufactured by cvs2svn to create branchNo Author1997-11-031-9451/+0
| | | | | | 'egcs_1_00_branch'. From-SVN: r16282
* lex.c (FILE_NAME_NONDIRECTORY): Delete macro.Brendan Kehoe1997-11-015-19/+34
| | | | | | | | | | | | | | | | | | * lex.c (FILE_NAME_NONDIRECTORY): Delete macro. (file_name_nondirectory): New function, doing the same as the macro. (set_typedecl_interface_info): Use it instead of the macro. (check_newline): Likewise. (handle_cp_pragma): Likewise. * repo.c (get_base_filename): Cast result of rindex to char*. (open_repo_file): Likewise. * xref.c (open_xref_file): Likewise. * error.c (dump_char): Make its arg int, not char. bring over the changes that went in yesterday to fix irix6 native cc build problems From-SVN: r16261
* except.c (expand_builtin_throw): Replace remaining use of saved_throw_type ↵Brendan Kehoe1997-11-012-2/+8
| | | | | | | | | with a call to get_eh_type. * except.c (expand_builtin_throw) [!DWARF2_UNWIND_INFO]: Replace remaining use of saved_throw_type with a call to get_eh_type. From-SVN: r16260