aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/ChangeLog
AgeCommit message (Collapse)Author
2005-10-282005-10-28 Andrew Pinski <pinskia@physics.uc.edu>pinskia
* decl.c (grokfndecl): Remove the setting of the return type of the function type of main after erroring about must returning int.
2005-10-282005-10-28 Andrew Pinski <pinskia@physics.uc.edu>pinskia
PR C++/23229 * decl.c (grokfndecl): Create a new function type after erroring out about main not returning int. 2005-10-28 Andrew Pinski <pinskia@physics.uc.edu> PR C++/23229 * g++.dg/warn/main-2.C: New test.
2005-10-28PR c++/22153jconner
* cp/parser.c (cp_parser_member_declaration): Detect and handle a template specialization. * testsuite/g++.dg/template/crash38.C: New test. * testsuite/g++.dg/parse/explicit1.C: Change expected errors.
2005-10-282005-10-28 Andrew Pinski <pinskia@physics.uc.edu>pinskia
PR C++/23426 * decl.c (start_decl): Check that the decl is an error_mark_node before getting the type. Remove the check for the decl's type being an error_mark_node. 2005-10-28 Andrew Pinski <pinskia@physics.uc.edu> PR C++/23426 * g++.dg/other/large-size-array.C: New test.
2005-10-21 PR c++/24260mmitchel
* parser.c (cp_parser_init_declarator): Pass attributes to grokfield. PR c++/24260 * g++.dg/ext/tmplattr1.C: New test.
2005-10-20 PR c++/22618mmitchel
* search.c (accessible_p): Check access in the outermost set of template parameters. PR c++/22618 * g++.dg/parse/access8.C: New test.
2005-10-202005-10-20 Richard Guenther <rguenther@suse.de>rguenth
* decl.c (grokdeclarator): Fix ambiguous pedwarn message.
2005-10-18 PR c++/22293reichelt
* decl.c (grokdeclarator): Reject unqualified destructors in friend declarations. * g++.dg/other/friend3.C: New test.
2005-10-18 PR c++/23293mmitchel
* pt.c (convert_template_argument): Use canonical type variants in template specializations. PR c++/23293 * g++.dg/template/error19.C: New test.
2005-10-18cp:nathan
PR c++/21383 * name-lookup.c (arg_assoc): Template args can be null in a template-id-expr. testsuite: PR c++/21383 * g++.dg/overload/koenig2.C: New.
2005-10-18cp:nathan
PR c++/22604 * class.c (update_vtable_entry_for_fn): Don't process invalid covariant overriders. PR c++/23118 * cp-tree.h (add_method): Add return value. * class.c (add_method): Return success indicator. * semantics.c (finish_member_declaration): Don't add an invalid method to the method list. testsuite: PR c++/23118 * g++.dg/overload/error2.C: New. PR c++/22604 * g++.dg/inherit/covariant14.C: New.
2005-10-18 PR c++/21908mmitchel
* call.c (build_new_method_call): Do not show VTT parameters to the user.
2005-10-17 PR c++/23440reichelt
* parser.c (cp_parser_statement): If the parser reached CPP_EOF, only complain about missing statement. * g++.dg/parse/for1.C: New test.
2005-10-17cp:nathan
PR c++/24386 * cp-tree.h (BASELINK_QUALIFIED_P): New. * pt.c (tsubst_copy_and_build): <CALL_EXPR case>: Use it. * typeck.c (finish_class_member_access_expr): Set it. testsuite: PR c++/24386 * g++.dg/template/overload7.C: New.
2005-10-17cp:nathan
PR c++/21353 * g++.dg/template/defarg6.C: New. testsuite: PR c++/21353 * decl.c (check_default_argument): Don't check processing_template_decl or uses_template_parms here. (grokparms): Only call check_default_argument when not processing a template decl. * parser.c (cp_parser_late_parsing_default_arg): Call check_default_argument when not processing a template decl.
2005-10-16 PR c++/24389mmitchel
* decl2.c (mark_used): Use uses_template_parms instead of dependent_type_p. * init.c (constant_value_1): Handle uninstantiated templates specially. * pt.c (instantiate_decl): Add sanity check. PR c++/24389 * g++.dg/template/static21.C: New test. * g++.dg/template/static21-a.cc: Likewise.
2005-10-16 PR c++/22173mmitchel
* typeck.c (check_template_keyword): Fix thinko.
2005-10-16 PR c++/22173mmitchel
* decl.c (check_template_keyword): Fix thinko.
2005-10-162005-10-16 Andrew Pinski <pinskia@physics.uc.edu>pinskia
PR c++/23959 * decl.c (pop_switch): Only call c_do_switch_warnings when not processing templates. 2005-10-16 Andrew Pinski <pinskia@physics.uc.edu> PR c++/23959 * g++.dg/warn/Wswitch-default-1.C: New test. * g++.dg/warn/Wswitch-default-2.C: New test.
2005-10-16Correct PR#mmitchel
2005-10-16 PR c++/22137mmitchel
* cp-tree.h (QUALIFIED_NAME_IS_TEMPLATE): New macro. (check_template_keyword): New function. (finish_id_expression): Change prototoype. (finish_qualified_id_expr): Change prototype. (build_qualified_name): New function. (finish_class_member_access_expr): Change prototype. * init.c (build_offset_ref): Use build_qualified_name. * mangle.c (write_expression): Likewise. * parser.c (cp_parser_primary_expression): Remove qualifying_class parameter. Add address_p and template_arg_p. Use build_qualified_name. (cp_parser_id_expression): Default *template_p to template_keyword_p. Check for invalid uses of the template keyword. (cp_parser_postfix_expression): Eliminate special handling for qualified names. Adjust call to cp_parser_primary_expression. (cp_parser_postfix_dot_deref_expression): Adjust call to cp_parser_id_expression and finish_class_member_access_expr. (cp_parser_template_argument_list): Add comment. (cp_parser_template_argument): Adjust use of cp_parser_primary_expression. Remove call to finish_qualified_id_expr. (cp_parser_lookup_name): Use build_qualified_name. * pt.c (tsubst): Use build_qualified_name. (tsubst_qualified_id): Likewise. Adjust call to finish_qualified_id_expr. (tsubst_copy): Use build_qualified_name. (tsubst_copy_and_build): Adjusts call to finish_id_expression and finish_class_member_access_expr. * semantics.c (finish_non_static_data_member): Use build_qualified_name. (finish_qualified_id_expr): Add template_p and template_arg_p parameters. (finish_id_expression): Remove qualifiying_class parameter. Add template_p, done, address_p, and template_arg_p. Use build_qualified_name. Adjust calls to finish_class_member_acess_expr. * tree.c (build_qualified_name): New function. * typeck.c (check_template_keyword): New function. (finish_class_member_access_expr): Add template_p argument. Check for invalid uses of the template keyword. PR c++/22137 * g++.dg/parse/template18.C: New test. * g++.dg/template/nontype15.C: Likewise.
2005-10-15 PR c++/21347mmitchel
* class.c (maybe_warn_about_overly_private_class): Lazy constructors are public. PR c++/21347 * g++.dg/warn/Wctor-dtor.C: New test.
2005-10-14 PR c++/19565mmitchel
* g++.dg/warn/Wconversion1.C: New test. * g++.dg/ext/packed4.C: Compile with -w. * g++.dg/opt/20050511-1.C: Likewise. * g++.old-deja/g++.other/warn4.C: Compiler with -Wconversion.
2005-10-14 PR c++/17796nathan
* optimize.c (update_cloned_parm): Add FIRST parameter. Use it. (maybe_clone_body): Track the first clone.
2005-10-14cp:nathan
PR c++/23984 * class.c (build_base_path): The vtable is always the first thing in the vtt. testsuite: PR c++/23984 * g++.dg/init/ctor7.C: New.
2005-10-13 PR c++/20721mmitchel
* cp-tree.h (DECL_NONTRIVIALLY_INITIALIZED_P): New macro. * decl.c (duplicate_decls): Merge it into new declarations. (decl_jump_unsafe): Use it, rather than DECL_INITIAL. (cp_finish_decl): Set it, when appropriate. PR c++/20721 * g++.dg/init/goto2.C: New test.
2005-10-13 PR c++/22464mmitchel
* semantics.c (finish_id_expression): Issue errors about uses of local variables in containing functions even in templates. PR c++/22180 * call.c (build_new_method_call): Correct pretty-printing of destructor names. * pt.c (tsubst_qualified_id): Recognize invalid uses of "~T" as an identifier. PR c++/23694 * decl.c (start_method): Return error_mark_node for errors. PR c++/23307 * pt.c (push_template_decl_real): Complain about attempts to declare template variables. PR c++/22352 * pt.c (tsubst_template_parms): Set processing_template_decl while processing the parameters. (tsubst_decl): Set processing_template_decl when substituting into a TEMPLATE_DECL. PR c++/22405 * pt.c (most_specialized_instantiation): Robustify. PR c++/22464 * g++.dg/template/crash/41.C: New test. PR c++/22180 * g++.dg/template/crash40.C: New test. PR c++/23694 * g++.dg/parse/friend5.C: New test. PR c++/23307 * g++.dg/template/crash38.C: New test. PR c++/22352 * g++.dg/template/friend38.C: New test. PR c++/22405 * g++.dg/template/crash39.C: New test.
2005-10-12 PR middle-end/21275dannysmith
PR middle-end/21766 * target.h (struct gcc_target): Add valid_dllimport_attribute_p target hook. (struct cxx): Add adjust_class_at_definition target hook. * target-def.h: (TARGET_VALID_DLLIMPORT_ATTRIBUTE_P): New define, defaulting to hook_bool_tree_true. Add to TARGET_INITIALIZER (TARGET_CXX_ADJUST_CLASS_AT_DEFINITION): New define, defaulting to hook_void_tree. Add to TARGET_CXX. * tree.h (struct decl_with_vis): Rename non_addr_const_p field to dllimport_flag. (DECL_NON_ADDR_CONSTANT_P): Replace with DECL_DLLIMPORT_P macro. * tree.c (merge_dllimport_decl_attributes): Check DECL_DLLIMPORT_P instead of attribute. Check for dllexport override. Warn if inconsistent dll linkage. Don't lose old dllimport if decl has had address referenced. Tweak lookup of dllimport atribute. (handle_dll_attribute): Check targetm.valid_dllimport_attribute_p for target specific rules. Don't add dllimport attribute if DECL_DECLARED_INLINE_P. Set DECL_DLLIMPORT_P when adding dllimport attribute. (staticp): Replace DECL_NON_ADDR_CONSTANT_P with DECL_DLLIMPORT_P. * varasm.c (initializer_constant_valid_p): Replace DECL_NON_ADDR_CONSTANT_P with DECL_DLLIMPORT_P PR target/21801 PR target/23589 * config.gcc (i[34567]86-*-cygwin*): Add winnt-cxx.o to 'cxx_target_objs', winnt-stubs,o to 'extra_objs'. (i[34567]86-*-mingw32*): Likewise. * doc/tm.texi (TARGET_CXX_ADJUST_CLASS_AT_DEFINITION): Document. (TARGET_VALID_DLLIMPORT_ATTRIBUTE_P): Document. * config/i386/winnt.c (i386_pe_dllimport_p): Factor out C++-specific code. Change return value to bool. (i386_pe_dllimport_p): Likewise. (associated_type): Simplify and make language-independent (i386_pe_encode_section_info): Replace override of ambiguous dllimport symbol refs with a gcc_assert. (i386_pe_valid_dllimport_attribute_p): Define. * config/i386/winnt-cxx.c: New file. Define C++ versions of i386_pe_type_dllimport_p, i386_pe_type_dllexport_p, i386_pe_adjust_class_at_definition. * config/i386/winnt-stubs.c: New file. Define stub versions of lang-specific functions. * config/i386/i386-protos.h: Declare winnt-[cxx|stubs].c functions i386_pe_type_dllimport_p, i386_pe_type_dllexport_p, i386_pe_adjust_class_at_definition. (i386_pe_valid_dllimport_attribute_p): Declare. * config/i386/cygming.h (TARGET_VALID_DLLIMPORT_ATTRIBUTE_P): Define. (TARGET_CXX_ADJUST_CLASS_AT_DEFINITION): Define. * config/i386/t-cygming: Add rules for winnt-cxx.o, winnt-stubs.o. PR target/19704 * config/i386/i386.c (ix86_function_ok_for_sibcall): Replace test for dllimport attribute with test of DECL_DLLIMPORT_P. cp PR target/21801 PR target/23589 * class.c (finish_struct_1): Call targetm.cxx.adjust_class_at_definition. testsuite * gcc.dg/dll-2.c: Add tests for warnings. * gcc.dg/dll-3.c: Likewise. * gcc.dg/dll-4.c: Likewise. * g++.dg/ext/dllimport1.C: Adjust tests for warnings. * g++.dg/ext/dllimport2.C: Likewise. * g++.dg/ext/dllimport3.C: Likewise. * g++.dg/ext/dllimport7.C: Likewise. * g++.dg/ext/dllimport8.C: Likewise. * g++.dg/ext/dllimport9.C: Likewise.
2005-10-12cp:nathan
PR c++/21592 * pt.c (build_non_dependent_expr): Don't wrap a COMPONENT_REF with already looked up member functions. Assert we're not returning a NON_DEPENDENT_EXPR with unknown type. * typeck.c (finish_class_member_access_expr): We can get non-template-id-expr baselinks. If the lookup finds a baselink, remember it even inside templates. testsuite: PR c++/21592 * g++.dg/template/dependent-expr1.C: Add new expected error. * g++.dg/template/dependent-expr2.C: Adjust error text. * g++.dg/template/overload6.C: New.
2005-10-12cp:nathan
PR c++/23797 * parser.c (cp_parser_functional_cast): Cope when TYPE is not a TYPE_DECL. Use dependent_type_p to check type. * pt.c (uses_template_parms_p): Use dependent_type_p for a TYPE_DECL. (type_dependent_expression_p): Assert we've not been given a TYPE_DECL. testsuite: PR c++/23797 * g++.dg/other/typename8.C: New.
2005-10-12cp:nathan
PR c++/21117 * decl.c (check_function_type): Correctly overwrite incomplete return type with void type. * typeck.c (check_return_expr): If the function's return type is void, don't try and convert a return expr. testsuite: PR c++/21117 * g++.dg/other/return1.C: New.
2005-10-12 PR c++/23730dje
* call.c (build_object_call): If BINFO is NULL, bypass lookup_fnfields and set fns to NULL_TREE.
2005-10-12==> cp/ChangeLog <==bonzini
2005-10-12 Paolo Bonzini <bonzini@gnu.org> PR c++/24052 * error.c (dump_expr): Pass LABEL_DECL to dump_decl. Print an ADDR_EXPR of a LABEL_DECL as &&. ==> testsuite/ChangeLog <== 2005-10-12 Paolo Bonzini <bonzini@gnu.org> PR c++/24052 * g++.dg/ext/label5.C: New.
2005-10-12 PR c++/19964nathan
* stor-layout.c (place_field): Set DECL_FIELD_OFFSET and DECL_FIELD_BIT_OFFSET of FIELD_DECLs, even if they have an invalid type. cp: PR c++/19964 * cp/class.c (walk_subobject_offsets): Don't walk error_mark_node. testsuite: PR c++/19964 * g++.dg/parse/crash31.C: New.
2005-10-11cp/ian
PR c++/8057 * cvt.c (convert_to_void): Don't warn about unused values when processing a template declaration. testsuite/ PR c++/8057 * g++.dg/warn/noeffect7.C: New test. * g++.dg/warn/noeffect2.C: Instantiate templates. * g++.dg/warn/noeffect4.C: Instantiate template. Add new error and warning.
2005-10-11 PR c++/21089mmitchel
* call.c (convert_like_real): Use decl_constant_value, not integral_constant_value. * init.c (constant_value_1): New function. (integral_constant_value): Use it. (decl_constant_value): Likewise. * typeck.c (decay_conversion): Use decl_constant_value, not integral_constant_value. PR c++/21089 * g++.dg/init/float1.C: New test.
2005-10-11 PR c++/21369mmitchel
* parser.c (cp_parser_elaborated_type_specifier): Don't treat class types as templates if the type is not appearing as part of a type definition or declaration. PR c++/21369 * g++.dg/parse/ret-type3.C: New test.
2005-10-11 PR c++/24302mmitchel
* toplev.c (check_global_declaration_1): Robustify. PR c++/24302 * g++.dg/warn/Wunused-12.C: New test.
2005-10-10 Mark Mitchell <mark@codesourcery.com>mmitchel
PR c++/23437 * parser.c (cp_parser_template_argument_list): Do not treat contents of argument list as part of a constant expression. PR c++/23437 * g++.dg/template/arg4.C: New test.
2005-10-10 PR c++/24139mmitchel
* decl.c (grokdeclarator): Do not require template parameter lists for explicitly specialized class. * error.c (dump_aggr_type): Do not dump template arguments for non-primary specializations. (dump_function_name): Likewise. PR c++/24139 * g++.dg/template/spec27.C: New test.
2005-10-082005-10-08 James A. Morrison <phython@gcc.gnu.org>phython
PR c++/22172 * parser.c (cp_parser_postfix_expression) <RID_TYPENAME>: Treat nontype scopes as nondependent.
2005-10-06 * call.c (resolve_args): Remove redundant test.reichelt
2005-10-052005-10-05 Paolo Bonzini <bonzini@gnu.org>bonzini
PR tree-optimization/21419 PR tree-optimization/24146 PR tree-optimization/24151 * c-typeck.c (readonly_error): Handle USE being lv_asm. (build_asm_expr): Call it if outputs are read-only. * gimplify.c (gimplify_asm_expr): Remove former fix to PR 21419. cp: 2005-10-05 Paolo Bonzini <bonzini@gnu.org> PR tree-optimization/21419 PR tree-optimization/24146 PR tree-optimization/24151 * semantics.c (finish_asm_stmt): Call readonly_error if outputs are read-only. Set ASM_VOLATILE_P for asms without outputs. testsuite: 2005-10-05 Paolo Bonzini <bonzini@gnu.org> PR tree-optimization/21419 PR tree-optimization/24146 PR tree-optimization/24151 * g++.dg/ext/asm7.C: New. * g++.dg/ext/asm8.C: New. * gcc.dg/asm-1.c: Compile on all targets. * gcc.dg/asm-pr24146.c: New. * gcc.dg/pr21419.c: Adjust error messages.
2005-10-05cp:nathan
PR c++/23513 * call.c (joust): Adjust length count to more_specialized_fn. * pt.c (more_specialized_fn): Cope with non-static member vs non-member. testsuite: PR c++/23513 * g++.dg/template/spec22.C: Robustify test. * g++.dg/template/spec26.C: New.
2005-10-042005-10-04 Andrew Pinski <pinskia@physics.uc.edu>pinskia
PR middle-end/23125 * decl.c (make_rtl_for_nonlocal_decl): Use set_user_assembler_name instead of change_decl_assembler_name. 2005-10-04 Andrew Pinski <pinskia@physics.uc.edu> PR middle-end/23125 * c-decl.c (finish_decl): Use set_user_assembler_name even for register variables. * varasm.c (make_decl_rtl): If a register variable does not have a set user assmbler name, error out. Decode the asmspec is now name+1 bypassing '*'. 2005-10-04 Andrew Pinski <pinskia@physics.uc.edu> PR middle-end/23125 * gcc.dg/register-var-3.c: New test.
2005-10-04gcc/cp/ChangeLog:aoliva
* error.c (dump_type) <UNKNOWN_TYPE>: Print reworded message. gcc/testsuite/ChangeLog: * g++.dg/overload/unknown1.C: New.
2005-10-03 PR c++/17775mmitchel
* repo.c: Include flags.h. (finish_repo): Add -frandom-seed to the arguments. PR c++/17775 * g++.dg/template/repo4.C: New test.
2005-10-03Fix typo in ChangeLogmmitchel
2005-10-02 PR c++/22621mmitchel
* parser.c (cp_parser_template_argument): Don't turn "T::f" into "(*this).T::f". * pt.c (convert_nontype_argument): Remove ??? comment. PR c++/22621 * g++.dg/template/overload5.C : New test.
2005-10-02 PR c++/23840mmitchel
* tree.c (lvalue_p1): A VA_ARG_EXPR with class type is an lvalue, when class rvalues are lvalues. PR c++/23840 * g++.dg/expr/stdarg1.C: New test.