aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
AgeCommit message (Collapse)AuthorFilesLines
2012-03-05re PR c++/51930 (Explicitly instantiated template gets hidden visibility)Jason Merrill3-18/+43
PR c++/51930 * decl2.c (determine_visibility): Correct calculation of class args depth. * decl.c (check_tag_decl): Adjust warning. From-SVN: r184946
2012-03-05method.c (synthesized_method_walk): Cleanups don't affect the EH spec either.Jason Merrill2-2/+10
* method.c (synthesized_method_walk): Cleanups don't affect the EH spec either. From-SVN: r184945
2012-03-03* init.c (perform_member_init): Cope with uninstantiated NSDMI.Jason Merrill2-0/+8
From-SVN: r184877
2012-03-03Core 1270Jason Merrill3-1/+15
Core 1270 * call.c (build_aggr_conv): Call reshape_init. (convert_like_real): Likewise. * typeck2.c (process_init_constructor): Clear TREE_CONSTANT if not all constant. From-SVN: r184876
2012-03-03mangle.c (write_nested_name): Use decl_mangling_context.Jason Merrill2-3/+6
* mangle.c (write_nested_name): Use decl_mangling_context. (write_prefix, write_template_prefix): Likewise. From-SVN: r184875
2012-03-03re PR c++/36797 (ICE mangling __is_empty)Jason Merrill2-1/+14
PR c++/36797 * mangle.c (write_expression): Improve diagnostic for TRAIT_EXPR. From-SVN: r184874
2012-03-03class.c (add_method): Always build an OVERLOAD for using-decls.Jason Merrill3-7/+19
* class.c (add_method): Always build an OVERLOAD for using-decls. * search.c (lookup_member): Handle getting an OVERLOAD for a single function. From-SVN: r184873
2012-03-02re PR c++/51989 (std::deque::iterator recognised as container)Paolo Carlini5-12/+27
/cp 2012-03-02 Paolo Carlini <paolo.carlini@oracle.com> PR c++/51989 * typeck2.c (build_x_arrow): Take a tsubst_flags_t argument and propagate it. * cp-tree.h (build_x_arrow): Adjust prototype. * pt.c (tsubst_copy_and_build): Adjust call. * parser.c (cp_parser_postfix_dot_deref_expression): Likewise. /testsuite 2012-03-02 Paolo Carlini <paolo.carlini@oracle.com> PR c++/51989 * g++.dg/cpp0x/sfinae32.C: New. From-SVN: r184796
2012-03-02name-lookup.c (binding_to_template_parms_of_scope_p): Clean up.Paolo Carlini2-9/+10
2012-03-02 Paolo Carlini <paolo.carlini@oracle.com> * name-lookup.c (binding_to_template_parms_of_scope_p): Clean up. From-SVN: r184792
2012-03-01re PR c++/51930 (Explicitly instantiated template gets hidden visibility)Jason Merrill3-11/+20
PR c++/51930 * decl.c (check_tag_decl): Move warning for misplaced attributes here. (shadow_tag): From here. * parser.c (cp_parser_explicit_instantiation): Don't warn here. From-SVN: r184753
2012-02-21re PR c++/52312 (grokfndecl: valgrind problem)Jakub Jelinek2-3/+9
PR c++/52312 * typeck.c (check_literal_operator_args): Initialize *long_double_p and *long_long_unsigned_p even if processing_template_decl. From-SVN: r184416
2012-02-17re PR c++/52248 (timevar ICE)Jason Merrill2-2/+7
PR c++/52248 * decl.c (define_label): Use timevar_cond_start/stop. From-SVN: r184329
2012-02-17re PR c++/52126 (compilation error)Fabien Chêne2-1/+7
gcc/testsuite/ChangeLog 2012-02-16 Fabien Chene <fabien@gcc.gnu.org> PR c++/52126 * g++.dg/template/using21.C: New. * g++.dg/template/using22.C: Likewise. gcc/cp/ChangeLog 2012-02-16 Fabien Chene <fabien@gcc.gnu.org> PR c++/52126 * decl.c (xref_basetypes): call dependent_scope_p instead of dependent_type_p. From-SVN: r184328
2012-02-16re PR c++/51415 (Broken diagnostic: 'vec_init_expr' not supported by dump_expr)Jason Merrill2-0/+7
PR c++/51415 * error.c (dump_expr): Handle lambda closures specifically. From-SVN: r184314
2012-02-14parser.c (cp_parser_explicit_instantiation): Give a warning for ignored ↵Jason Merrill2-0/+8
attributes on explicit class instantiation. * parser.c (cp_parser_explicit_instantiation): Give a warning for ignored attributes on explicit class instantiation. From-SVN: r184254
2012-02-14re PR c++/52247 (ICE with asm goto)Jakub Jelinek2-2/+17
PR c++/52247 * pt.c (tsubst_copy_asm_operands): For LABEL_DECL values call lookup_label on label's name and set TREE_USED. * g++.dg/template/asmgoto1.C: New test. From-SVN: r184229
2012-02-14re PR c++/39055 ([DR 1443][4.4/4.5/4.6/4.7 regression] questionable default ↵Jason Merrill2-3/+12
parameter of a member function accepted) PR c++/39055 * decl.c (local_variable_p_walkfn): Don't check DECL_ARTIFICIAL. From-SVN: r184199
2012-02-14re PR c/52181 (merge_decls doesn't handle DECL_USER_ALIGN properly)Jakub Jelinek2-2/+13
PR c/52181 * c-decl.c (merge_decls): Copy DECL_USER_ALIGN bit from olddecl to newdecl. * decl.c (duplicate_decls): If olddecl has bigger DECL_ALIGN than newdecl, copy DECL_ALIGN to newdecl and or DECL_USER_ALIGN bits. * c-c++-common/pr52181.c: New test. From-SVN: r184193
2012-02-08re PR c++/51675 ([C++11][4.7 Regression] Cannot create constexpr unions)Jason Merrill2-4/+23
PR c++/51675 * semantics.c (cx_check_missing_mem_inits): Handle unions. Fix constexpr default constructor logic. From-SVN: r184001
2012-02-08re PR c++/52035 (internal compiler error: tree code ‘template_type_parm’ ↵Jason Merrill2-1/+8
is not supported in LTO streams) PR c++/52035 * pt.c (tsubst): Strip uninstantiated typedef. From-SVN: r184000
2012-02-06re PR c++/52088 (ICE in "delete" with template convertion operator)Jason Merrill2-0/+16
PR c++/52088 * cvt.c (build_expr_type_conversion): Check for template conversion. From-SVN: r183940
2012-01-31re PR c++/52043 ([C++0x] ICE: SIGSEGV in tsubst_copy (pt.c:12081) with ↵Jason Merrill3-1/+15
-Wreturn-type) PR c++/52043 * cp-tree.h (PACK_EXPANSION_LOCAL_P): New. * pt.c (make_pack_expansion, tsubst_initializer_list): Set it. (tsubst_pack_expansion): Check it. From-SVN: r183768
2012-01-30Revert "PR c++/51641 - Lookup finds enclosing class member instead of ↵Dodji Seketeli4-51/+42
template parameter" This reverts commit r183726 From-SVN: r183728
2012-01-30PR c++/51641 - Lookup finds enclosing class member instead of template parameterDodji Seketeli4-42/+51
gcc/cp/ PR c++/51641 * cp-tree.h (template_type_parameter_p): Declare new function. (parameter_of_template_p): Remove * pt.c (template_type_parameter_p): Define new function. (parameter_of_template_p): Remove. * name-lookup.c (binding_to_template_parms_of_scope_p): Don't rely on parameter_of_template_p anymore. Compare the level of the template parameter to the depth of the template. gcc/testsuite/ PR c++/51641 * g++.dg/lookup/hidden-class17.C: New test. From-SVN: r183726
2012-01-29re PR c++/51327 ([c++0x] [4.7 Regression] ICE with invalid constexpr parameter)Paolo Carlini1-0/+6
/cp 2012-01-29 Paolo Carlini <paolo.carlini@oracle.com> PR c++/51327 * class.c (explain_non_literal_class): Correctly handle implicitly deleted constructors. /testsuite 2012-01-29 Paolo Carlini <paolo.carlini@oracle.com> PR c++/51327 * g++.dg/cpp0x/constexpr-ice6.C: New. From-SVN: r183685
2012-01-29re PR c++/51327 ([c++0x] [4.7 Regression] ICE with invalid constexpr parameter)Paolo Carlini1-1/+21
/cp 2012-01-29 Paolo Carlini <paolo.carlini@oracle.com> PR c++/51327 * class.c (explain_non_literal_class): Correctly handle implicitly deleted constructors. /testsuite 2012-01-29 Paolo Carlini <paolo.carlini@oracle.com> PR c++/51327 * g++.dg/cpp0x/constexpr-ice6.C: New. From-SVN: r183684
2012-01-27re PR c++/51852 ([c++11] tree check: expected tree_list, have ↵Jakub Jelinek2-1/+8
HßèMÕþÿøtxøtsø) PR c++/51852 * pt.c (tsubst_pack_expansion): Delete and restore local_specialization whenever need_local_specialization, not just when saved_local_specializations is non-NULL. * g++.dg/other/gc5.C: New test. From-SVN: r183637
2012-01-27re PR c++/51370 (ICE with invalid template parameter)Paolo Carlini2-4/+13
/cp 2012-01-26 Paolo Carlini <paolo.carlini@oracle.com> PR c++/51370 * error.c (dump_decl, [TEMPLATE_ID_EXPR]): Handle error_mark_node as TREE_OPERAND (t, 1). /testsuite 2012-01-26 Paolo Carlini <paolo.carlini@oracle.com> PR c++/51370 * g++.dg/template/crash112.C: New. From-SVN: r183593
2012-01-24re PR c++/51917 (g++.old-deja/g++.abi/vmihint.C FAILs)Jason Merrill2-2/+5
PR c++/51917 * decl.c (xref_basetypes): Check VEC_length instead of VEC_space. From-SVN: r183509
2012-01-24re PR c++/51973 ([C++11] Template parameter deduction fails for overloaded ↵Jason Merrill2-22/+42
functions when template parameters have defaulted arguments) PR c++/51973 * tree.c (called_fns_equal): Check template args. (cp_tree_equal): Call it. From-SVN: r183487
2012-01-24+ PR c++/51928 + * class.c (set_method_tm_attributes): Use TARGET_THUNK ↵Aldy Hernandez2-1/+13
instead... + PR c++/51928 + * class.c (set_method_tm_attributes): Use TARGET_THUNK instead of + thunk for set_one_vmethod_tm_attributes. Co-Authored-By: Patrick Marlier <patrick.marlier@gmail.com> From-SVN: r183478
2012-01-24re PR c++/51223 (ICE with invalid function parameter)Paolo Carlini2-3/+14
/cp 2012-01-24 Paolo Carlini <paolo.carlini@oracle.com> PR c++/51223 * call.c (build_over_call): Check for error_mark_node as TREE_VALUE when default arguments are processed. /testsuite 2012-01-24 Paolo Carlini <paolo.carlini@oracle.com> PR c++/51223 * g++.dg/parse/crash58.C: New. From-SVN: r183472
2012-01-23re PR c++/51930 (Explicitly instantiated template gets hidden visibility)Jason Merrill2-1/+13
PR c++/51930 * decl2.c (determine_visibility): Check for visibility attribute on template specialization. From-SVN: r183455
2012-01-23re PR c++/51398 (ICE with invalid template parameter)Paolo Carlini2-0/+8
/cp 2012-01-23 Paolo Carlini <paolo.carlini@oracle.com> PR c++/51398 * pt.c (parameter_of_template_p): Skip error_mark_node parameters. /testsuite 2012-01-23 Paolo Carlini <paolo.carlini@oracle.com> PR c++/51398 * g++.dg/template/crash111.C: New. From-SVN: r183445
2012-01-23re PR c++/51925 (ICE in tsubst with using and template function)Jason Merrill7-11/+40
PR c++/51925 * class.c (add_method): Set OVL_USED for using-decls. * tree.c (ovl_scope): New. * cp-tree.h: Declare it. * parser.c (cp_parser_template_name): Use it. * semantics.c (baselink_for_fns): Likewise. * name-lookup.c (set_inherited_value_binding_p): Likewise. From-SVN: r183438
2012-01-20re PR c++/51402 (ICE with invalid template parameter)Paolo Carlini2-1/+10
/cp 2012-01-20 Paolo Carlini <paolo.carlini@oracle.com> PR c++/51402 * pt.c (lookup_template_class_1): Check context returned by tsubst for error_mark_node. /testsuite 2012-01-20 Paolo Carlini <paolo.carlini@oracle.com> PR c++/51402 * g++.dg/template/crash110.C: New. From-SVN: r183345
2012-01-19re PR c++/51344 (cc1plus hangs when compiling)Kai Tietz2-2/+8
2012-01-19 Kai Tietz <ktietz@redhat.com> PR c++/51344 * decl2.c (save_template_attributes): Use merge_attributes instead of chaining up via TREE_CHAIN. 2012-01-19 Kai Tietz <ktietz@redhat.com> * g++.dg/torture/pr51344.C: New test. From-SVN: r183313
2012-01-19re PR c++/51889 (can't override a using-declaration in a template)Jason Merrill3-14/+18
PR c++/51889 * class.c (finish_struct): Call add_method here for function usings. * semantics.c (finish_member_declaration): Not here. From-SVN: r183304
2012-01-18re PR c++/51225 ([c++0x] [4.7 Regression] ICE with invalid template parameter)Paolo Carlini3-2/+18
/cp 2012-01-18 Paolo Carlini <paolo.carlini@oracle.com> PR c++/51225 * typeck2.c (store_init_value): Within a template guard cxx_constant_value with require_potential_constant_expression. * pt.c (convert_nontype_argument): Likewise. /testsuite 2012-01-18 Paolo Carlini <paolo.carlini@oracle.com> PR c++/51225 * g++.dg/cpp0x/pr51225.C: New. From-SVN: r183286
2012-01-16re PR c++/51854 (ICE in mangle.c with literal of complex floating type)Jakub Jelinek2-0/+24
PR c++/51854 * mangle.c (write_template_arg_literal): Handle complex. From-SVN: r183222
2012-01-16re PR c++/51827 (Error: 'FOO' conflicts with a previous declaration, with ↵Jason Merrill2-1/+18
PCH/LTO/C++11) PR c++/51827 * mangle.c (mangle_decl): Don't mangle uninstantiated templates. From-SVN: r183221
2012-01-16re PR c++/51868 (Crash when generating the move constructor for a class with ↵Jason Merrill2-14/+27
a bit field) PR c++/51868 * typeck.c (build_static_cast_1): Handle bit-fields properly. From-SVN: r183218
2012-01-14re PR c++/50012 (C++ front end misses -Wsign-compare warnings when ↵Ian Lance Taylor3-32/+40
extraneous parentheses are present) gcc/: PR c++/50012 * tree.h (TYPE_QUALS): Add cast to int. (TYPE_QUALS_NO_ADDR_SPACE): Likewise. gcc/cp: PR c++/50012 * typeck.c (enum_cast_to_int): New static function. (cp_build_binary_op): When handling warn_sign_compare, don't test for TREE_NO_WARNING. Do call enum_cast_to_int. * call.c (avoid_sign_compare_warnings): Remove static function. (build_new_op_1): Don't call avoid_sign_compare_warnings. gcc/testsuite/: PR c++/50012 * g++.dg/warn/Wsign-compare-4.C: New. From-SVN: r183178
2012-01-13c-decl.c: Do not include tree-mudflap.hSteven Bosscher3-2/+5
gcc/ * c-decl.c: Do not include tree-mudflap.h * tree-optimize.c: Likewise. * Makefile.in: Update dependencies. cp/ * decl2.c: Do not include tree-mudflap.h * semantics.c: Likewise. From-SVN: r183165
2012-01-13re PR c++/20681 (wrong "control reaches" warning with switches)Jason Merrill2-0/+13
PR c++/20681 * semantics.c (finish_break_stmt): Avoid adding an unreachable BREAK_STMT. From-SVN: r183161
2012-01-13re PR c++/51813 (-fvisibility=hidden causes std::codecvt members to be ↵Jason Merrill2-0/+6
undefined) PR c++/51813 * decl2.c (constrain_visibility): Clear DECL_VISIBILITY_SPECIFIED when reducing the visibility. From-SVN: r183156
2012-01-13re PR c++/51620 ([c++0x] [4.6/4.7 Regression] ICE with private destructor)Jason Merrill2-0/+17
PR c++/51620 * class.c (build_vtbl_initializer): Use __cxa_deleted_virtual. From-SVN: r183155
2012-01-13re PR c++/51714 (internal compiler error: Segmentation fault with -std=c++11)Jason Merrill2-0/+11
PR c++/51714 * pt.c (value_dependent_expression_p): Treat STMT_EXPR as value-dependent. From-SVN: r183149
2012-01-13PR c++/51633 - ICEs with constexpr constructorDodji Seketeli3-5/+14
gcc/cp/ PR c++/51633 * semantics.c (cp_parser_ctor_initializer_opt_and_function_body): Set the pointer to the last block of the constructor to the current statement. (build_constexpr_constructor_member_initializers): Get build_data_member_initialization a chance to deal with more statements before we choke. gcc/testsuite/ PR c++/51633 * g++.dg/cpp0x/constexpr-diag4.C: New test. From-SVN: r183144
2012-01-12re PR c++/48051 (sorry, unimplemented: mangling overload)Jason Merrill5-6/+31
PR c++/48051 * mangle.c (write_expression): Mangle BASELINK scope if BASELINK_QUALIFIED_P. * search.c (adjust_result_of_qualified_name_lookup): Set BASELINK_QUALIFIED_P. * tree.c (cp_tree_equal) [BASELINK]: Compare BASELINK_QUALIFIED_P. * parser.c (cp_parser_postfix_dot_deref_expression): Don't call adjust_result_of_qualified_name_lookup for non-qualified names. From-SVN: r183133