- 06 Aug, 2015 4 commits
-
-
PR c++/66533 * parser.c (cp_parser_primary_expression): Don't skip to the end of the statement if we're parsing tentatively. From-SVN: r226684
Jason Merrill committed -
re PR c++/67130 (ICE: tree check: expected identifier_node, have template_decl in write_unqualified_id, at cp/mangle.c:1218) PR c++/67130 PR c++/67131 PR c++/66260 * mangle.c (write_expression) [TEMPLATE_ID_EXPR]: Handle variable templates. * pt.c (tsubst_copy_and_build): Check for argument substitution failure. From-SVN: r226676
Jason Merrill committed -
* pt.c (determine_specialization): Print candidates after 'no match' error. From-SVN: r226653
Jason Merrill committed -
* decl.c (cp_finish_decl): Tidy. * typeck.c (finish_class_member_access_expr): Use type_dependent_expression_p. * semantics.c (finish_id_expression): Use type_dependent_expression_p. Don't build_qualified_name for a decl in non-dependent scope. * pt.c (type_dependent_expression_p): A TEMPLATE_ID_EXPR of an identifier is dependent. Remove variable_template_p check. From-SVN: r226652
Jason Merrill committed
-
- 05 Aug, 2015 2 commits
-
-
re PR c++/66260 ([C++14] Failure to compile variable template with recursively defined partial specialization) PR c++/66260 PR c++/66596 PR c++/66649 PR c++/66923 * pt.c (lookup_template_variable): Use NULL_TREE for type. (instantiate_template_1): Also set DECL_TI_ARGS based on the immediate parent. (tsubst_copy_and_build) [TEMPLATE_ID_EXPR]: Handle variable templates. (finish_template_variable): Add complain parm. * cp-tree.h: Adjust. From-SVN: r226642
Jason Merrill committed -
PR c++/65195 PR c++/66619 * semantics.c (finish_id_expression): Call convert_from_reference for variable template. From-SVN: r226641
Jason Merrill committed
-
- 04 Aug, 2015 2 commits
-
-
From-SVN: r226581
Jason Merrill committed -
From-SVN: r226580
Jason Merrill committed
-
- 02 Aug, 2015 2 commits
-
-
gcc/c-family/ChangeLog: * c-indentation.h (struct token_indent_info): Define. (get_token_indent_info): Define. (warn_for_misleading_information): Declare. * c-common.h (warn_for_misleading_information): Remove. * c-identation.c (warn_for_misleading_indentation): Change declaration to take three token_indent_infos. Adjust accordingly. * c-identation.c (should_warn_for_misleading_indentation): Likewise. Bail out early if the body is a compound statement. (guard_tinfo_to_string): Define. gcc/c/ChangeLog: * c-parser.c (c_parser_if_body): Take token_indent_info argument. Call warn_for_misleading_indentation even when the body is a semicolon. Extract token_indent_infos corresponding to the guard, body and next tokens. Adjust call to warn_for_misleading_indentation accordingly. (c_parser_else_body): Likewise. (c_parser_if_statement): Likewise. (c_parser_while_statement): Likewise. (c_parser_for_statement): Likewise. gcc/cp/ChangeLog: * parser.c (cp_parser_selection_statement): Move handling of semicolon body to ... (cp_parser_implicitly_scoped_statement): .. here. Call warn_for_misleading_indentation even when the body is a semicolon. Extract token_indent_infos corresponding to the guard, body and next tokens. Adjust call to warn_for_misleading_indentation accordingly. Take token_indent_info argument. (cp_parser_already_scoped_statement): Likewise. (cp_parser_selection_statement, cp_parser_iteration_statement): Extract a token_indent_info corresponding to the guard token. From-SVN: r226477
Patrick Palka committed -
re PR bootstrap/66521 (xgcc: cc1plus segfaults when compiling libstdc++-v3/src/c++11/ostream-inst.cc) Fix PR 66521 libvtv/ChangeLog 2015-08-01 Caroline Tice <cmtice@google.com> PR 66521 * Makefile.am: Update to match latest tree. * Makefile.in: Regenerate. * testsuite/lib/libvtv: Brought up to date. * vtv_malloc.cc (VTV_DEBUG): Update function call to match renamed function (old bug!). * vtv_rts.cc (debug_functions, debug_init, debug_verify_vtable): Update initializations to work correctly with VTV_DEBUG defined. gcc/ChangeLog: 2015-08-01 Caroline Tice <cmtice@google.com> PR 66521 * vtable-verify.c (vtbl_mangled_name_types, vtbl_mangled_name_ids): New global variables. (vtbl_find_mangled_name): New function. (vtbl_register_mangled_name): New function. (vtbl_map_get_node): If DECL_ASSEMBLER_NAME is "<anon>", look up mangled name in mangled name vectors. (find_or_create_vtbl_map_node): Ditto. (var_is_used_for_virtual_call_p): Add recursion_depth parameter; update recursion_depth on function entry; pass it to every recursive call; automatically exit if depth > 25 (give up looking at that point). (verify_bb_vtables): Initialize recursion_depth and pass it to var_is_used_for_virtual_call_p. * vtable-verify.h (vtbl_mangbled_name_types, vtbl_mangled_name_ids): New global variable decls. (vtbl_register_mangled_name): New extern function decl. gcc/cp/ChangeLog: 2015-08-01 Caroline Tice <cmtice@google.com> PR 66521 * mangle.c : Add vtable-verify.h to include files. (get_mangled_vtable_map_var_name): If the DECL_ASSEMBLER_NAME is "<anon>" get the real mangled name for the class instead, and also store the real mangled name in a vector for use later. From-SVN: r226471
Caroline Tice committed
-
- 31 Jul, 2015 1 commit
-
-
PR sanitizer/66977 * typeck.c (get_member_function_from_ptrfunc): Don't sanitize RSHIFT_EXPR. * g++.dg/ubsan/pr66977.C: New test. From-SVN: r226440
Marek Polacek committed
-
- 30 Jul, 2015 2 commits
-
-
class.c (check_for_override): Use DECL_SOURCE_LOCATION and "%qD" in warning_at instead of "%q+D" in warning. 2015-07-30 Paolo Carlini <paolo.carlini@oracle.com> * class.c (check_for_override): Use DECL_SOURCE_LOCATION and "%qD" in warning_at instead of "%q+D" in warning. (warn_hidden): Likewise but use location_of. (finish_struct_anon_r): Likewise use DECL_SOURCE_LOCATION in permerror. (check_bitfield_decl, check_field_decls): Likewise in warning_at. (check_field_decls): Likewise for permerror. (explain_non_literal_class): Likewise for inform. (check_bases_and_members, layout_class_type): Likewise for warning_at. (note_name_declared_in_class): Use location_of in permerror. * name-lookup.c (diagnose_name_conflict): Use location_of in inform. (pushdecl_maybe_friend_1): Use DECL_SOURCE_LOCATION in pedwarn, inform, and warning_at. (check_for_out_of_scope_variable): Likewise for warning_at and permerror. From-SVN: r226394
Paolo Carlini committed -
DR 1558 PR c++/67021 * pt.c (tsubst_decl) [TYPE_DECL]: Clear TYPE_DEPENDENT_P_VALID. From-SVN: r226381
Jason Merrill committed
-
- 28 Jul, 2015 1 commit
-
-
call.c (build_op_delete_call, [...]): Use Use DECL_SOURCE_LOCATION and "%qD" in inform and pedwarn instead of "%q+D". 2015-07-28 Paolo Carlini <paolo.carlini@oracle.com> * call.c (build_op_delete_call, convert_like_real, build_over_call): Use Use DECL_SOURCE_LOCATION and "%qD" in inform and pedwarn instead of "%q+D". * constexpr.c (explain_invalid_constexpr_fn): Likewise. * decl.c (duplicate_decls): Likewise for warning/warning_at. * except.c (maybe_noexcept_warning): Likewise. * friend.c (make_friend_class): Likewise for inform. * mangle.c (mangle_decl): Likewise for warning/warning_at. * method.c (process_subob_fn, walk_field_subobs, maybe_explain_implicit_delete): Likewise for inform. * parser.c (cp_parser_lambda_introducer): Likewise. * pt.c (check_specialization_namespace, maybe_process_partial_specialization): Likewise for permerror. (redeclare_class_template): Likewise for inform_n. (coerce_template_parms, tsubst_copy_and_build): Likewise for inform. * search.c (check_final_overrider): Likewise. * semantics.c (process_outer_var_ref): Likewise. From-SVN: r226308
Paolo Carlini committed
-
- 27 Jul, 2015 2 commits
-
-
* constexpr.c (cxx_eval_call_expression): Don't add this call to the hash table if !depth_ok. From-SVN: r226256
Jason Merrill committed -
PR c++/66555 PR c/54979 * c-common.c (find_array_ref_with_const_idx_r): New function. (warn_tautological_cmp): New function. * c-common.h (warn_tautological_cmp): Declare. * c.opt (Wtautological-compare): New option. * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp. * call.c (build_new_op_1): Call warn_tautological_cmp. * pt.c (tsubst_copy_and_build): Use sentinel to suppress tautological compare warnings. * doc/invoke.texi: Document -Wtautological-compare. * c-c++-common/Wtautological-compare-1.c: New test. From-SVN: r226242
Marek Polacek committed
-
- 26 Jul, 2015 2 commits
-
-
gcc/cp/ChangeLog: PR c++/18969 * typeck.c (check_return_expr): Also do the basic return-value validity checking if processing_template_decl and yet types are not dependent. Remove obsolete code. gcc/testsuite/ChangeLog: PR c++/18969 * g++.dg/template/pr18969.C: New test. * g++.dg/template/pr18969-2.C: New test. * g++.old-deja/g++.jason/overload.C: Remove return value in template function returning void. From-SVN: r226236
Patrick Palka committed -
decl.c (poplevel): Use Use DECL_SOURCE_LOCATION and "%qD" in warning_at instead of "%q+D" in warning. 2015-07-26 Paolo Carlini <paolo.carlini@oracle.com> * decl.c (poplevel): Use Use DECL_SOURCE_LOCATION and "%qD" in warning_at instead of "%q+D" in warning. (warn_extern_redeclared_static): Likewise for inform. (check_redeclaration_no_default_args): Likewise for permerror. (duplicate_decls): Likewise. (check_previous_goto_1): Likewise for inform. (check_goto, start_decl, check_for_uninitialized_const_var, start_preparsed_function, finish_function§): Likewise. * decl2.c (build_anon_union_vars, c_parse_final_cleanups): Likewise. * init.c (sort_mem_initializers): Likewise. * typeck.c (convert_for_initialization): Likewise for inform. (maybe_warn_about_returning_address_of_local): Likewise. * typeck2.c (abstract_virtuals_error_sfinae): Likewise for inform. (cxx_incomplete_type_diagnostic): Likewise for emit_diagnostic. From-SVN: r226234
Paolo Carlini committed
-
- 25 Jul, 2015 3 commits
-
-
Fix PR c++/66857 gcc/cp/ChangeLog: PR c++/66857 * cvt.c (ocp_convert): Don't call scalar_constant_value when converting to a class type. gcc/testsuite/ChangeLog: PR c++/66857 * g++.dg/init/pr66857.C: New test. From-SVN: r226228
Patrick Palka committed -
PR c++/64969 * pt.c (splice_late_return_type): Correct deduced return type for abbreviated function template. From-SVN: r226208
Jason Merrill committed -
PR c++/64989 * pt.c (splice_late_return_type): Correct deduced return type for abbreviated function template. From-SVN: r226207
Jason Merrill committed
-
- 24 Jul, 2015 1 commit
-
-
2015-07-24 Richard Biener <rguenther@suse.de> * fold-const.c (maybe_canonicalize_comparison_1): Move A code CST canonicalization ... * match.pd: ... to a pattern here. cp/ * init.c (build_vec_init): Build iterator bound in the same type as the iterator. From-SVN: r226143
Richard Biener committed
-
- 23 Jul, 2015 2 commits
-
-
PR c++/66572 * pt.c (tsubst_copy_and_build): Add warn_logical_op sentinel. * g++.dg/warn/Wlogical-op-2.C: New test. From-SVN: r226120
Marek Polacek committed -
/cp 2015-07-23 Paolo Carlini <paolo.carlini@oracle.com> PR c++/52987 * parser.c (cp_parser_simple_declaration): Robustify check avoiding redundant error messages. /testsuite 2015-07-23 Paolo Carlini <paolo.carlini@oracle.com> PR c++/52987 * g++.dg/parse/error57.C: New. * g++.dg/expr/string-2.C: Update. From-SVN: r226097
Paolo Carlini committed
-
- 21 Jul, 2015 1 commit
-
-
/cp 2015-07-21 Paolo Carlini <paolo.carlini@oracle.com> * decl.c (grokdeclarator): For an erroneous template parameter propagate error_mark_node as type. /testsuite 2015-07-21 Paolo Carlini <paolo.carlini@oracle.com> * g++.dg/template/crash81.C: Update. From-SVN: r226054
Paolo Carlini committed
-
- 20 Jul, 2015 1 commit
-
-
PR c++/55095 * c-common.c (c_fully_fold_internal): Warn about left shift overflows. Use EXPR_LOC_OR_LOC. (maybe_warn_shift_overflow): New function. * c-common.h (maybe_warn_shift_overflow): Declare. * c-opts.c (c_common_post_options): Set warn_shift_overflow. * c.opt (Wshift-overflow): New option. * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init. (build_binary_op): Warn about left shift overflows. * typeck.c (cp_build_binary_op): Warn about left shift overflows. * doc/invoke.texi: Document -Wshift-overflow and -Wshift-overflow=. * c-c++-common/Wshift-overflow-1.c: New test. * c-c++-common/Wshift-overflow-2.c: New test. * c-c++-common/Wshift-overflow-3.c: New test. * c-c++-common/Wshift-overflow-4.c: New test. * c-c++-common/Wshift-overflow-5.c: New test. * g++.dg/cpp1y/left-shift-1.C: New test. * gcc.dg/c90-left-shift-2.c: New test. * gcc.dg/c90-left-shift-3.c: New test. * gcc.dg/c99-left-shift-2.c: New test. * gcc.dg/c99-left-shift-3.c: New test. * gcc.dg/pr40501.c: Use -Wno-shift-overflow. * gcc.c-torture/execute/pr40386.c: Likewise. * gcc.dg/vect/pr33373.c: Likewise. * gcc.dg/vect/vect-shift-2-big-array.c: Likewise. * gcc.dg/vect/vect-shift-2.c: Likewise. Co-Authored-By: Richard Sandiford <richard.sandiford@arm.com> From-SVN: r225998
Marek Polacek committed
-
- 15 Jul, 2015 2 commits
-
-
PR c++/65091 * parser.c (cp_parser_unqualified_id): Don't accept ~x in a template if there is no type x in scope. From-SVN: r225831
Jason Merrill committed -
re PR c++/66850 (Adding a forward declaration of a template containing a template template parm causes ICE on valid code) Fix PR c++/66850 gcc/cp/ChangeLog: PR c++/66850 * pt.c (redeclare_class_template): Set the DECL_CONTEXTs of each template template parm in the redeclaration. (lookup_template_class_1): Peel off irrelevant template levels from current_template_parms before augmenting the argument list. gcc/testsuite/ChangeLog: PR c++/66850 * g++.dg/template/pr66850.C: New test. From-SVN: r225801
Patrick Palka committed
-
- 14 Jul, 2015 3 commits
-
-
/cp 2015-07-14 Andrea Azzarone <azzaronea@gmail.com> PR c++/65071 * parser.c (cp_parser_sizeof_pack): Also consider template template parameters. /testsuite 2015-07-14 Andrea Azzarone <azzaronea@gmail.com> PR c++/65071 * g++.dg/cpp0x/vt-65071.C: New. From-SVN: r225793
Andrea Azzarone committed -
From-SVN: r225784
Jason Merrill committed -
/cp 2015-07-14 Paolo Carlini <paolo.carlini@oracle.com> * pt.c (check_template_shadow): Emit error + inform instead of two errors. /testsuite 2015-07-14 Paolo Carlini <paolo.carlini@oracle.com> * g++.dg/template/crash81.C: Adjust for error + inform change. * g++.dg/template/pr58878.C: Likewise. * g++.dg/template/shadow1.C: Likewise. * g++.dg/template/shadow2.C: Likewise. * g++.old-deja/g++.benjamin/tem03.C: Likewise. * g++.old-deja/g++.benjamin/tem04.C: Likewise. * g++.old-deja/g++.brendan/crash7.C: Likewise. * g++.old-deja/g++.pt/shadow2.C: Likewise. From-SVN: r225783
Paolo Carlini committed
-
- 13 Jul, 2015 2 commits
-
-
Fix PR c++/65186 gcc/cp/ChangeLog: PR c++/65186 * pt.c (invalid_nontype_parm_type_p): Accept a bound template template parm type under C++11 and later. gcc/testsuite/ChangeLog: PR c++/65186 * g++.dg/template/pr65186.C: New test. From-SVN: r225749
Patrick Palka committed -
From-SVN: r225726
Aldy Hernandez committed
-
- 10 Jul, 2015 6 commits
-
-
Fix PR c++/30044 gcc/cp/ChangeLog: PR c++/30044 * pt.c (begin_template_parm_list): Add a dummy parameter level to current_template_parms. (end_template_parm_list): Remove the dummy parameter level before adding the real one. (tsubst): Don't attempt to substitute for template parameters corresponding to a dummy argument level. (template_parms_to_args): Remove obsolete hack for giving template template arguments the proper level. (splite_late_return_type): Remove obsolete hack for giving template template arguments the proper level. * error.c (dump_template_decl): Don't print dummy template levels. gcc/testsuite/ChangeLog PR c++/30044 * g++.dg/cpp0x/auto46.C: New test. * g++.dg/template/pr30044.C: New test. * g++.dg/template/shadow2.C: New test. * g++.dg/template/error55.C: New test. * g++.dg/template/crash83.C: Accept any error string. * g++.dg/cpp0x/variadic18.C: Adjust to avoid shadowing template parameters. * g++.dg/cpp0x/variadic18.C: Likewise * g++.dg/template/canon-type-13.C: Likewise. * g++.old-deja/g++.pt/ttp42.C: Likewise. * g++.dg/torture/20070621-1.C: Likewise. From-SVN: r225706
Patrick Palka committed -
/cp 2015-07-10 Paolo Carlini <paolo.carlini@oracle.com> PR c++/54521 * call.c (convert_like_real): Do not set LOOKUP_ONLYCONVERTING for the second step of copy-initialization. /testsuite 2015-07-10 Paolo Carlini <paolo.carlini@oracle.com> PR c++/54521 * g++.dg/init/explicit3.C: New. From-SVN: r225705
Paolo Carlini committed -
From-SVN: r225693
Jason Merrill committed -
* pt.c (find_parameter_packs_r): Handle variable templates. (variable_template_specialization_p): New. * cp-tree.h: Declare it. From-SVN: r225692
Jason Merrill committed -
From-SVN: r225691
Jason Merrill committed -
c-family/ * c-ada-spec.h (cpp_operation): Revert latest change. * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit constructors and destructors. cp/ * decl2.c (cpp_check): Revert latest change. From-SVN: r225686
Eric Botcazou committed
-
- 09 Jul, 2015 1 commit
-
-
* pt.c (instantiation_dependent_r) [TRAIT_EXPR]: Call value_dependent_expression_p. From-SVN: r225622
Jason Merrill committed
-