summaryrefslogtreecommitdiff
path: root/gcc/cp
Commit message (Collapse)AuthorAgeFilesLines
* * cp-tree.h (unemitted_tinfo_decls): Make a VEC(tree).nathan2004-09-224-35/+23
| | | | | | | | | | * decl2.c (cp_finish_file): Adjust tinfo decl emission loop. * rtti.c (unemitted_tinfo_decls): Make a VEC(tree). (init_rtti_processing): Initialize it to something realistic. (get_tinfo_decl): Adjust pushing the new decl. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87872 138bc75d-0d04-0410-961f-82ee72b054a4
* * cp-tree.h (struct lang_type_class): Remove marked flags, addnathan2004-09-225-114/+75
| | | | | | | | | | | | | | | | | | | | diamond_shaped and repeated_base flags. Reorder to keep 8-bit blocks. (TYPE_MARKED_P): New. (CLASSTYPE_DIAMOND_SHAPED_P, CLASSTYPE_REPEATED_BASE_P): New. (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N, CLEAR_CLASSTYPE_MARKED_N): Remove. (CLASSTYPE_MARKED_*, SET_CLASSTYPE_MARKED_*, CLEAR_CLASSTYPE_MARKED_*): Remove. * decl.c (xref_basetypes): Use TYPE_MARKED_P. Determine diamond shaped and repeated base properties. * lex.c (cxx_make_type): Don't clear TYPE_ALIAS_SET. * rtti.c (dfs_class_hint_mark, dfs_class_hint_unmark, class_hint_flags): Remove. (get_pseudo_ti_init): Use CLASSTYPE_REPEATED_BASE_P and CLASSTYPE_DIAMOND_SHAPED_P. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87853 138bc75d-0d04-0410-961f-82ee72b054a4
* [gcc/cp/ChangeLog]zlaski2004-09-223-5/+14
| | | | | | | | | | | | | 2004-09-21 Ziemowit Laski <zlaski@apple.com> * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Moved here from cp-objcp-common.h. (objcp_tsubst_copy_and_build): Reformat function signature. * cp-objcp-common.h (objcp_tsubst_copy_and_build): Likewise. (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Moved to cp-lang.c. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87846 138bc75d-0d04-0410-961f-82ee72b054a4
* * parser.c (cp_lexer_peek_token, cp_lexer_consume_token):zack2004-09-212-22/+40
| | | | | | | | | | | | Don't handle CPP_PRAGMA tokens specially. (cp_lexer_handle_pragma): Use cp_lexer_consume_token. Don't purge the token; do clear token->value after processing. Add assertion at beginning that token->value is nonzero. (cp_parser_statement, cp_parser_declaration_seq_opt): Handle CPP_PRAGMA as a full statement or declaration in its own right. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87822 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/15049austern2004-09-212-4/+22
| | | | | | | | | * cp/decl.c (grokvardecl): Accept declarations of global variables using anonymous types. * testsuite/g++.dg/other/anon3.C: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87814 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/7503sayle2004-09-213-0/+37
| | | | | | | | | | | | | | | | | | | * tree.c (lvalue_p_1): Disallow MIN_EXPR and MAX_EXPR as lvalues if either operand has side-effects. * typeck.c (rationalize_conditional_expr): Assert that neither operand of MIN_EXPR or MAX_EXPR has side-effects. (build_modify_expr): Add support for MIN_EXPR and MAX_EXPR. Check that the "lhs" is a valid lvalue, i.e. that neither operand of a MIN_EXPR or MAX_EXPR has a side-effect. * g++.dg/opt/pr7503-1.C: New testcase for COND_EXPR lvalues. * g++.dg/opt/pr7503-2.C: New testcase for <? and >? lvalues. * g++.dg/opt/pr7503-3.C: New testcase for invalid <? lvalue errors. * g++.dg/opt/pr7503-4.C: New testcase for <?= and >?= assignments. * g++.dg/opt/pr7503-5.C: New testcase for side-effects with <?=. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87810 138bc75d-0d04-0410-961f-82ee72b054a4
* * cp-tree.h (struct lang_type_header): Removenathan2004-09-2110-94/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | uses_multiple_inheritance field. (TYPE_USES_MULTIPLE_INHERITANCE): Remove. (TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P): Remove. (TYPE_USES_VIRTUAL_BASECLASSES): Remove. (DECL_NEEDS_VTT_PARM_P): Use CLASSTYPE_VBASECLASSES. (TYPE_CONTAINS_VPTR_P): Likewise. * call.c (add_template_candidate_real): Use CLASSTYPE_VBASECLASSES. (build_special_member_call): Likewise. * class.c (finish_struct_bits): Remove TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P & TYPE_USES_VIRTUAL_BASECLASSES bookkeeping. (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P. (create_vtable_ptr): Remove TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P bookkeeping. (build_vtt_inits): Use CLASSTYPE_VBASECLASSES. (accumulate_vtbl_inits, build_vbase_offset_vtbl_entries): Likewise. * decl.c (xref_basetypes): Remove TYPE_USES_MULTIPLE_INHERITANCE, TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, TYPE_USES_VIRTUAL_BASECLASSES bookkeeping. (cxx_maybe_build_cleanup): Use CLASSTYPE_VBASECLASSES. * decl2.c (maybe_retrofit_in_chrg): Likewise. * init.c (expand_member, push_base_cleanups): Likewise. * pt.c (instantiate_class_template): Remove TYPE_USES_MULTIPLE_INHERITANCE, TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, TYPE_USES_VIRTUAL_BASECLASSES bookkeeping. * ptree.c (cxx_print_type): Remove TYPE_USES_MULTIPLE_INHERITANCE check. * typeck2.c (process_init_constructor): Replace some sorrys with asserts. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87808 138bc75d-0d04-0410-961f-82ee72b054a4
* 2004-09-21 Andreas Tobler <a.tobler@schweiz.ch>andreast2004-09-212-1/+6
| | | | | | | | * decl.c (reshape_init_array): Initialize max_index_cst to fix bootstrap failure. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87798 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/17530mmitchel2004-09-212-2/+21
| | | | | | | | | | | * pt.c (tsubst): Fix parentheses to accomodate emacs. (tsubst_baselink): If we get a single function, mark it as used. PR c++/17530 * g++.dg/template/static7.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87791 138bc75d-0d04-0410-961f-82ee72b054a4
* 2004-09-20 Matt Austern <austern@apple.com>zack2004-09-215-628/+546
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Zack Weinberg <zack@codesourcery.com> * c-common.c (fix_string_type): Build the unqualified array type unconditionally, then use c_build_qualified_type to get the proper const-qualified variant, and set its TYPE_MAIN_VARIANT to refer to the unqualified type. * c-lex.c (c_lex_return_raw_string): New global. (c_lex_with_flags): Honor it. * c-pragma.h: Declare it. cp: * decl.c (make_rtl_for_nonlocal_decl, start_preparsed_function): Apply lbasename to input_filename before passing to get_fileinfo. * semantics.c (begin_class_definition): Likewise. * lex.c (handle_pragma_interface): Apply get_fileinfo to the correct filename. Rename variables to be less confusing. (handle_pragma_implementation): Likewise. Disable "appears after file is included" diagnostic. * parser.c (struct cp_token): Add in_system_header fiag. (CP_TOKEN_BLOCK_NUM_TOKENS, struct cp_token_block) (CP_TOKEN_BUFFER_SIZE, cp_token_cache_push_token) (CPP_NONE, cp_lexer_read_token): Delete. (struct cp_lexer): Remove first_token, string_tokens, main_lexer_p fields. Clarify comments. (struct cp_token_cache): Now just a pair of pointers. (CP_LEXER_BUFFER_SIZE): New #define. (CPP_PURGED): New fake token type. (cp_lexer_new_from_token_array, cp_lexer_destroy) (cp_lexer_peek_token_emit_debug_info, cp_lexer_skip_purged_tokens) (cp_lexer_handle_pragma, cp_token_cache_new, cp_parser_string_literal): New functions. (cp_lexer_new_from_tokens): Now a simple wrapper around cp_lexer_new_from_token_array. (cp_lexer_set_source_position_from_token): Also update in_system_header. (cp_lexer_next_token, cp_lexer_prev_token, cp_lexer_advance_token): Don't wrap round. (cp_lexer_token_difference): Dont handle wrapping round. (cp_lexer_new_main): Enable pragma deferral and raw strings, read the entire translation unit through c_lex_with_flags into this lexer's buffer, then turn raw strings back off again. (cp_lexer_grow_buffer): Adjust for buffer no longer being circular. (cp_lexer_get_preprocessor_token): No need to handle not being the main lexer. Set token->in_system_header too. (cp_lexer_peek_token): Skip purged tokens. Feed pragma tokens to cp_lexer_handle_pragma. No need to call cp_lexer_read_token. (cp_lexer_peek_nth_token): Likewise. (cp_lexer_purge_token): Mark the token PURGED, don't shift all the other tokens down. (cp_lexer_purge_tokens_after): Likewise. (cp_lexer_save_tokens, cp_lexer_rollback_tokens): Don't worry about there being no tokens. (cp_lexer_print_token): Revise to give useful information on all tokens. (struct cp_parser): Add field translate_strings_p. (cp_parser_new): Initialize it. (cp_parser_translation_unit): Destroy the lexer when done. (cp_parser_parameter_declaration): Restructure saving of default arguments. (cp_parser_save_member_function_body): Likewise. (cp_parser_check_for_invalid_template_id) (cp_parser_nested_name_specifier_opt, cp_parser_template_id): Adjust calls to cp_lexer_advance_token. (cp_parser_skip_to_closing_parenthesis, cp_parser_declaration): No need to fiddle c_lex_string_translate. (cp_parser_primary_expression, cp_parser_linkage_specification) (cp_parser_asm_definition, cp_parser_asm_specification_opt) (cp_parser_asm_operand_list, cp_parser_asm_clobber_list) Use cp_parser_string_literal. (cp_parser_attribute_list): Save and restore parser->translate_strings_p, not c_lex_string_translate. (cp_parser_cache_group): Delete. (cp_parser_cache_group_1): Rename cp_parser_cache_group. Do not take a cache argument. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87786 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/14179giovannibajo2004-09-202-45/+91
| | | | | | | | | * decl.c (reshape_init): Extract array handling into... (reshape_init_array): New function. Use integers instead of trees for indices. Handle out-of-range designated initializers. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87777 138bc75d-0d04-0410-961f-82ee72b054a4
* * lex.c (cxx_init): Don't set the ridpointer for RID_NULLsteven2004-09-202-1/+5
| | | | | | | to null_node. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87774 138bc75d-0d04-0410-961f-82ee72b054a4
* * decl2.c (determine_visibility): Allow class visibilitymmitchel2004-09-192-14/+26
| | | | | | | directives to override targetm.cxx.export_class_data. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87735 138bc75d-0d04-0410-961f-82ee72b054a4
* * call.c, semantics.c: Follow spelling conventions.kazu2004-09-184-3/+8
| | | | | | | * class.c: Fix a comment typo. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87704 138bc75d-0d04-0410-961f-82ee72b054a4
* * tree-inline.c (copy_tree_r): Don't duplicate constants, they'regeoffk2004-09-182-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | shared anyway. PR pch/13361 * c-typeck.c (constructor_asmspec): Delete. (struct initializer_stack): Delete field 'asmspec'. (start_init): Delete saving of asmspec. (finish_init): Don't update constructor_asmspec. * dwarf2out.c (rtl_for_decl_location): Duplicate string from tree. * stmt.c (expand_asm): Duplicate strings from tree. (expand_asm_operands): Likewise. * tree.c (tree_size): Update computation of size of STRING_CST. (make_node): Don't make STRING_CST nodes. (build_string): Allocate string with tree node. (tree_code_size): Clean up assertions, don't allow requests for "the size of a STRING_CST". * tree.def (STRING_CST): Update comment. * tree.h (TREE_STRING_POINTER): Adjust for change to STRING_CST. (tree_string): Place contents of string in tree node. * config/sh/sh.c (sh_handle_sp_switch_attribute): Duplicate string from tree. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87695 138bc75d-0d04-0410-961f-82ee72b054a4
* 2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>zack2004-09-1712-84/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Zack Weinberg <zack@codesourcery.com> * alias.c (find_base_decl): Remove unreachable case '3' block. * expr.c (safe_from_p): Abort if passed a type. * tree-gimple.c (recalculate_side_effects): Abort if passed anything other than an expression. * tree-ssa-pre.c (phi_translate): Return expr immediately if is_gimple_min_invariant is true for it. Reorder cases for clarity. Abort on un-handled tree classes. (valid_in_set): Likewise. * tree.c (tree_code_class_strings): New static data. * tree.h (enum tree_code_class): New. (tree_code_class_strings): Declare. (TREE_CODE_CLASS_STRING, EXCEPTIONAL_CLASS_P, CONSTANT_CLASS_P) (REFERENCE_CLASS_P, COMPARISON_CLASS_P, UNARY_CLASS_P, BINARY_CLASS_P) (STATEMENT_CLASS_P, EXPRESSION_CLASS_P, IS_TYPE_OR_DECL_P): New macros. (TYPE_P, DECL_P, IS_NON_TYPE_CODE_CLASS, IS_EXPR_CODE_CLASS) (checking macros, EXPR_LOCATION, SET_EXPR_LOCATION, EXPR_LOCUS): Update. * tree.def, c-common.def, objc/objc-tree.def: Use tree_code_class enumeration constants instead of code letters. * alias.c, builtins.c, c-common.c, c-format.c, c-lang.c, c-pragma.c * c-typeck.c, cgraphunit.c, convert.c, dbxout.c, dwarf2out.c * emit-rtl.c expr.c, fold-const.c, gimplify.c, lambda-code.c * langhooks.c, langhooks.h, predict.c, print-tree.c, reload1.c, stmt.c * tree-browser.c, tree-cfg.c, tree-chrec.c, tree-complex.c, tree-dfa.c * tree-dump.c, tree-eh.c, tree-gimple.c, tree-inline.c, tree-nested.c * tree-outof-ssa.c, tree-pretty-print.c, tree-sra.c, tree-ssa-ccp.c * tree-ssa-dce.c, tree-ssa-dom.c, tree-ssa-forwprop.c, tree-ssa-live.c * tree-ssa-loop-im.c, tree-ssa-loop-ivopts.c, tree-ssa-operands.c * tree-ssa-phiopt.c, tree-ssa-pre.c, tree-ssa-propagate.c * tree-ssa.c, tree-ssanames.c, tree-tailcall.c, tree.c, varasm.c * config/sol2-c.c, config/arm/arm.c, config/i386/winnt.c * config/pa/pa.c, config/pa/pa.h, config/sh/sh.c, objc/objc-lang.c Update to match. * LANGUAGES: Add note about change. ada: * ada-tree.def: Use tree_code_class enumeration constants instead of code letters. * ada-tree.h, decl.c, misc.c, trans.c, utils.c, utils2.c: Update for new tree-class enumeration constants. cp: * cp-tree.def: Use tree_code_class enumeration constants instead of code letters. * call.c, class.c, cp-gimplify.c, cp-lang.c, cxx-pretty-print.c * mangle.c, pt.c, semantics.c, tree.c, typeck.c: Update for new tree-class enumeration constants. fortran: * f95-lang.c, trans-expr.c, trans.c: Update for new tree-class enumeration constants. java: * java-tree.def: Use tree_code_class enumeration constants instead of code letters. * java-gimplify.c, jcf-write.c, lang.c, parse.y: Update for new tree-class enumeration constants. treelang: * treetree.c: Update for new tree-class enumeration constants. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87675 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/16002mmitchel2004-09-173-2/+27
| | | | | | | | | | | | | | | | | | | | * parser.c (cp_parser_simple_declaration): Commit to tentative parses after seeing a decl-specifier. (cp_parser_simple_declaration): Eliminate spurious message. (cp_parser_init_declarator): Adjust error message. PR c++/16029 * lex.c (unqualified_name_lookup_error): Mark the dummy declaration as used. PR c++/16002 * g++.dg/template/error18.C: New test. PR c++/16029 * g++.dg/warn/Wunused-8.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87633 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/17501mmitchel2004-09-162-1/+9
| | | | | | | | | | | * parser.c (cp_parser_nested_name_specifier): Do not resolve typename types if the user explicitly said "typename". PR c++/17501 * g++.dg/template/typename7.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87616 138bc75d-0d04-0410-961f-82ee72b054a4
* 2004-09-16 Andrew MacLeod <amacleod@redhat.com>amacleod2004-09-162-3/+8
| | | | | | | | * error.c (dump_decl): Make sure there is lang_specific info before checking for DTOR and CTOR decls. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87610 138bc75d-0d04-0410-961f-82ee72b054a4
* * class.c (copy_virtuals): Remove.nathan2004-09-162-19/+13
| | | | | | | | | | (build_primary_vtable): Use copy_list directly. (build_secondary_vtable): Likewise. (update_vtable_entry_for_fn): Clear BV_CALL_INDEX here. (create_vtable_ptr): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87604 138bc75d-0d04-0410-961f-82ee72b054a4
* missing changelog entrynathan2004-09-161-0/+16
| | | | | | | | | | | | | | | | | | | * cp-tree.h (struct lang_type_class): Make pure_virtuals a VEC(tree). (CLASSTYPE_INLINE_FRIENDS, CLASSTYPE_PURE_VIRTUALS): Update comments. * call.c (build_new_method_call): Don't confirm a pure virtual is in CLASSTYPE_PURE_VIRTUALS. Reorder checks. Make it a warning. * class.c (check_methods): CLASSTYPE_INLINE_FRIENDS is a VEC(tree). (fixup_inline_methods, finish_struct): Likewise. * decl.c (finish_method): Likewise. * search.c (dfs_get_pure_virtuals, get_pure_virtuals): CLASSTYPE_PURE_VIRTUALS is a VEC(tree). * typeck2.c (abstract_virtuals_error): Likewise. Truncate the vector to avoid repeating the list in error messages. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87602 138bc75d-0d04-0410-961f-82ee72b054a4
* * search.c: Follow spelling conventions.kazu2004-09-162-6/+10
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87600 138bc75d-0d04-0410-961f-82ee72b054a4
* * cp-tree.h (struct lang_type_class): Make pure_virtuals anathan2004-09-166-44/+48
| | | | | | | | | | | | | | | | | | VEC(tree). (CLASSTYPE_INLINE_FRIENDS, CLASSTYPE_PURE_VIRTUALS): Update comments. * call.c (build_new_method_call): Don't confirm a pure virtual is in CLASSTYPE_PURE_VIRTUALS. Reorder checks. Make it a warning. * class.c (check_methods): CLASSTYPE_INLINE_FRIENDS is a VEC(tree). (fixup_inline_methods, finish_struct): Likewise. * decl.c (finish_method): Likewise. * search.c (dfs_get_pure_virtuals, get_pure_virtuals): CLASSTYPE_PURE_VIRTUALS is a VEC(tree). * typeck2.c (abstract_virtuals_error): Likewise. Truncate the vector to avoid repeating the list in error messages. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87592 138bc75d-0d04-0410-961f-82ee72b054a4
* * configure.ac: Check for COMDAT support. Robustify check formmitchel2004-09-154-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SHF_MERGE support. * configure: Regenerated. * config.in: Likewise. * langhooks-def.h (lhd_comdat_group): New function. (LANG_HOOKS_COMDAT_GROUP): New macro. (LANG_HOOKS_DECLS): Use it. * langhooks.c (lhd_comdat_group): Define. * langhooks.h (lang_hooks_for_decls): Add comdat_group. * output.h (named_section_flags): Make it a macro. (named_section_real): New function. (default_no_named_section): Add decl parameter. (default_elf_asm_named_section): Likewise. (default_coff_asm_named_section): Likewise. (default_pe_asm_named_section): Likewise. * target.h (gcc_target): Adjust type of named_section. * varasm.c (named_section_flags): Rename to named_section_real. Add decl parameter. (default_no_named_section): Add decl parameter. (default_elf_asm_named_section): Use COMDAT, if available. Deal with the case that ASM_COMMENT_START is "@". (default_coff_asm_named_section): Add decl parameter. (default_pe_asm_named_section): Likewise. * config/alpha/alpha.c (vms_asm_named_section): Add decl parameter. (unicosmk_asm_named_section): Likewise. * config/arm/arm.c (arm_elf_asm_named_section): Remove. * config/arm/elf.h (TARGET_ASM_NAMED_SECTION): Likewise. * config/c4x/c4x.c (c4x_asm_named_section): Add decl parameter. * config/cris/cris-protos.h (cris_target_asm_named_section): Likewise. * config/cris/cris.c (cris_target_asm_named_section): Likewise. * config/h8300/h8300.c (h8300_asm_named_section): Likewise. * config/i386/i386-protos.h (i386_pe_asm_named_section): Likewise. * config/i386/winnt.c (i386_pe_asm_named_section): Likewise. * config/m68k/m68k.c (m68k_coff_asm_named_section): Likewise. * config/mcore/mcore.c (mcore_asm_named_section): Likewise. * config/rs6000/rs6000.c (rs6000_xcoff_asm_named_section): Likewise. * config/sparc/sparc.c (sparce_elf_asm_named_section): Likewise. * cp-objcp-common.h (LANG_HOOKS_COMDAT_GROUP): Define. * cp-tree.h (cxx_comdat_group): Declare. * decl.c (cxx_comdat_group): New function. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87557 138bc75d-0d04-0410-961f-82ee72b054a4
* * search.c (get_pure_virtuals): Remove unused variables.nathan2004-09-152-4/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87542 138bc75d-0d04-0410-961f-82ee72b054a4
* * cp-tree.h (struct lang_decl_flags): Removenathan2004-09-155-26/+15
| | | | | | | | | | | | needs_final_overrider. (DECL_NEEDS_FINAL_OVERRIDER_P): Remove. * decl.c (duplicate_decls): Do not copy DECL_NEEDS_FINAL_OVERRIDER_P. * class.c (finish_struct_bits): Correct comment about CLASSTYPE_PURE_VIRTUALS. * search.c (get_pure_virtuals): Remove useless loop. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87541 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/17324mmitchel2004-09-152-3/+62
| | | | | | | | | | | | | | | | * mangle.c (partially_mangled_name): New variable. (partially_mangled_name_len): Likewise. (save_partially_mangled_name): New function. (restore_partially_mangled_name): Likewise. (write_encoding): Save and restore partially mangled names around calls to get_mostly_instantiated_function_type. (write_unqualified_name): Likewise. PR c++/17324 * g++.dg/template/mangle1.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87530 138bc75d-0d04-0410-961f-82ee72b054a4
* * pt.c (unify): Replace gcc_unreachable with gcc_assert.nathan2004-09-142-24/+24
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87491 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/16162mmitchel2004-09-142-1/+17
| | | | | | | | | | | | | | * parser.c (cp_parser_id_expression): Correct value for is_declarator. (cp_parser_nested_name_specifier_opt): Look through typenames as necessary. (cp_parser_template_name): Honor check_dependency_p. PR c++/16162 * g++.dg/template/decl2.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87483 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/16716mmitchel2004-09-143-9/+14
| | | | | | | | | | | | | | | | | | * parser.c (cp_parser_parse_and_diagnose_invalid_type_name): Robustify. PR c++/17327 * pt.c (unify): Add ENUMERAL_TYPE case. Replace sorry with gcc_unreacable. PR c++/16716 * g++.dg/parse/crash17.C: New test. PR c++/17327 * g++.dg/template/enum3.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87467 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/16254rth2004-09-123-2/+8
| | | | | | | | | | | * fold-const.c (fold) <case CLEANUP_POINT_EXPR>: Remove. * tree.c, tree.h (has_cleanups): Remove. cp/ * semantics.c (maybe_cleanup_point_expr): Don't call fold. * typeck.c (condition_conversion): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87407 138bc75d-0d04-0410-961f-82ee72b054a4
* * pt.c (cur_stmt_expr): Move from tsubst_expr.rth2004-09-122-18/+25
| | | | | | | | (tsubst_expr) <case STMT_EXPR>: Move ... (tsubst_copy_and_build): ... here. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87385 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-common.h (struct c_fileinfo): Comment moved here from cp-tree.h.zack2004-09-108-67/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (extract_interface_info): Delete prototype. * c-decl.c (extract_interface_info): Delete stub. * c-lex.c (get_fileinfo): Initialize file_info_tree here, if it's not already been done ... (init_c_lex): ... not here. (fe_file_change): Don't call extract_interface_info. cp: * cp-tree.h (interface_only, interface_unknown): Delete declarations; comment explaining them moved to c-common.h. * lex.c (interface_only, interface_unknown, extract_interface_info): Delete definitions. (cxx_finish): Don't reset interface_unknown. (handle_pragma_interface): Don't set interface_only and interface_unknown; just the like-named fields in finfo. (handle_pragma_implementation): Adjust comment. * decl2.c (cp_finish_file): Don't reset interface_only and interface_unknown. * method.c (synthesize_method): Don't reset interface_unknown or call extract_interface_info. * pt.c (pop_tinst_level): Don't call extract_interface_info. * decl.c (start_cleanup_fn): Don't save or restore interface_only and interface_unknown. (make_rtl_for_nonlocal_decl): Call get_fileinfo on input_filename and use the result instead of the interface_only/interface_unknown globals. (start_preparsed_function): Likewise. * lex.c (cxx_make_type): Likewise. * semantics.c (begin_class_definition): Likewise. (expand_body): Don't call extract_interface_info. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87329 138bc75d-0d04-0410-961f-82ee72b054a4
* [gcc/cp/ChangeLog]zlaski2004-09-102-3/+14
| | | | | | | | | | | 2004-09-10 Ziemowit Laski <zlaski@apple.com> * decl.c (objc_mark_locals_volatile): Make description of routine more descriptive; only mark VAR_DECLs at each binding level. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87323 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/17386rth2004-09-104-42/+50
| | | | | | | | | | | | | * call.c (build_vfield_ref): Move... * class.c (build_vfield_ref): ... here. Convert datum to the primary base containing the vptr. (make_new_vtable): Simplify build_primary_vtable arguments. (finish_struct_1): Do not duplicate TYPE_VFIELD. * typeck.c (build_class_member_access_expr): Don't warn for null object access to base fields. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87322 138bc75d-0d04-0410-961f-82ee72b054a4
* [gcc/cp/ChangeLog]zlaski2004-09-102-0/+37
| | | | | | | | | | 2004-09-10 Ziemowit Laski <zlaski@apple.com> * decl.c (objc_get_current_scope, objc_mark_locals_volatile): New functions, to be called from ObjC++. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87321 138bc75d-0d04-0410-961f-82ee72b054a4
* * class.c, cp-tree.h, decl.c, decl2.c, mangle.c,kazu2004-09-1011-23/+29
| | | | | | | | name-lookup.h, parser.c, search.c, semantics.c, typeck2.c: Fix comment typos. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87292 138bc75d-0d04-0410-961f-82ee72b054a4
* [gcc/cp/ChangeLog]zlaski2004-09-102-0/+12
| | | | | | | | | | 2004-09-09 Ziemowit Laski <zlaski@apple.com> * typeck.c (build_c_cast): Preserve the cast if casting to and from an Objective-C type. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87277 138bc75d-0d04-0410-961f-82ee72b054a4
* [gcc/cp/ChangeLog]zlaski2004-09-093-1/+17
| | | | | | | | | | | | 2004-09-09 Ziemowit Laski <zlaski@apple.com> * Make-lang.in (cp/typeck.o): Depend on c-common.h. * typeck.c: Include c-common.h. (comptypes): For RECORD_TYPEs, call objc_comptypes() and return the result if nonnegative. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87259 138bc75d-0d04-0410-961f-82ee72b054a4
* * defaults.h (MULTIPLE_SYMBOL_SPACES): Provide default.zack2004-09-093-7/+13
| | | | | | | | | | | | | | | * config/arm/pecoff.h, config/i386/beos-elf.h * config/i386/cygming.h, config/i386/i386-interix.h: Define MULTIPLE_SYMBOL_SPACES to 1, not nothing. Remove comment cloned from manual. * doc/tm.texi: Update description of MULTIPLE_SYMBOL_SPACES. cp: * decl2.c (import_export_class) * lex.c (handle_pragma_interface): Test MULTIPLE_SYMBOL_SPACES with if, not #ifdef. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87243 138bc75d-0d04-0410-961f-82ee72b054a4
* [gcc/cp/ChangeLog]zlaski2004-09-093-2/+15
| | | | | | | | | | | 2004-09-08 Ziemowit Laski <zlaski@apple.com> * Make-lang.in (cp/semantics.o): Depend on c-common.h. * semantics.c: Include c-common.h. (finish_compound_stmt): Call objc_clear_super_receiver(). git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87219 138bc75d-0d04-0410-961f-82ee72b054a4
* [gcc/cp/ChangeLog]zlaski2004-09-093-1/+7
| | | | | | | | | | 2004-09-08 Ziemowit Laski <zlaski@apple.com> * cp-tree.h (do_poplevel): New prototype. * semantics.c (do_poplevel): Make externally visible. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87215 138bc75d-0d04-0410-961f-82ee72b054a4
* Fix cp changelog from previous checkinnathan2004-09-081-0/+6
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87180 138bc75d-0d04-0410-961f-82ee72b054a4
* * vec.c (vec_p_reserve, vec_o_reserve): Rename to ...nathan2004-09-083-4/+4
| | | | | | | | | | | | | | | | | | | | | (vec_gc_p_reserve, vec_gc_o_reserve): ... here. Clone to (vec_heap_p_reserve, vec_heap_o_reserve): ... here, adjust. (vec_gc_free, vec_heap_free): New. * vec.h (DEF_VEC_GC_P, DEF_VEC_MALLOC_P): New. (DEF_VEC_P): Add allocator argument. Adjust. (DEF_VEC_GC_O, DEF_VEC_MALLOC_O): New. (DEF_VEC_O): Add allocator argument. Adjust. (VEC(free)): New. * tree.h (tree): Define a GC'd vector. * lamba-code.c (lambda_loop): Likewise. * value-prof.h (histogram_value): Likewise. * cp/cp-tree.h (tree_pair_s): Likewise. * cp/name-lookup.h (cxx_saved_binding, cp_class_binding): Likewise. * cp/semantics.c (deferred_access): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87179 138bc75d-0d04-0410-961f-82ee72b054a4
* * semantics.c (expand_body): Assert that we are not nested.drow2004-09-062-1/+10
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87126 138bc75d-0d04-0410-961f-82ee72b054a4
* cp:zack2004-09-063-59/+81
| | | | | | | | | | | | | | | | | | * decl.c (build_enumerator): Use add_double and int_fits_type_p instead of cp_build_binary_op, to avoid creating short-lived trees. * parser.c (cp_parse_type_specifier <RID_ENUM>): Use two-token lookahead instead of backtracking. Move some code to avoid a conditional branch. (cp_parser_enum_specifier): Avoid duplication of effort with caller. Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate. (cp_parser_enumerator_list, cp_parser_enumerator_definition): Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate. testsuite: * g++.old-deja/g++.other/enum2.C: Move dg-error markers to reflect changed line numbering of diagnostics. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87121 138bc75d-0d04-0410-961f-82ee72b054a4
* * decl.c (grok_declarator): Remove a redundant semicolon.lerdsuwa2004-09-043-10/+14
| | | | | | | | * parser.c (cp_parser_decl_specifier_seq, cp_parser_type_specifier): Correct comments describing function parameters. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87085 138bc75d-0d04-0410-961f-82ee72b054a4
* Compile speed improvement.austern2004-09-032-0/+33
| | | | | | | | | | | | | | | | * parser.c (cp_lexer_print_token): Only define if ENABLE_CHECKING set. Otherwise define a stub macro that expands to nothing. (cp_lexer_debugging_p): Only define if ENABLE_CHECKING set. Otherwise define a stub macro that expands to 0. (cp_lexer_start_debugging): Only define if ENABLE_CHECKING set. (cp_lexer_stop_debugging): Likewise. (cp_lexer_debug_stream): Only define if ENABLE_CHECKING set. Otherwise define a stub macro that expands to NULL. (cp_lexer_new_main): Only set debugging_p if ENABLE_CHECKING set. (cp_lexer_new_from_tokens): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87059 138bc75d-0d04-0410-961f-82ee72b054a4
* * decl.c (finish_function): Clean out pointers we no longer need.hubicka2004-09-032-0/+16
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87055 138bc75d-0d04-0410-961f-82ee72b054a4
* /rth2004-09-032-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * configure.in: Remove target-libstdc++-v3 from noconfigdirs for *-*-netware, but add target-libmudflap. Consolidate *-*-netware targets (of which really only i?86 exists) into a single entry. * configure: Likewise. gcc/ * config.gcc: Resurrect NetWare as a target. Handle special case of Novell linker to be used (specified through --with-ld=) and threading model of either Posix (default) or NKS. * config/i386/i386.c (ix86_return_pops_args): Conditionalize popping of incoming hidden argument on KEEP_AGGREGATE_RETURN_POINTER. * config/i386/i386.h (KEEP_AGGREGATE_RETURN_POINTER): New. * config/i386/netware.c, config/i386/netware.h: New. * config/i386/nwld.c, config/i386/nwld.h: New. * config/i386/netware-crt0.c: New. * config/i386/netware-libgcc.c: New. * config/i386/netware-libgcc.def: New. * config/i386/netware-libgcc.exp: New. * config/i386/t-netware, config/i386/t-nwld: New. * gthr-nks.h: New. * doc/install.texi: Document NKS threading model. gcc/cp/ * g++spec.c (MATH_LIBRARY_PROFILE): Default to MATH_LIBRARY rather than "-lm". gcc/testsuite/ * g++.dg/abi/bitfield5.C: Use -mno-ms-bitfields. * g++.old-deja/g++.jason/thunk2.C: xfail for NetWare. * g++.old-deja/g++.law/profile1.C: xfail for NetWare. * g++.old-deja/g++.other/store-expr1.C: xfail for NetWare. * gcc.c-torture/compile/20001109-1.c: xfail for NetWare. * gcc.c-torture/compile/20001109-2.c: xfail for NetWare. * gcc.c-torture/execute/multi-ix.c: Use __builtin_bzero rather than the non-portable bzero. * gcc.dg/20010912-1.c: xfail for NetWare. * gcc.dg/20020426-2.c: xfail for NetWare. * gcc.dg/20021014-1.c: xfail for NetWare. * gcc.dg/20021018-1.c: xfail for NetWare. * gcc.dg/20030213-1.c: xfail for NetWare. * gcc.dg/20030225-1.c: xfail for NetWare. * gcc.dg/20030708-1.c: xfail for NetWare. * gcc.dg/builtins-config.h: Also exclude NetWare. * gcc.dg/format/format.h: Define restrict only if not already defined. * gcc.dg/nest.c: xfail for NetWare. * gcc.dg/special/gcsec-1.c: Don't pass -static for NetWare. * lib/target-supports.exp (check_visibility_available): Exclude NetWare. fixincludes/ * inclhack.def: Suppress exception_structure and math_exception for NetWare headers. * fixincl.x: Regenerate. libstdc++-v3/ * crossconfig.m4: Add NetWare as a target. * configure: Regenerate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87040 138bc75d-0d04-0410-961f-82ee72b054a4