aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
AgeCommit message (Collapse)AuthorFilesLines
2001-09-06Remove OP_IDENTIFIER.Ira Ruben1-1/+0
2001-09-06 Ira Ruben <ira@apple.com> Remove OP_IDENTIFIER. * tree.def (OP_IDENTIFIER): Remove. * tree.c (tree_node_kind enum): Remove op_id_kind. (tree_node_kind_names): Remove "op_identifiers". (make_node): Remove OP_IDENTIFIER test. (build_op_identifier): Removed because it isn't being used. * print-tree.c (print_node): Remove OP_IDENTIFIER case. * cp/pt.c (tsubst): Remove OP_IDENTIFIER case. From-SVN: r45457
2001-09-06oops, missed a bit in previous commitNathan Sidwell1-1/+1
From-SVN: r45436
2001-09-06re PR c++/3986 (ICE in build_rtti_vtbl_entries)Nathan Sidwell2-11/+35
cp: PR c++/3986 * class.c (force_canonical_binfo_r): Check & move an indirect primary base first. (force_canonical_binfo): Check that it's not already canonical. (mark_primary_virtual_base): Remove BINFO parameter. (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here. testsuite: PR c++/3986 * g++.dg/abi/vbase1.C: New test. From-SVN: r45435
2001-09-06Remove TYPE_NONCOPIED_PARTS.Nathan Sidwell3-7/+15
* tree.h (TYPE_NONCOPIED_PARTS): Remove. (struct tree_type): Remove noncopied_parts. * c-tree.h (TYPE_ACTUAL_ARG_TYPES): Map onto TYPE_BINFO. * expr.c (save_noncopied_parts, init_noncopied_parts): Remove. (fixed_type_p): Remove. (expand_expr, INIT_EXPR): Don't deal with noncopied parts. (expand_expr, MODIFY_EXPR): Likewise. * ggc-common.c (ggc_mark_trees): Remove TYPE_NONCOPIED_PARTS. * doc/c-tree.texi: Remove TYPE_NONCOPIED_PARTS FIXME. cp: Remove TYPE_NONCOPIED_PARTS. * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto CLASSTYPE_PURE_VIRTUALS. (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO. * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS. (layout_class_type): Don't call fixup_inlin_methods here ... (finish_struct_1): ... call it here. From-SVN: r45434
2001-09-04decl.c (duplicate_decls): Remove code deadling with DECL_SAVED_INSNS.Mark Mitchell5-46/+47
* decl.c (duplicate_decls): Remove code deadling with DECL_SAVED_INSNS. * decl2.c (finish_file): Likewise. * pt.c (instantiate_decl): Likewise. * semantics.c (expand_body): Don't defer local functions if they wouldn't be deferred for some other reason. Don't generate RTL for functions that will not be emitted. (genrtl_start_function): Remove code deadling with DECL_SAVED_INSNS. (genrtl_finish_function): Likewise. From-SVN: r45386
2001-09-04re PR c++/4203 (empty base class optimization zeroes first byte of other ↵Nathan Sidwell2-3/+9
base class when using multiple inheritance) cp: PR c++/4203 * call.c (build_over_call): Do not optimize any empty base construction. testsuite: PR c++/4203 * g++.old-deja/g++.other/empty1.C: XFAIL. See PR c++/4222 * g++.dg/init/empty1.C: New test. From-SVN: r45374
2001-08-31error.c (dump_template_decl): Output template parameters together with their ↵Kriang Lerdsuwanakij2-4/+18
specifiers. * error.c (dump_template_decl): Output template parameters together with their specifiers. Output `class' prefix for template template parameter. (dump_decl): Fix formatting. From-SVN: r45329
2001-08-30optimize.c (inlinable_function_p): Allow only smaller single functions.Kurt Garloff2-5/+12
* optimize.c (inlinable_function_p): Allow only smaller single functions. Halve inline limit after reaching recursive limit. From-SVN: r45286
2001-08-30class.c (build_vtable_entry_ref): Subtract in char*, not ptrdiff_t.Joern Rennecke2-2/+11
* class.c (build_vtable_entry_ref): Subtract in char*, not ptrdiff_t. Co-Authored-By: Jason Merrill <jason@redhat.com> From-SVN: r45284
2001-08-27emit-rtl.c: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout.Andreas Jaeger4-134/+42
* emit-rtl.c: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout. * errors.c: Likewise. * final.c: Likewise. * dwarf2asm.c: Likewise. * doprint.c (checkit): Likewise. * diagnostic.c: Likewise. * collect2.c: Likewise. * calls.c: Likewise. * c-semantics.c (build_stmt): Likewise. * c-format.c (status_warning): Likewise. * c-errors.c (pedwarn_c99): Likewise. * builtins.c (validate_arglist): Likewise. * config/pj/pj.c (pj_printf): Likewise. * fix-header.c: Likewise. * gcc.c: Likewise. * gcov.c (fnotice): Likewise. * gensupport.c (message_with_line): Likewise. * mips-tfile.c: Likewise. * protoize.c (notice): Likewise. * read-rtl.c (fatal_with_file_and_line): Likewise. * rtl-error.c: Likewise. * tradcpp.c: Likewise. * tree.c: Likewise. * cp/tree.c (build_min_nt): Likewise. (build_min): Likewise. * cp/lex.c: Likewise. * cp/errfn.c: Likewise. * cp/rtti.c (create_pseudo_type_info): Likewise. From-SVN: r45185
2001-08-24* cp/rtti.c (VPARAMS): Fix parameter.Andreas Jaeger1-1/+1
From-SVN: r45151
2001-08-24c-common.c (c_alignof, [...]): Move here...Jason Merrill7-83/+53
* c-common.c (c_alignof, c_alignof_expr): Move here... * c-typeck.c: ...from here. * c-tree.h, c-common.h: Adjust. * tree.c (cp_build_qualified_type_real): Use get_qualified_type. (build_cplus_array_type): Use cp_build_qualified_type, not TYPE_MAIN_VARIANT, to get an unqualified version. * decl2.c (grok_alignof): Lose. (build_expr_from_tree): Use expr_sizeof and c_alignof_expr. * typeck.c (c_alignof): Lose. * semantics.c (finish_sizeof, finish_alignof): New. * parse.y: Use them. * cp-tree.h: Declare them. From-SVN: r45145
2001-08-22pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.Jason Merrill3-30/+35
* pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement. Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK. * tree.c (cp_statement_code_p): A TAG_DEFN is a statement. From-SVN: r45106
2001-08-19typeck2.c (add_exception_specifier): Only require complete type if not in ↵Jakub Jelinek2-1/+8
processing template declaration. * typeck2.c (add_exception_specifier): Only require complete type if not in processing template declaration. * g++.dg/eh/template1.C: New test. From-SVN: r45032
2001-08-18except.c (TYPE_HASH): Delete.Kaveh R. Ghazi3-11/+14
* except.c (TYPE_HASH): Delete. * objc/objc-act.c (HASHFUNCTION): Cast to size_t, not HOST_WIDE_INT. * tree.c (TYPE_HASH): Delete. * tree.h (TYPE_HASH): Define. ch: * tree.c (TYPE_HASH): Moved to ../tree.h. cp: * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to GNU_xref_start_scope and GNU_xref_end_scope. * tree.c (TYPE_HASH): Moved to ../tree.h. From-SVN: r45004
2001-08-17cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS on COMPOUND_EXPRs.Mark Mitchell2-2/+12
* cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS on COMPOUND_EXPRs. From-SVN: r44956
2001-08-14class.c, cp-tree.h (build_vfn_ref): Remove.Richard Henderson5-16/+7
* class.c, cp-tree.h (build_vfn_ref): Remove. * call.c, rtti.c: Replace all refernces with build_vtbl_ref. From-SVN: r44913
2001-08-13call.c (build_over_call): Mark COMPOUND_EXPRs generated for empty class ↵Mark Mitchell2-0/+15
assignment as having side-effects... * call.c (build_over_call): Mark COMPOUND_EXPRs generated for empty class assignment as having side-effects to avoid spurious warnings. From-SVN: r44868
2001-08-13expr.h: Split out optab- and libfunc-related code to...Zack Weinberg3-1/+7
* expr.h: Split out optab- and libfunc-related code to... * optabs.h, libfuncs.h: ... these new headers. * Makefile.in (CONFIG_H, EXPR_H): Take out insn-codes.h. (OPTABS_H): New. (various .o rules): Add $(OPTABS_H) and/or libfuncs.h to dependencies. * mkconfig.sh: Don't include insn-codes.h from config.h. * reload.h: Use #ifdef GCC_INSN_CODES_H to decide whether enum insn_code is available. Move reload_in_optab and reload_out_optab array declarations to optabs.h. * regmove.c (gen_add3_insn): Move to optabs.c, export from there, prototype in expr.h. * gencodes.c: Cleanup: zap global variables, don't use printf where puts will do, don't bother defining MAX_INSN_CODE which nothing uses, let CODE_FOR_nothing get its value implicitly. * genemit.c, genopinit.c: Include optabs.h in generated file. * genoutput.c: Include insn-codes.h in generated file. * builtins.c, caller-save.c, combine.c, doloop.c, explow.c, expmed.c, expr.c, function.c, ifcvt.c, loop.c, optabs.c, profile.c, reload1.c, simplify-rtx.c, stmt.c, unroll.c, config/alpha/alpha.c, config/arm/arm.c, config/c4x/c4x.c, config/clipper/clipper.c, config/i386/i386.c, config/ia64/ia64.c, config/mn10300/mn10300.c, config/pj/pj.c, config/sh/sh.c, config/sparc/sparc.c: Include optabs.h. * builtins.c, calls.c, dwarf2out.c, except.c, expr.c, function.c, optabs.c, stmt.c, config/c4x/c4x.c, config/clipper/clipper.c, config/m88k/m88k.c, config/sparc/sparc.c: Include libfuncs.h. * reload.c: Include expr.h and optabs.h before reload.h. * config/alpha/alpha.c: Include tree.h before reload.h. * config/pa/pa.c: Include expr.h, optabs.h, libfuncs.h, and reload.h in that order. * config/sparc/sparc.c: Include debug.h. * recog.c: Include insn-codes.h. cp: * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies. * except.c: Include libfuncs.h. java: * Make-lang.in (java/decl.o): Update dependencies. * decl.c: Include libfuncs.h, don't include toplev.h. From-SVN: r44858
2001-08-13* decl.c (grokdeclarator): Clarify diagnostic message.Gabriel Dos Reis2-1/+5
From-SVN: r44852
2001-08-13decl2.c (do_nonmember_using_decl): Replace using directive with using ↵Kriang Lerdsuwanakij2-1/+6
declaration in the error message. * decl2.c (do_nonmember_using_decl): Replace using directive with using declaration in the error message. From-SVN: r44847
2001-08-11pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the criterion to ↵Kriang Lerdsuwanakij2-10/+19
avoid rebuilding expression tree... * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the criterion to avoid rebuilding expression tree instead of processing_template_decl. * g++.dg/template/unify1.C: New test. From-SVN: r44793
2001-08-10c-common.h (RETURN_NULLIFIED_P): Lose.Jason Merrill6-34/+90
* c-common.h (RETURN_NULLIFIED_P): Lose. * c-semantics.c (genrtl_return_stmt): Don't check it. Support named return value optimization for inlines, too. * decl.c (finish_function): Nullify returns here. * semantics.c (genrtl_start_function): Not here. (cp_expand_stmt): Don't mess with CLEANUP_STMTs. (nullify_returns_r): No longer static. Just clear RETURN_EXPR. Also nullify the CLEANUP_STMT for the nrv. * cp-tree.h: Declare it. * optimize.c (declare_return_variable): Replace the nrv with the return variable. * typeck.c (check_return_expr): Be more flexible on alignment check. Ignore cv-quals when checking for a matching type. From-SVN: r44762
2001-08-09Move constructor/destructor handling into target hooks.Richard Henderson2-9/+14
From-SVN: r44747
2001-08-09tweak commentJason Merrill1-1/+4
From-SVN: r44744
2001-08-08* g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.John David Anglin2-0/+5
From-SVN: r44725
2001-08-07re PR c++/3820 (GCC 3.0 crashes with empty base class)Nathan Sidwell4-41/+35
cp: PR c++/3820 Stop using TYPE_NONCOPIED_PARTS. * call.c (build_over_call): Be careful when copy constructing or assigning to an empty class. * class.c (check_bases_and_members): It has a COMPLEX_ASSIGN_REF if it has a vptr. (layout_class_type): Don't add empty class padding to TYPE_NONCOPIED_PARTS. (finish_struct_1): Don't add the VFIELD either. * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_ initialization. testsuite: * g++.dg/abi/empty4.C: New test. From-SVN: r44691
2001-08-07* tree.c (walk_tree): Walk siblings even if !walk_subtrees.Jason Merrill2-4/+14
From-SVN: r44686
2001-08-07improve commentJason Merrill1-1/+3
From-SVN: r44685
2001-08-06varasm.c (assemble_constructor): Take a symbol_ref and a priority instead of ↵Richard Henderson2-26/+11
a bare string. * varasm.c (assemble_constructor): Take a symbol_ref and a priority instead of a bare string. Move priority handling here from cp/decl2.c. * output.h: Update decls. * c-decl.c (c_expand_body): Update calls to assemble_constructor and assemble_destructor. * profile.c (output_func_start_profiler): Likewise. * objc/objc-act.c (finish_objc): Likewise. (build_module_descriptor): Return the symbol not the symbol name. * ch/grant.c (chill_finish_compile): Pass a symbol_ref and priority to assemble_constructor. * cp/decl2.c (finish_objects): Pass a symbol_ref and priority to assemble_{constructor,destructor}. Remove priority handling. * java/class.c (emit_register_classes): Pass a symbol_ref and priority to assemble_constructor. From-SVN: r44678
2001-08-06tweak commentJason Merrill1-1/+1
From-SVN: r44676
2001-08-06Don't allow template-id in using-declaration.Gabriel Dos Reis2-14/+36
cp/ Don't allow template-id in using-declaration. * decl2.c (validate_nonmember_using_decl): Handle template-ids. (do_class_using_decl): Likewise. testsuite/ * g++.dg/other/using-declaration.C: New test. From-SVN: r44663
2001-08-04Makefile.in (CPPLIB_H): New, so that dependencies on cpplib.h are also on ↵Neil Booth2-2/+4
line-map.h. * Makefile.in (CPPLIB_H): New, so that dependencies on cpplib.h are also on line-map.h. * cppfiles.c (stack_include_file): Update. * cpphash.h (struct cpp_buffer): New member return_at_eof. (_cpp_pop_buffer): New. * cppinit.c (cpp_destroy, cpp_finish): Update. (do_includes): Mark each buffer to return at EOF. * cpplex.c (_cpp_lex_token): Pop buffers at EOF. Continue or return as requested. * cpplib.c (run_directive, do_line, cpp_push_buffer): Update. (cpp_pop_buffer): Rename _cpp_pop_buffer. Stop skipping. * cpplib.h (cpp_pop_buffer): Remove. (cpp_scan_buffer_nooutput): Rename cpp_scan_nooutput. * cppmacro.c (cpp_scan_buffer_nooutput): Similarly. No need to pop buffers. * cppmain.c (scan_buffer): Rename scan_translation_unit. No need to pop buffers. (do_preprocessing): Update. * fix-header.c (read_scan_file): Update. No need to pop buffers. * c-parse.in (_yylex): Similarly. * scan-decls.c (scan_decls): Similarly. * line-map.h: Update comments. * cp/spew.c (read_token): No need to pop buffers. * objc/Make-lang.in (objc-act.o): Update dependencies. From-SVN: r44634
2001-08-03target.h (gcc_target): Add asm_out.named_section, section_type_flags, ↵Richard Henderson1-2/+2
have_named_sections. * target.h (gcc_target): Add asm_out.named_section, section_type_flags, have_named_sections. * target-def.h (TARGET_ASM_NAMED_SECTION): New. (TARGET_HAVE_NAMED_SECTIONS): New. (TARGET_SECTION_TYPE_FLAGS): New. * Makefile.in (toplev.o): Depend on TARGET_H. (varasm.o, dbxout.o): Likewise. * c-common.c (decl_attributes): Check targetm.have_named_sections instead of ifdef ASM_OUTPUT_SECTION_NAME. * dbxout.c (dbxout_function_decl): Likewise. (dbxout_function_end): Likewise. * toplev.c (compile_file): Likewise. * varasm.c (exception_section): Likewise. * cp/decl2.c (finish_objects): Likewise. * defaults.h (EH_FRAME_SECTION): Remove. (EH_FRAME_SECTION_ASM_OP): Remove. (EH_FRAME_SECTION_NAME): New. (UNIQUE_SECTION): Don't depend on ASM_OUTPUT_SECTION_NAME. (UNIQUE_SECTION_P): Remove. * dwarf2out.c (SECTION_FORMAT): Remove. (ASM_OUTPUT_SECTION): Remove. (output_call_frame_info): Use named_section_flags. (output_comp_unit, dwarf2out_start_source_file): Likewise. (dwarf2out_end_source_file, dwarf2out_define): Likewise. (dwarf2out_undef, dwarf2out_init, dwarf2out_finish): Likewise. * varasm.c (in_eh_frame, eh_frame_section): Remove. (named_section_flags): New. (named_section): Use it and targetm.section_type_flags. (resolve_unique_section): New. (assemble_start_function): Use it. (asm_emit_uninitialised, assemble_variable): Likewise. (default_section_type_flags): New. (default_no_named_section, default_elf_asm_named_section): New. (default_coff_asm_named_section, default_pe_asm_named_section): New. * output.h: Update varasm.c decls. (SECTION_*): New flags. * crtstuff.c: Check EH_FRAME_SECTION_NAME not EH_FRAME_SECTION_ASM_OP. (__EH_FRAME_BEGIN__, __FRAME_END__): Use attribute section. * config/elfos.h (UNIQUE_SECTION_P): Remove. * config/alpha/elf.h, config/arm/linux-elf.h: Likewise. * config/arm/pe.h, config/arm/unknown-elf.h: Likewise. * config/i386/cygwin.h, config/i386/djgpp.h: Likewise. * config/i386/i386-interix.h, config/i386/win32.h: Likewise. * config/ia64/sysv4.h, config/mcore/mcore-pe.h: Likewise. * config/mips/elf.h, config/mips/elf64.h: Likewise. * config/mips/iris6gld.h, config/mips/mips.h: Likewise. * config/pa/pa64-hpux.h, * config/elfos.h (ASM_OUTPUT_SECTION_NAME): Remove. (TARGET_ASM_NAMED_SECTION): New. * config/psos.h, config/a29k/a29k.h, config/alpha/elf.h: Likewise. * config/alpha/vms.h, config/arm/coff.h: Likewise. * config/arm/conix-elf.h, config/arm/elf.h: Likewise. * config/arm/linux-elf.h, config/arm/pe.h: Likewise. * config/arm/unknown-elf.h, config/avr/avr.h: Likewise. * config/c4x/c4x.h, config/h8300/h8300.h: Likewise. * config/i386/cygwin.h, config/i386/djgpp.h: Likewise. * config/i386/i386-interix.h, config/i386/i386elf.h : Likewise. * config/i386/sco5.h, config/i386/win32.h: Likewise. * config/m68k/coff.h, config/mcore/mcore-pe.h: Likewise. * config/mcore/mcore.h, config/mips/elf.h: Likewise. * config/mips/elf64.h, config/mips/iris6.h: Likewise. * config/mips/netbsd.h, config/mips/openbsd.h: Likewise. * config/pa/pa64-hpux.h, config/rs6000/sysv4.h: Likewise. * config/rs6000/xcoff.h, config/sh/sh.h: Likewise. * config/sparc/sysv4.h: Likewise. * config/nextstep.h: Error until named sections implemented. * config/a29k/a29k.c (a29k_asm_named_section): New. * config/alpha/alpha.c (SECTION_VMS_OVERLAY): New. (vms_section_type_flags, vms_asm_named_section): New. * config/arm/arm.c (arm_elf_asm_named_section): New. * config/avr/avr.c (asm_output_section_name): Remove. * config/avr/avr-protos.h: Update. * config/c4x/c4x.c (c4x_asm_named_section): New. * config/h8300/h8300.c (h8300_asm_named_section): New. * config/i386/i386.c (sco_asm_named_section): New. * config/i386/winnt.c (SECTION_PE_SHARED): New. (i386_pe_section_type_flags): New. (i386_pe_asm_named_section): New. * config/i386/i386-protos.h: Update. * config/m68k/m68k.c (m68k_coff_asm_named_section): New. * config/mcore/mcore.c (mcore_asm_named_section): New. * config/mips/mips.c (iris6_asm_named_section): New. * config/mips/mips.h (ENCODE_SECTION_INFO): Use DECL_ONE_ONLY instead of UNIQUE_SECTION_P. * config/rs6000/rs6000.c (rs6000_elf_section_type_flags): New. (xcoff_asm_named_section): New. * config/sh/sh.c (sh_asm_named_section): New. * config/sparc/sparc.c (sparc_elf_asm_named_section): New. * config/i386/djgpp.h (EH_FRAME_SECTION_ASM_OP): Remove. * config/i386/sco5.h (EH_FRAME_SECTION_ASM_OP*): Remove. (EH_FRAME_SECTION_NAME): New. (EXCEPTION_SECTION): New. * config/ia64/ia64.h (EH_FRAME_SECTION_ASM_OP): Remove. (DEBUG_*_SECTION): Remove. * config/m68k/rtemself.h (EH_FRAME_SECTION_ASM_OP): Remove. * config/mips/iris6.h (DEBUG_*_SECTION): Remove. (EH_FRAME_SECTION_ASM_OP): Remove. * doc/tm.texi (UNIQUE_SECTION_P): Remove. (ASM_OUTPUT_SECTION_NAME): Remove. (TARGET_ASM_NAMED_SECTION): New. (TARGET_HAVE_NAMED_SECTIONS): New. (TARGET_SECTION_TYPE_FLAGS): New. (EH_FRAME_SECTION_ASM_OP): Remove. (EH_FRAME_SECTION_NAME): New. From-SVN: r44623
2001-08-03combine.c, [...]: consistently use "VAX", "VAXen", and "MicroVAX" in ↵Lars Brinkhoff1-1/+1
comments and documentation. * combine.c, config.gcc, cse.c, defaults.h, real.c, reload.c, simplify-rtx.c, config/alpha/alpha.h, config/avr/avr.h, config/convex/convex.h, config/d30v/d30v.c, config/d30v/d30v.h, config/dsp16xx/dsp16xx.h, config/elxsi/elxsi.h, config/fr30/fr30.h, config/m88k/m88k.c, config/mips/mips.h, config/mn10200/mn10200.h, config/mn10300/mn10300.h, config/pdp11/pdp11.md, config/v850/v850.h, config/vax/openbsd.h, config/vax/openbsd1.h, config/vax/ultrix.h, config/vax/vax-protos.h, config/vax/vax.c, config/vax/vax.h, config/vax/vax.md, config/vax/vaxv.h, config/vax/xm-vms.h, cp/decl2.c, doc/contrib.texi, doc/cpp.texi, doc/gcc.texi, doc/install.texi, doc/invoke.texi, doc/md.texi, doc/rtl.texi, doc/tm.texi: consistently use "VAX", "VAXen", and "MicroVAX" in comments and documentation. From-SVN: r44589
2001-08-03cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.Stan Shebs3-11/+7
* cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used. (fnaddr_from_vtable_entry): Remove decl. * method.c (use_thunk): Update comment. From-SVN: r44587
2001-08-02repo.c (get_base_filename): Change return value to const char pointer.Andrew Cagney2-2/+7
* repo.c (get_base_filename): Change return value to const char pointer. From-SVN: r44581
2001-08-02Kill -fhonor-std.Nathan Sidwell10-100/+49
.: Kill -fhonor-std. * doc/c-tree.texi (Namespaces): Remove std & -fhonor-std interaction. * doc/invoke.texi (C++ Dialect Options): Remove -fno-honor-std. cp: Kill -fhonor-std. * NEWS: Document. * cp-tree.h (flag_honor_std): Remove. (CPTI_FAKE_STD): Remove. (std_node): Remove comment about it being NULL. (fake_std_node): Remove. * decl.c (in_fake_std): Remove. (walk_namespaces_r): Remove fake_std_node check. (push_namespace): Remove in_fake_std code. (pop_namespace): Likewise. (lookup_name_real): Remove fake_std_node check. (init_decl_processing): Always create std_node. Always add std:: things there. (builtin_function): Always put non '_' fns in std. * decl2.c (flag_honor_std): Remove. (lang_f_options): Remove honor-std. (unsupported_options): Add honor-std. (set_decl_namespace): Remove fake_std_node check. (validate_nonmember_using_decl): Likewise. (do_using_directive): Likewise. (handle_class_head): Likewise. * dump.c (cp_dump_tree): Likewise. * except.c (init_exception_processing): Adjust. * init.c (build_member_call): Remove fake_std_node check. (build_offset_ref): Likewise. * lang-options.h: Remove -fhonor-std, -fno-honor-std. * rtti.c (init_rtti_processing): Adjust. testsuite: Kill -fhonor-std. * g++.old-deja/g++.ns/ns14.C: Remove special options. * g++.old-deja/g++.other/std1.C: Likewise. * g++.old-deja/g++.robertl/eb133.C: Likewise. Add using directive. From-SVN: r44569
2001-07-31*** empty log message ***Alexandre Petit-Bianco2-1/+6
From-SVN: r44528
2001-07-31The 3.0 ABI no longer has vbase pointer fields.Nathan Sidwell6-78/+23
cp: The 3.0 ABI no longer has vbase pointer fields. * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P, FORMAT_VBASE_NAME): Remove. * method.c (do_build_copy_constructor): Adjust. (do_build_assign_ref): Adjust. * search.c (lookup_field_r): Adjust. * typeck.c (build_component_ref): Adjust. The 3.0 ABI always has a vtable pointer at the start of every polymorphic class. * rtti.c (build_headof_sub): Remove. (build_headof): Adjust. (get_tinfo_decl_dynamic): No need to check flag_rtti here. Adjust. (create_real_tinfo_var): Explain why we need a hidden name. From-SVN: r44515
2001-07-31re PR c++/3631 (another linking problem with virtual derivation)Nathan Sidwell2-4/+10
cp: PR c++/3631 * class.c (update_vtable_entry_for_fn): The fixed adjustment of a virtual thunk should be from declaring base. testsuite: * g++.dg/abi/vthunk1.C: New test. From-SVN: r44509
2001-07-31class.c (dfs_ctor_vtable_bases_queue_p): Always walk into the shared virtual ↵Nathan Sidwell2-11/+11
base, so preserving inheritance graph order. cp: * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into the shared virtual base, so preserving inheritance graph order. testsuite: * g++.dg/abi/vbase8-22.C: New test. From-SVN: r44506
2001-07-30jump.c: Add prototype for mark_modified_reg.Andreas Jaeger2-6/+6
* jump.c: Add prototype for mark_modified_reg. * cse.c (set_live_p): Add unused attribute. * gcov.c (calculate_branch_probs): Use gcov_type to avoid overflow. (scan_for_source_files): Use long for count to avoid overflow. (output_data): Likewise. (output_data): Don't use string concatatenation to silence gcc -traditional. * predict.c: Fix typos and grammar. * gcse.c (insert_insn_end_bb): Remove unused variables. For cp: * decl2.c: Remove unused var global_temp_name_counter. From-SVN: r44479
2001-07-28* method.c (pending_inlines): Remove.Richard Henderson2-4/+4
From-SVN: r44443
2001-07-27class.c (mark_primary_virtual_base): Don't adjust base offsets here.Nathan Sidwell2-11/+27
cp: * class.c (mark_primary_virtual_base): Don't adjust base offsets here. (dfs_unshared_virtual_bases): Adjust them here. (mark_primary_bases): Explain why we adjust at the end. testsuite: * g++.dg/abi/vbase8-21.C: New test. From-SVN: r44425
2001-07-27class.c (finish_struct_1): When copying the primary base's VFIELD, make sure ↵Nathan Sidwell2-10/+21
we find it is at offset zero. cp: * class.c (finish_struct_1): When copying the primary base's VFIELD, make sure we find it is at offset zero. testsuite: * g++.dg/abi/vbase8-10.C: New test. From-SVN: r44421
2001-07-26pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and tsubst_expr ↵Kriang Lerdsuwanakij2-2/+8
for default template arguments. 2001-07-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and tsubst_expr for default template arguments. 2001-07-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> * g++.old-deja/g++.pt/defarg14.C: New test. From-SVN: r44396
2001-07-26spew.c (yylex): Only copy the token's lineno, if it is non-zero.Nathan Sidwell2-2/+12
cp: * spew.c (yylex): Only copy the token's lineno, if it is non-zero. testsuite: * g++.old-deja/g++.other/lineno5.C: New test. From-SVN: r44391
2001-07-26re PR c++/3624 (Internal error: Segmentation fault)Nathan Sidwell2-15/+30
cp: PR c++/3624 * call.c (resolve_args): Simplify, call convert_from_reference. (build_new_op): Resolve and convert from reference ARG1 earlier. Adjust ARG2 & ARG3 resolve and conversion. testsuite: * g++.old-deja/g++.pt/crash68.C: New test. From-SVN: r44388
2001-07-26re PR c++/3152 (g++-3.0 segfaults when compiling program using -g)Nathan Sidwell2-14/+33
cp: * decl.c (last_function_parm_tags): Remove. (current_function_parm_tags): Remove. (init_decl_processing): Adjust. (start_function): Adjust. (store_parm_decls): Adjust. PR c++/3152 * decl.c (grokdeclarator): Detect when a function typedef is declaring a function, and create last_function_parms correctly. testsuite: * g++.old-deja/g++.other/crash42.C: New test. From-SVN: r44387