1 2021-03-06 Tobias Burnus <tobias@codesourcery.com>
3 Backported from master:
4 2021-03-05 Tobias Burnus <tobias@codesourcery.com>
7 * parser.c (cp_parser_oacc_clause_async): Reject comma expressions.
9 2021-03-04 Jason Merrill <jason@redhat.com>
12 * pt.c (tsubst_copy) [VIEW_CONVERT_EXPR]: Add const
13 to a class non-type template argument that needs it.
15 2021-03-04 Jason Merrill <jason@redhat.com>
18 * call.c (build_temp): Wrap a CALL_EXPR in a TARGET_EXPR
19 if it didn't get one before.
21 2021-02-27 Jason Merrill <jason@redhat.com>
24 * parser.c (cp_parser_lambda_declarator_opt): Accept GNU attributes
27 2021-01-29 Jason Merrill <jason@redhat.com>
30 * tree.c (build_vec_init_expr): Don't call build_vec_init_elt
31 if we got a CONSTRUCTOR.
33 2020-12-16 Nathan Sidwell <nathan@acm.org>
35 * parser.c (cp_parser_elaborated_type_specifier): Test
36 BOUND_TEMPLATE_TEMPLATE_PARM before checking for instantiation.
38 2020-11-26 Thomas Schwinge <thomas@codesourcery.com>
40 Backported from master:
41 2020-11-26 Thomas Schwinge <thomas@codesourcery.com>
43 * parser.c (cp_parser_omp_var_list_no_open): Assert that array
44 section's 'low_bound', 'length' are not location wrapper nodes.
45 (cp_parser_oacc_all_clauses, cp_parser_oacc_cache): Instantiate
46 'auto_suppress_location_wrappers'.
48 2020-11-25 Thomas Schwinge <thomas@codesourcery.com>
50 Backported from master:
51 2020-11-25 Thomas Schwinge <thomas@codesourcery.com>
53 * pt.c (tsubst_omp_clauses): Handle 'OMP_CLAUSE__CACHE_'.
54 (tsubst_expr): Handle 'OACC_CACHE'.
56 2020-11-24 Jason Merrill <jason@redhat.com>
59 * class.c (lookup_vfn_in_binfo): New.
60 * call.c (build_over_call): Use it.
61 (build_new_method_call_1): Don't set LOOKUP_NONVIRTUAL.
62 * cp-tree.h (resolves_to_fixed_type_p): Add default argument.
63 (lookup_vfn_in_binfo): Declare.
65 2020-11-13 Patrick Palka <ppalka@redhat.com>
67 Backported from master:
68 2020-10-07 Patrick Palka <ppalka@redhat.com>
72 * tree.c (cp_tree_equal) <case ALIGNOF_EXPR>: Return false if
73 ALIGNOF_EXPR_STD_P differ.
75 2020-09-16 Jakub Jelinek <jakub@redhat.com>
77 Backported from master:
78 2020-09-03 Jakub Jelinek <jakub@redhat.com>
81 * constexpr.c (cxx_eval_outermost_constant_expr): Temporarily disable
82 flag_rounding_math during manifestly constant evaluation.
84 2020-09-16 Jakub Jelinek <jakub@redhat.com>
86 Backported from master:
87 2020-05-28 Jakub Jelinek <jakub@redhat.com>
90 * decl.c (cp_finish_decomp): Call complete_type before checking
93 2020-09-16 Jakub Jelinek <jakub@redhat.com>
95 Backported from master:
96 2020-05-07 Jakub Jelinek <jakub@redhat.com>
99 * typeck.c (cp_strict_aliasing_warning): New function.
100 (cp_build_indirect_ref_1, build_reinterpret_cast_1): Use
101 it instead of strict_aliasing_warning.
103 2020-09-16 Jakub Jelinek <jakub@redhat.com>
105 Backported from master:
106 2020-04-24 Jakub Jelinek <jakub@redhat.com>
109 * semantics.c (finish_call_expr): When looking if all overloads
110 are noreturn, use STRIP_TEMPLATE to look through TEMPLATE_DECLs.
112 2020-09-16 Jakub Jelinek <jakub@redhat.com>
114 Backported from master:
115 2020-04-16 Jakub Jelinek <jakub@redhat.com>
118 * parser.c (cp_parser_simple_declaration): Fix up a pasto in
121 2020-09-16 Jakub Jelinek <jakub@redhat.com>
123 Backported from master:
124 2020-04-08 Jakub Jelinek <jakub@redhat.com>
127 * decl.c (begin_destructor_body): For CLASSTYPE_VBASECLASSES class
128 dtors, if CLASSTYPE_PRIMARY_BINFO is non-NULL, but not BINFO_VIRTUAL_P,
129 look at CLASSTYPE_PRIMARY_BINFO of its BINFO_TYPE if it is not
130 BINFO_VIRTUAL_P, and so on.
132 2020-06-16 Patrick Palka <ppalka@redhat.com>
135 * tree.c (zero_init_expr_p): Use uses_template_parms instead of
138 2020-06-11 Marek Polacek <polacek@redhat.com>
141 * cp-gimplify.c (cp_fold) <case MODIFY_EXPR>: Don't set
142 TREE_THIS_VOLATILE here.
143 (cp_fold): Set it here along with TREE_NO_WARNING.
145 2020-06-11 Marek Polacek <polacek@redhat.com>
148 * name-lookup.c (check_local_shadow): Check if types are
149 non-null before calling same_type_p.
151 2020-05-25 Jason Merrill <jason@redhat.com>
154 * constexpr.c (potential_constant_expression_1): In a lambda
155 function, consider a captured variable directly.
157 2020-05-25 Jason Merrill <jason@redhat.com>
160 * init.c (get_nsdmi): Don't push_to_top_level for a local class.
162 2020-05-25 Jason Merrill <jason@redhat.com>
165 * decl.c (cp_finish_decl): Also clear TREE_READONLY if
166 -fmerge-all-constants.
168 2020-05-25 Jason Merrill <jason@redhat.com>
171 * pt.c (tsubst_decl): Make sure DECL_VALUE_EXPR continues to have
172 the same type as the variable.
174 2020-05-06 Nathan Sidwell <nathan@acm.org>
177 * decl.c (grokdeclarator): Don't splice template attributes in
178 parm context -- they can apply to the parm.
180 2020-04-27 Jason Merrill <jason@redhat.com>
184 * decl.c (grokdeclarator): Move dependent attribute to decl.
185 * decl2.c (splice_template_attributes): No longer static.
187 2020-04-21 Martin Sebor <msebor@redhat.com>
188 Jason Merrill <jason@redhat.com>
191 * decl.c (reshape_init_array_1): Avoid stripping redundant trailing
193 * mangle.c (write_expression): ...and handle them here even for
194 pointers to members by calling zero_init_expr_p.
195 * cp-tree.h (zero_init_expr_p): Declare.
196 * tree.c (zero_init_expr_p): Define.
197 (type_initializer_zero_p): Remove.
198 * pt.c (tparm_obj_values): New hash_map.
199 (get_template_parm_object): Store to it.
200 (tparm_object_argument): New.
202 2020-04-20 Marek Polacek <polacek@redhat.com>
204 Backported from mainline
205 2020-04-20 Marek Polacek <polacek@redhat.com>
207 PR c++/94505 - bogus -Wparentheses warning with fold-expression.
208 * pt.c (fold_expression): Add warning_sentinel for -Wparentheses
209 before calling build_x_binary_op.
211 2020-04-07 Jakub Jelinek <jakub@redhat.com>
214 * parser.c (cp_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
215 if cp_parser_omp_master succeeded.
217 Backported from mainline
218 2020-04-04 Jakub Jelinek <jakub@redhat.com>
221 * pt.c (tsubst_expr) <case OMP_MASTER>: Clear
222 omp_parallel_combined_clauses.
224 2020-03-30 Jakub Jelinek <jakub@redhat.com>
227 * semantics.c (add_stmt): Only set STMT_IS_FULL_EXPR_P on trees with
228 STATEMENT_CODE_P code.
230 2020-03-19 Jakub Jelinek <jakub@redhat.com>
233 * parser.c (cp_parser_omp_var_list_no_open): Call process_outer_var_ref
234 on outer_automatic_var_p decls.
235 * cp-gimplify.c (cxx_omp_disregard_value_expr): Return true also for
238 2020-03-17 Jakub Jelinek <jakub@redhat.com>
241 * parser.c (cp_parser_enum_specifier): Use temp_override for
242 parser->colon_corrects_to_scope_p, replace goto out with return.
243 If scoped enum or enum with underlying type is not followed by
244 { or ;, call cp_parser_commit_to_tentative_parse before calling
245 cp_parser_error and make sure to return error_mark_node instead of
246 NULL_TREE. Formatting fixes.
248 2020-04-05 Marek Polacek <polacek@redhat.com>
250 2020-02-06 Marek Polacek <polacek@redhat.com>
251 Backport from mainline
253 PR c++/93597 - ICE with lambda in operator function.
254 * name-lookup.c (maybe_save_operator_binding): Check is_overloaded_fn.
256 2020-04-04 Jason Merrill <jason@redhat.com>
259 * mangle.c (write_expression): Skip IMPLICIT_CONV_EXPR.
261 2020-04-04 Jason Merrill <jason@redhat.com>
264 * constexpr.c (maybe_constant_value): Use break_out_target_exprs.
265 * expr.c (mark_use) [VIEW_CONVERT_EXPR]: Don't wrap a TARGET_EXPR in
268 2020-04-03 Jason Merrill <jason@redhat.com>
271 * pt.c (complex_pack_expansion_r): New.
272 (complex_alias_template_p): Use it.
274 2020-03-30 Jason Merrill <jason@redhat.com>
277 * tree.c (cp_tree_equal) [CALL_EXPR]: Compare KOENIG_LOOKUP_P.
278 (called_fns_equal): Check DECL_CONTEXT.
280 2020-03-27 Nathan Sidwell <nathan@acm.org>
283 * name-lookup.c (do_pushdecl): Look through cleanp levels.
285 2020-03-14 Jason Merrill <jason@redhat.com>
288 * pt.c (find_parameter_packs_r): [DECL_EXPR]: Walk
289 DECL_ORIGINAL_TYPE of a typedef.
291 2020-03-14 Jason Merrill <jason@redhat.com>
294 * pt.c (process_partial_specialization): Error rather than crash on
295 extra pack expansion.
297 2020-03-14 Jason Merrill <jason@redhat.com>
300 * pt.c (build_deduction_guide): Clear cp_unevaluated_operand for
301 substituting DECL_ARGUMENTS.
303 2020-03-12 Release Manager
305 * GCC 9.3.0 released.
307 2020-03-05 Jason Merrill <jason@redhat.com>
311 * constraint.cc (constraints_satisfied_p): Use push_tinst_level.
313 2020-03-05 Martin Sebor <msebor@redhat.com>
316 2020-02-21 Martin Sebor <msebor@redhat.com>
318 PR gcov-profile/93753
319 * class.c (check_flexarrays): Tighten up a test for potential members
320 of anonymous structs or unions.
322 2020-03-05 Jason Merrill <jason@redhat.com>
325 * pt.c (invalid_nontype_parm_type_p): Check complain for non-literal
328 2020-03-04 Jason Merrill <jason@redhat.com>
331 * constexpr.c (constexpr_call_hasher::equal): Use
332 same_type_ignoring_top_level_qualifiers_p.
334 2020-03-04 Martin Sebor <msebor@redhat.com>
337 * tree.c (type_initializer_zero_p): Fail for structs initialized
340 2020-03-04 Marek Polacek <polacek@redhat.com>
342 Backported from mainline
343 2020-01-24 Marek Polacek <polacek@redhat.com>
345 PR c++/93299 - ICE in tsubst_copy with parenthesized expression.
346 * pt.c (tsubst_copy): Handle a REF_PARENTHESIZED_P VIEW_CONVERT_EXPR.
348 2020-03-04 Marek Polacek <polacek@redhat.com>
350 Backported from mainline
351 2020-02-26 Marek Polacek <polacek@redhat.com>
353 PR c++/93676 - value-init crash in template.
354 * init.c (build_new_1): Don't call build_vec_init in a template.
356 2020-03-04 Jason Merrill <jason@redhat.com>
357 Marek Polacek <polacek@redhat.com>
359 PR c++/90505 - mismatch in template argument deduction.
360 * pt.c (tsubst): Don't reduce the template level of template
361 parameters when tf_partial.
363 2020-03-04 Jason Merrill <jason@redhat.com>
366 * init.c (perform_member_init): Don't do aggregate initialization of
368 * constexpr.c (cx_check_missing_mem_inits): Don't enforce
369 initialization of empty field.
371 2020-03-04 Jason Merrill <jason@redhat.com>
374 * semantics.c (finish_call_expr): Don't call
375 instantiate_non_dependent_expr before warn_for_memset.
377 2020-03-02 Jason Merrill <jason@redhat.com>
380 * constexpr.c (cxx_eval_vec_init_1): Handle CONSTRUCTOR.
382 2020-03-02 Jason Merrill <jason@redhat.com>
385 * constexpr.c (potential_constant_expression_1) [PARM_DECL]: Allow
387 [COMPONENT_REF]: A member function reference doesn't use the object
390 2020-03-02 Jason Merrill <jason@redhat.com>
393 * cp-gimplify.c (predeclare_vla): New.
394 (cp_genericize_r) [NOP_EXPR]: Call it.
396 2020-03-02 Jason Merrill <jason@redhat.com>
399 * parser.c (cp_parser_lambda_expression): Clear in_discarded_stmt.
401 2020-03-02 Jason Merrill <jason@redhat.com>
403 PR c++/90732 - ICE with VLA capture and generic lambda.
404 * pt.c (tsubst_lambda_expr): Repeat add_capture for VLAs.
406 2020-03-02 Jason Merrill <jason@redhat.com>
411 * parser.c (cp_parser_type_specifier_seq): Don't parse attributes in
412 a trailing return type.
413 (cp_parser_lambda_declarator_opt): Parse C++11 attributes before
416 2020-02-26 Marek Polacek <polacek@redhat.com>
418 PR c++/92745 - bogus error when initializing array of vectors.
419 * decl.c (reshape_init_r): For a nested compound literal, do
420 call reshape_init_{class,array,vector}.
422 2020-02-26 Jason Merrill <jason@redhat.com>
425 * constexpr.c (cxx_eval_array_reference): {}-initialize missing
426 elements instead of value-initializing them.
428 2020-02-26 Jason Merrill <jason@redhat.com>
431 * pt.c (tsubst_decl) [PARM_DECL]: Check cp_unevaluated_operand in
432 handling of TREE_CHAIN for empty pack.
434 2020-02-26 Jason Merrill <jason@redhat.com>
437 * constexpr.c (maybe_constant_value): Don't unshare if the cached
438 value is the same as the argument.
440 2020-02-14 Jakub Jelinek <jakub@redhat.com>
443 * class.c (enum_min_precision): Change prec type from int to int &.
445 2020-02-13 Jakub Jelinek <jakub@redhat.com>
447 Backported from mainline
448 2020-02-05 Jakub Jelinek <jakub@redhat.com>
451 * semantics.c (cp_build_vec_convert): Call decay_conversion on arg
452 prior to passing it to c_build_vec_convert.
454 2020-01-29 Jakub Jelinek <jakub@redhat.com>
457 * cp-gimplify.c (cxx_omp_predetermined_sharing): Return
458 OMP_CLAUSE_DEFAULT_SHARED for typeinfo decls.
460 2020-01-28 Jason Merrill <jason@redhat.com>
463 * call.c (build_user_type_conversion_1): Allow a template conversion
464 returning an rvalue reference to bind directly to an lvalue.
467 * decl.c (grokdeclarator): Propagate eh spec from typedef.
470 * pt.c (tsubst_copy) [STRING_CST]: Don't use fold_convert.
472 PR c++/93279 - ICE with lambda in member operator.
473 * name-lookup.c (maybe_save_operator_binding): Don't remember
474 class-scope bindings.
476 2020-01-27 Nathan Sidwell <nathan@acm.org>
479 * name-lookup.c (is_ancestor): Allow CHILD to be a namespace alias.
481 2020-01-24 Jason Merrill <jason@redhat.com>
483 PR c++/92852 - ICE with generic lambda and reference var.
484 * constexpr.c (maybe_constant_value): Likewise.
486 2020-01-22 Jakub Jelinek <jakub@redhat.com>
488 Backported from mainline
489 2020-01-17 Jakub Jelinek <jakub@redhat.com>
492 * parser.c (cp_parser_template_name): Look up deprecated attribute
493 in DECL_TEMPLATE_RESULT or its type's attributes.
495 2019-12-26 Jakub Jelinek <jakub@redhat.com>
498 * parser.c (cp_parser_constructor_declarator_p): If open paren
499 is followed by RID_ATTRIBUTE, skip over the attribute tokens and
500 try to parse type specifier.
502 2019-12-20 Jakub Jelinek <jakub@redhat.com>
505 * call.c (convert_arg_to_ellipsis): For decltype(nullptr) arguments
506 that have side-effects use cp_build_compound_expr.
508 2020-01-21 Jason Merrill <jason@redhat.com>
510 PR c++/91476 - anon-namespace reference temp clash between TUs.
511 * call.c (make_temporary_var_for_ref_to_temp): Clear TREE_PUBLIC
512 if DECL is in the anonymous namespace.
514 2020-01-17 Jason Merrill <jason@redhat.com>
516 PR c++/92531 - ICE with noexcept(lambda).
517 * pt.c (uses_template_parms): Don't try to enumerate all the
520 2020-01-16 Jason Merrill <jason@redhat.com>
522 PR c++/93286 - ICE with __is_constructible and variadic template.
523 * pt.c (tsubst) [TREE_LIST]: Handle pack expansion.
524 (tsubst_copy_and_build) [TRAIT_EXPR]: Always use tsubst for type2.
526 2020-01-02 Jakub Jelinek <jakub@redhat.com>
529 * cp-objcp-common.c (identifier_global_tag): Return NULL_TREE if name
530 has not been found, rather than error_mark_node.
532 2019-12-20 Jakub Jelinek <jakub@redhat.com>
534 Backported from mainline
535 2019-12-06 Jakub Jelinek <jakub@redhat.com>
537 PR c++/92831 - CWG 1299, not extending temporary lifetime for ?:
538 * cp-tree.h (extend_ref_init_temps): Add a new argument with NULL
540 * call.c (set_up_extended_ref_temp): Add COND_GUARD argument, pass it
541 down to extend_ref_init_temps. Before pushing cleanup, if COND_GUARD
542 is non-NULL, create a bool temporary if needed, initialize to false
543 and guard the cleanup with the temporary being true.
544 (extend_ref_init_temps_1): Add COND_GUARD argument, pass it down
545 to recursive calls and set_up_extended_ref_temp. Handle COND_EXPR.
546 (extend_ref_init_temps): Add COND_GUARD argument, pass it down to
547 recursive calls and to extend_ref_init_temps_1.
549 2019-12-03 Jakub Jelinek <jakub@redhat.com>
552 * typeck2.c (digest_nsdmi_init): For bitfields, use
553 DECL_BIT_FIELD_TYPE instead of TREE_TYPE.
556 * constexpr.c (cxx_bind_parameters_in_call): For virtual calls,
557 adjust the first argument to point to the derived object rather
560 2019-12-02 Jakub Jelinek <jakub@redhat.com>
563 * constexpr.c (cxx_eval_constant_expression) <case OBJ_TYPE_REF>: Use
564 STRIP_NOPS before checking for ADDR_EXPR.
566 2019-11-29 Jakub Jelinek <jakub@redhat.com>
569 * parser.c (cp_parser_omp_declare_reduction_exprs): If
570 processing_template_decl, wrap the combiner or initializer
572 * decl.c (start_preparsed_function): Don't start a lambda scope
573 for DECL_OMP_DECLARE_REDUCTION_P functions.
574 (finish_function): Don't finish a lambda scope for
575 DECL_OMP_DECLARE_REDUCTION_P functions, nor cp_fold_function
576 them nor cp_genericize them.
577 * mangle.c (decl_mangling_context): Look through
578 DECL_OMP_DECLARE_REDUCTION_P functions.
579 * semantics.c (expand_or_defer_fn_1): For DECL_OMP_DECLARE_REDUCTION_P
580 functions, use tentative linkage, don't keep their bodies with
581 -fkeep-inline-functions and return false at the end.
583 2019-11-28 Jakub Jelinek <jakub@redhat.com>
586 * decl2.c (mark_used): Don't call note_vague_linkage_fn for pure
587 virtual functions, even if they are declared inline.
589 2019-11-27 Jakub Jelinek <jakub@redhat.com>
592 * tree.c (replace_placeholders_r): Don't walk constructor elts with
595 2019-11-26 Jakub Jelinek <jakub@redhat.com>
598 * parser.c (cp_parser_std_attribute): For unknown attributes,
599 skip balanced token seq instead of trying to parse
600 attribute-argument-clause as expression list.
603 * class.c (enum_to_min_precision): New hash_map.
604 (enum_min_precision): New function.
605 (check_bitfield_decl): Use it.
607 2019-11-22 Jakub Jelinek <jakub@redhat.com>
610 * cp-objcp-common.c (identifier_global_tag): Define.
612 2019-11-21 Jakub Jelinek <jakub@redhat.com>
613 Jason Merrill <jason@redhat.com>
616 * parser.c (cp_parser_decl_specifier_seq): For concept or typedef
617 break early if CP_PARSER_FLAGS_ONLY_MUTABLE_OR_CONSTEXPR.
618 For type specifiers, set CP_PARSER_FLAGS_NO_TYPE_DEFINITIONS
619 if CP_PARSER_FLAGS_ONLY_MUTABLE_OR_CONSTEXPR is set.
621 2019-12-11 Jason Merrill <jason@redhat.com>
623 PR c++/57082 - new X{} and private destructor.
624 * init.c (build_new_1): Also pass tf_no_cleanup to
625 build_special_member_call.
627 2019-12-11 Jason Merrill <jason@redhat.com>
629 PR c++/92859 - ADL and bit-field.
630 * name-lookup.c: Use unlowered_expr_type.
632 2019-12-11 Jason Merrill <jason@redhat.com>
634 PR c++/92446 - deduction of class NTTP.
635 * pt.c (deducible_expression): Look through VIEW_CONVERT_EXPR.
637 2019-11-06 Jason Merrill <jason@redhat.com>
639 PR c++/92150 - partial specialization with class NTTP.
640 * pt.c (unify): Handle VIEW_CONVERT_EXPR.
642 2019-11-20 Jakub Jelinek <jakub@redhat.com>
645 * call.c (complain_about_no_candidates_for_method_call): If
646 conv->from is not a type, pass to complain_about_bad_argument
647 lvalue_type of conv->from.
649 Backported from mainline
650 2019-11-19 Jakub Jelinek <jakub@redhat.com>
653 * semantics.c (handle_omp_for_class_iterator): Don't call
654 cp_fully_fold on cond.
656 2019-11-08 Marek Polacek <polacek@redhat.com>
658 Backported from mainline
659 2019-10-29 Marek Polacek <polacek@redhat.com>
661 PR c++/90998 - ICE with copy elision in init by ctor and -Wconversion.
662 * call.c (joust): Don't attempt to warn if ->second_conv is null.
664 2019-11-08 Jakub Jelinek <jakub@redhat.com>
666 Backported from mainline
667 2019-11-05 Jakub Jelinek <jakub@redhat.com>
670 * constexpr.c (potential_constant_expression_1): Return true rather
671 than false for PREDICT_EXPR.
673 2019-10-31 Jakub Jelinek <jakub@redhat.com>
676 * cp-tree.h (type_initializer_zero_p): Declare.
677 * decl.c (reshape_init_array_1): Formatting fix.
678 * tree.c (type_initializer_zero_p): New function. Moved from
679 ../tree.c, use next_initializable_field, formatting fix. Return
680 false for TYPE_NON_AGGREGATE_CLASS types.
682 2019-10-22 Jakub Jelinek <jakub@redhat.com>
684 PR tree-optimization/85887
685 * decl.c (expand_static_init): Drop ECF_LEAF from __cxa_guard_acquire
686 and __cxa_guard_release.
688 2019-10-21 Jakub Jelinek <jakub@redhat.com>
691 * constexpr.c (cxx_eval_component_reference, cxx_eval_bit_field_ref):
692 Use STRIP_ANY_LOCATION_WRAPPER on CONSTRUCTOR elts.
694 2019-10-29 Jakub Jelinek <jakub@redhat.com>
697 * cp-gimplify.c (cp_gimplify_expr): If gimplify_to_rvalue changes the
698 function pointer type, re-add cast to the original one.
700 2018-10-26 Ville Voutilainen <ville.voutilainen@gmail.com>
702 Backport from mainline
704 2019-06-01 Ville Voutilainen <ville.voutilainen@gmail.com>
707 * class.c (fixup_type_variants): Handle CLASSTYPE_FINAL.
709 2019-10-24 Marek Polacek <polacek@redhat.com>
711 * decl.c (reshape_init_r): Add missing space.
713 2019-10-22 Marek Polacek <polacek@redhat.com>
715 Backported from mainline
716 2019-10-21 Marek Polacek <polacek@redhat.com>
718 PR c++/92106 - ICE with structured bindings and -Wreturn-local-addr.
719 * typeck.c (maybe_warn_about_returning_address_of_local): Avoid
720 recursing on null initializer and return false instead.
722 PR c++/92062 - ODR-use ignored for static member of class template.
723 * pt.c (has_value_dependent_address): Strip location wrappers.
725 2019-10-21 Jakub Jelinek <jakub@redhat.com>
727 Backported from mainline
728 2019-10-04 Jakub Jelinek <jakub@redhat.com>
731 * cp-gimplify.c (cp_gimplify_expr) <case CALL_EXPR>: For
732 -fstrong-eval-order ensure CALL_EXPR_FN side-effects are evaluated
733 before any arguments. Additionally, ensure CALL_EXPR_FN that isn't
734 invariant nor OBJ_TYPE_REF nor SSA_NAME is forced into a temporary.
736 2019-09-27 Jakub Jelinek <jakub@redhat.com>
739 * parser.c (cp_parser_omp_var_list_no_open): Parse predefined
741 * semantics.c (finish_omp_clauses): Allow predefined variables in
742 shared and firstprivate clauses, even when they are predetermined
744 * cp-gimplify.c (cxx_omp_predetermined_sharing_1): Return
745 OMP_CLAUSE_DEFAULT_SHARED for predefined variables.
747 2019-08-09 Jakub Jelinek <jakub@redhat.com>
750 * parser.c (cp_parser_omp_clause_dist_schedule): Comment out the
751 check_no_duplicate_clause call, instead emit a warning for duplicate
752 dist_schedule clauses.
754 2019-10-16 Richard Biener <rguenther@suse.de>
756 Backport from mainline
757 2019-10-02 Richard Biener <rguenther@suse.de>
760 * decl.c (build_ptrmemfunc_type): Mark pointer-to-member
761 fat pointer structure members as DECL_NONADDRESSABLE_P.
763 2019-10-08 Marek Polacek <polacek@redhat.com>
765 Backported from mainline
766 2019-09-15 Marek Polacek <polacek@redhat.com>
768 PR c++/91740 - ICE with constexpr call and ?: in ARRAY_REF.
769 * pt.c (build_non_dependent_expr): Call build_non_dependent_expr for
772 2019-09-28 Marek Polacek <polacek@redhat.com>
774 Backported from mainline
775 2019-09-28 Marek Polacek <polacek@redhat.com>
777 PR c++/91923 - failure-to-SFINAE with class type NTTP in C++17.
778 * pt.c (invalid_nontype_parm_type_p): Only emit errors when
781 2019-09-10 Marek Polacek <polacek@redhat.com>
783 Backported from mainline
784 2019-09-10 Marek Polacek <polacek@redhat.com>
786 PR c++/91705 - constexpr evaluation rejects ++/-- on floats.
787 * constexpr.c (cxx_eval_increment_expression): Call fold_simple on
790 2019-09-01 Marek Polacek <polacek@redhat.com>
792 Backported from mainline
793 2019-09-01 Marek Polacek <polacek@redhat.com>
795 PR c++/91129 - wrong error with binary op in template argument.
796 * typeck.c (warn_for_null_address): Use fold_for_warn instead of
797 fold_non_dependent_expr.
798 (cp_build_binary_op): Likewise.
800 2019-08-31 Iain Sandoe <iain@sandoe.co.uk>
802 Backported from mainline
803 2019-08-23 Iain Sandoe <iain@sandoe.co.uk>
806 * parser.c (cp_parser_initial_pragma): Call c_common_no_more_pch ()
807 after determining that the first token is not
808 PRAGMA_GCC_PCH_PREPROCESS.
810 2019-08-23 Marek Polacek <polacek@redhat.com>
812 Backported from mainline
813 2019-08-23 Marek Polacek <polacek@redhat.com>
815 PR c++/91521 - wrong error with operator->.
816 * decl.c (grokdeclarator): Return error_mark_node for an invalid
817 trailing return type.
819 2019-08-16 Jason Merrill <jason@redhat.com>
821 PR c++/90393 - ICE with throw in ?:
822 * call.c (build_conditional_expr_1): Revert changes from
823 PR c++/64372 and c++/86205.
825 2019-08-15 Marek Polacek <polacek@redhat.com>
827 Backported from mainline
828 2019-08-07 Marek Polacek <polacek@redhat.com>
830 PR c++/81429 - wrong parsing of constructor with C++11 attribute.
831 * parser.c (cp_parser_constructor_declarator_p): Handle the scenario
832 when a parameter declaration begins with [[attribute]].
834 2019-08-08 Marek Polacek <polacek@redhat.com>
836 PR c++/87519 - bogus warning with -Wsign-conversion.
837 * typeck.c (cp_build_binary_op): Use same_type_p instead of comparing
840 2019-08-13 Marek Polacek <polacek@redhat.com>
842 PR c++/90473 - wrong code with nullptr in default argument.
843 * call.c (null_ptr_cst_p): Update quote from the standard.
844 * decl.c (check_default_argument): Don't return nullptr when the arg
847 2019-06-14 Marek Polacek <polacek@redhat.com>
849 PR c++/90884 - stray note with -Wctor-dtor-privacy.
850 * class.c (maybe_warn_about_overly_private_class): Guard the call to
853 2019-08-14 Martin Sebor <msebor@redhat.com>
855 Backported from mainline
856 2019-08-01 Martin Sebor <msebor@redhat.com>
859 * decl.c (reshape_init_array_1): Avoid truncating initializer
860 lists containing string literals.
862 2019-08-14 Jonathan Wakely <jwakely@redhat.com>
865 * name-lookup.c (get_std_name_hint): Fix min_dialect field for
866 complex_literals and make_unique entries.
868 2019-08-12 Tom Honermann <tom@honermann.net>
870 * parser.c (cp_parser_template_declaration_after_parameters): Enable
871 class template argument deduction for non-type template parameters
872 in literal operator templates.
874 2019-08-12 Jason Merrill <jason@redhat.com>
876 PR c++/91378 - ICE with noexcept and auto return type.
877 * pt.c (maybe_instantiate_noexcept): push_to_top_level.
879 PR c++/90538 - multiple expansions of capture packs
880 * cp-tree.h (DECLTYPE_FOR_INIT_CAPTURE): Remove.
881 * lambda.c (add_capture): Copy parameter packs from init.
882 (lambda_capture_field_type): Always use auto for init-capture.
883 * pt.c (uses_parameter_packs): Return tree.
884 (tsubst) [DECLTYPE_TYPE]: Remove init-capture handling.
885 (gen_elem_of_pack_expansion_instantiation): Don't push
886 local_specialization_stack.
887 (prepend_one_capture): New.
888 (tsubst_lambda_expr): Use it. Don't touch local_specializations.
889 (do_auto_deduction): Avoid redundant error.
891 2019-08-12 Release Manager
893 * GCC 9.2.0 released.
895 2019-08-02 Martin Sebor <msebor@redhat.com>
897 Backport from mainline
898 2019-06-05 Martin Sebor <msebor@redhat.com>
901 * typeck.c (maybe_warn_about_returning_address_of_local): Only
902 consider functions returning pointers as candidates for
905 2019-08-02 Marek Polacek <polacek@redhat.com>
907 Backported from mainline
908 2019-08-02 Marek Polacek <polacek@redhat.com>
910 PR c++/91230 - wrong error with __PRETTY_FUNCTION__ and generic lambda.
911 * pt.c (value_dependent_expression_p): Consider __PRETTY_FUNCTION__
912 inside a template function value-dependent.
914 2019-07-19 Jason Merrill <jason@redhat.com>
916 PR c++/90098 - partial specialization and class non-type parms.
919 * call.c (build_converted_constant_expr_internal): Don't copy.
920 * pt.c (process_partial_specialization): Allow VIEW_CONVERT_EXPR
921 around class non-type parameter.
922 (unify) [TEMPLATE_PARM_INDEX]: Ignore cv-quals.
923 (invalid_nontype_parm_type_p): Check for dependent class type.
925 PR c++/85552 - wrong instantiation of dtor for DMI.
926 * typeck2.c (digest_nsdmi_init): Set tf_no_cleanup for direct-init.
928 2019-07-19 Nina Dinka Ranns <dinka.ranns@gmail.com>
930 PR c++/63149 - Wrong auto deduction from braced-init-list.
931 * pt.c (listify_autos): use non cv qualified auto_node in
932 std::initializer_list<auto>.
934 2019-07-01 Marek Polacek <polacek@redhat.com>
936 Backported from mainline
937 2019-06-21 Marek Polacek <polacek@redhat.com>
939 PR c++/60223 - ICE with T{} in non-deduced context.
940 * pt.c (unify): Allow COMPOUND_LITERAL_P in a non-deduced context.
942 PR c++/90490 - fix decltype issues in noexcept-specifier.
943 * except.c (build_noexcept_spec): Call
944 instantiate_non_dependent_expr_sfinae before
945 build_converted_constant_expr instead of calling
946 instantiate_non_dependent_expr after it. Add
947 processing_template_decl_sentinel.
949 2019-06-29 Jakub Jelinek <jakub@redhat.com>
951 Backported from mainline
952 2019-06-21 Jakub Jelinek <jakub@redhat.com>
955 * semantics.c (finish_omp_clauses): Don't reject references to
956 incomplete types if processing_template_decl.
958 2019-06-12 Marek Polacek <polacek@redhat.com>
960 PR c++/90825 - endless recursion when evaluating sizeof.
961 PR c++/90832 - endless recursion when evaluating sizeof.
962 * constexpr.c (cxx_eval_constant_expression): Don't recurse on the
963 result of fold_sizeof_expr if is returns a SIZEOF_EXPR.
964 * typeck.c (cxx_sizeof_expr): Only return a SIZEOF_EXPR if the operand
965 is instantiation-dependent.
967 PR c++/90736 - bogus error with alignof.
968 * constexpr.c (adjust_temp_type): Use cv_unqualified type.
970 2019-06-11 Jakub Jelinek <jakub@redhat.com>
973 * init.c (constant_value_1): Handle VECTOR_CST DECL_INITIAL for
974 !DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P decls like CONSTRUCTOR.
976 2019-06-05 Jakub Jelinek <jakub@redhat.com>
978 Backported from mainline
979 2019-05-29 Jakub Jelinek <jakub@redhat.com>
982 * tree.c (lvalue_kind): Return clk_none for expressions with
985 2019-05-28 Marek Polacek <polacek@redhat.com>
987 Backported from mainline
988 2019-05-28 Marek Polacek <polacek@redhat.com>
990 PR c++/90548 - ICE with generic lambda and empty pack.
991 * pt.c (tsubst_copy_and_build): Handle pack expansion properly.
993 2019-05-25 Marek Polacek <polacek@redhat.com>
995 Backported from mainline
996 2019-05-25 Marek Polacek <polacek@redhat.com>
998 PR c++/90572 - wrong disambiguation in friend declaration.
999 * parser.c (cp_parser_constructor_declarator_p): Don't allow missing
1000 typename for friend declarations.
1002 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
1004 Backported from mainline
1005 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
1007 PR c++/90532 Ensure __is_constructible(T[]) is false
1008 * method.c (is_xible_helper): Return error_mark_node for construction
1009 of an array of unknown bound.
1011 2019-05-17 Jakub Jelinek <jakub@redhat.com>
1013 Backported from mainline
1014 2019-05-15 Jakub Jelinek <jakub@redhat.com>
1017 * cp-gimplify.c (genericize_cp_loop): Emit a DEBUG_BEGIN_STMT
1018 before the condition (or if missing or constant non-zero at the end
1019 of the loop. Emit a DEBUG_BEGIN_STMT before the increment expression
1020 if any. Don't call protected_set_expr_location on incr if it already
1023 2019-05-10 Jakub Jelinek <jakub@redhat.com>
1026 * config-lang.in (gtfiles): Remove c-family/c-lex.c, add
1027 c-family/c-cppbuiltin.c.
1029 2019-05-10 Marek Polacek <polacek@redhat.com>
1031 PR c++/78010 - bogus -Wsuggest-override warning on final function.
1032 * class.c (check_for_override): Don't warn for final functions.
1034 2019-05-06 Marek Polacek <polacek@redhat.com>
1036 PR c++/90265 - ICE with generic lambda.
1037 * pt.c (tsubst_copy_and_build): Use a dedicated variable for the last
1038 element in the vector.
1040 2019-05-06 Paolo Carlini <paolo.carlini@oracle.com>
1043 * decl.c (grokdeclarator): Set type to error_mark_node
1044 upon error about template placeholder type non followed
1045 by a simple declarator-id.
1047 2019-05-04 Michael Meissner <meissner@linux.ibm.com>
1049 * ChangeLog.ibm: Delete unintentional commit on the wrong branch.
1051 2019-05-03 Release Manager
1053 * GCC 9.1.0 released.
1055 2019-04-24 Jason Merrill <jason@redhat.com>
1057 PR c++/90227 - error with template parameter packs.
1058 * pt.c (coerce_template_parms): Do add empty pack when
1061 2019-04-24 Richard Biener <rguenther@suse.de>
1063 * call.c (null_ptr_cst_p): Order checks according to expensiveness.
1064 (conversion_null_warnings): Likewise.
1065 * typeck.c (same_type_ignoring_top_level_qualifiers_p): Return
1066 early if type1 == type2.
1068 2019-04-22 Jason Merrill <jason@redhat.com>
1070 PR c++/87366 - wrong error with alias template.
1071 * typeck.c (structural_comptypes): When comparing_specializations,
1072 aliases are unequal.
1073 (comptypes): When comparing_specializations, do structural
1076 2019-04-19 Jason Merrill <jason@redhat.com>
1078 PR c++/90190 - CTAD with list-constructor.
1079 * pt.c (do_class_deduction): Don't try the single element deduction
1080 if the single element is also a braced list.
1082 PR c++/90171 - ICE with destroying delete with size_t parm.
1083 * call.c (sized_deallocation_fn_p): New. Use it instead of
1084 second_parm_is_size_t in most cases.
1085 (second_parm_is_size_t): Don't check for aligned.
1087 2019-04-19 Paolo Carlini <paolo.carlini@oracle.com>
1090 * pt.c (fn_type_unification): When handling null explicit
1091 arguments do not special case non-parameter packs.
1093 2019-04-19 Jakub Jelinek <jakub@redhat.com>
1096 * pt.c (process_template_parm): Set decl to pushdecl result. If
1097 !is_non_type, also set parm to that.
1100 * decl.c (struct cp_switch): Remove outside_range_p member.
1101 (push_switch): Don't clear it.
1102 (pop_switch): Adjust c_do_switch_warnings caller.
1103 (finish_case_label): Adjust c_add_case_label caller.
1106 * decl.c (duplicate_decls): If remove is main variant and
1107 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
1108 variant that has newdecl as TYPE_NAME if any.
1110 2019-04-18 Jason Merrill <jason@redhat.com>
1112 PR c++/87554 - ICE with extern template and reference member.
1113 * decl.c (cp_finish_decl): Don't set DECL_INITIAL of external vars.
1115 2019-04-17 Jason Merrill <jason@redhat.com>
1117 PR c++/90047 - ICE with enable_if alias template.
1118 * pt.c (tsubst_decl) [TYPE_DECL]: Don't put an erroneous decl in the
1119 hash table when we're in SFINAE context.
1121 2019-04-17 Marek Polacek <polacek@redhat.com>
1123 PR c++/90124 - bogus error with incomplete type in decltype.
1124 * typeck.c (build_class_member_access_expr): Check
1125 cp_unevaluated_operand.
1127 2019-04-12 Jakub Jelinek <jakub@redhat.com>
1130 * decl.c (duplicate_decls): When newdecl's type is its main variant,
1131 don't try to remove it from the variant list, but instead assert
1134 2019-04-12 Martin Sebor <msebor@redhat.com>
1138 * parser.c (cp_parser_has_attribute_expression): Handle assignment
1141 2019-04-12 Jason Merrill <jason@redhat.com>
1143 * call.c (null_member_pointer_value_p): Handle an empty CONSTRUCTOR
1146 2019-04-12 Marek Polacek <polacek@redhat.com>
1148 * except.c (build_noexcept_spec): Use build_converted_constant_bool_expr
1149 instead of perform_implicit_conversion_flags.
1151 PR c++/87603 - constexpr functions are no longer noexcept.
1152 * constexpr.c (is_sub_constant_expr): Remove unused function.
1153 * cp-tree.h (is_sub_constant_expr): Remove declaration.
1154 * except.c (check_noexcept_r): Don't consider a call to a constexpr
1157 2019-04-11 Jakub Jelinek <jakub@redhat.com>
1159 PR translation/90035
1160 * parser.h (struct cp_parser): Add
1161 type_definition_forbidden_message_arg member.
1162 * parser.c (cp_debug_parser): Print it.
1163 (cp_parser_check_type_definition): Pass
1164 parser->type_definition_forbidden_message_arg as second argument to
1166 (cp_parser_has_attribute_expression, cp_parser_sizeof_operand): Set
1167 parser->type_definition_forbidden_message_arg and use G_() with
1168 %qs for parser->type_definition_forbidden_message instead of
1169 building untranslatable message using concat.
1171 2019-04-09 Jakub Jelinek <jakub@redhat.com>
1173 PR translation/90011
1174 * typeck2.c (check_narrowing): Remove trailing space from diagnostics.
1176 2019-04-08 Marek Polacek <polacek@redhat.com>
1178 * typeck2.c (digest_init_r): Don't condition the object slicing warning
1181 2019-04-08 Paolo Carlini <paolo.carlini@oracle.com>
1184 * semantics.c (trait_expr_value): Don't use TYPE_NOTHROW_P
1185 when maybe_instantiate_noexcept fails.
1186 (classtype_has_nothrow_assign_or_copy_p): Likewise.
1187 * method.c (implicitly_declare_fn): Avoid passing error_mark_node
1188 to build_exception_variant.
1190 2019-04-05 Marek Polacek <polacek@redhat.com>
1192 PR c++/87145 - bogus error converting class type in template arg list.
1193 * pt.c (convert_nontype_argument): Don't call
1194 build_converted_constant_expr if it could involve calling a conversion
1195 function with a instantiation-dependent constructor as its argument.
1197 2019-04-05 Martin Sebor <msebor@redhat.com>
1200 * decl.c (reshape_init_array_1): Avoid treating empty strings
1201 as zeros in array initializers.
1202 Use trivial_type_p () instead of TYPE_HAS_TRIVIAL_DFLT().
1204 2019-04-04 Jason Merrill <jason@redhat.com>
1206 PR c++/89948 - ICE with break in statement-expr.
1207 * constexpr.c (cxx_eval_statement_list): Jumping out of a
1208 statement-expr is non-constant.
1210 2019-04-04 Jason Merrill <jason@redhat.com>
1212 PR c++/89966 - error with non-type auto tparm.
1213 * pt.c (do_auto_deduction): Clear tf_partial.
1215 2019-04-04 Jason Merrill <jason@redhat.com>
1217 PR c++/86986 - ICE with TTP with parameter pack.
1218 * pt.c (coerce_template_parameter_pack): Only look at the type of a
1219 non-type parameter pack.
1220 (fixed_parameter_pack_p_1): Don't recurse into the type of a
1221 non-type parameter pack.
1222 (coerce_template_template_parms): Call add_outermost_template_args.
1224 2019-04-04 Martin Sebor <msebor@redhat.com>
1230 * decl.c (reshape_init_array_1): Strip trailing zero-initializers
1231 from arrays of trivial type and known size.
1232 * mangle.c (write_expression): Convert braced initializer lists
1234 (write_expression): Trim trailing zero-initializers from arrays
1236 (write_template_arg_literal): Mangle strings the same as braced
1239 2019-04-03 Jason Merrill <jason@redhat.com>
1241 PR c++/81866 - ICE with member template and default targ.
1242 * pt.c (tsubst_template_decl): Handle getting a type from
1243 retrieve_specialization.
1245 PR c++/86586 - -fcompare-debug=-Wsign-compare.
1246 * typeck.c (cp_build_binary_op): Don't fold for -Wsign-compare.
1248 PR c++/89331 - ICE with offsetof in incomplete class.
1249 * semantics.c (finish_offsetof): Handle error_mark_node.
1250 * typeck.c (build_class_member_access_expr): Call
1251 complete_type_or_maybe_complain before converting to base.
1253 PR c++/89917 - ICE with lambda in variadic mem-init.
1254 * pt.c (make_pack_expansion): Change type_pack_expansion_p to false.
1256 2019-04-01 Jason Merrill <jason@redhat.com>
1258 PR c++/86946 - ICE with function call in template argument.
1260 * pt.c (iterative_hash_template_arg) [CALL_EXPR]: Use
1263 2019-04-01 Paolo Carlini <paolo.carlini@oracle.com>
1266 * pt.c (tsubst_copy): Deal with lookup_name not returing a variable.
1268 2019-03-31 Marek Polacek <polacek@redhat.com>
1270 PR c++/89852 - ICE with C++11 functional cast with { }.
1271 * constexpr.c (fold_non_dependent_expr_template): New static function
1273 (fold_non_dependent_expr): ...here.
1274 (fold_non_dependent_init): New function.
1275 * cp-tree.h (fold_non_dependent_init): Declare.
1276 * typeck2.c (massage_init_elt): Call fold_non_dependent_init instead
1277 of fold_non_dependent_expr. Don't call maybe_constant_init.
1279 2019-03-30 Jason Merrill <jason@redhat.com>
1281 PR c++/89744 - ICE with specialization of member class template.
1282 * pt.c (lookup_template_class_1): If the partial instantiation is
1283 explicitly specialized, adjust.
1284 (maybe_process_partial_specialization): Also adjust
1287 2019-03-29 Jakub Jelinek <jakub@redhat.com>
1290 * typeck.c: Include gimplify.h.
1291 (cp_build_modify_expr) <case COND_EXPR>: Unshare rhs before using it
1292 for second time. Formatting fixes.
1294 2019-03-29 Marek Polacek <polacek@redhat.com>
1296 PR c++/89876 - ICE with deprecated conversion.
1297 * call.c (convert_like_real): Only give warnings with tf_warning.
1299 2019-03-28 Marek Polacek <polacek@redhat.com>
1301 PR c++/89612 - ICE with member friend template with noexcept.
1302 * pt.c (maybe_instantiate_noexcept): For function templates, use their
1303 template result (function decl). Don't set up local specializations.
1304 Temporarily turn on processing_template_decl. Update the template type
1307 PR c++/89836 - bool constant expression and explicit conversions.
1308 * call.c (build_converted_constant_expr_internal): New function,
1310 (build_converted_constant_expr): ...this. New.
1311 (build_converted_constant_bool_expr): New.
1312 * cp-tree.h (build_converted_constant_bool_expr): Declare.
1313 * decl.c (build_explicit_specifier): Call
1314 build_converted_constant_bool_expr.
1316 2019-03-28 Jakub Jelinek <jakub@redhat.com>
1319 * constexpr.c (struct check_for_return_continue_data): New type.
1320 (check_for_return_continue): New function.
1321 (potential_constant_expression_1) <case SWITCH_STMT>: Walk
1322 SWITCH_STMT_BODY to find RETURN_EXPRs or CONTINUE_STMTs not nested
1323 in loop bodies and set *jump_target to that if found.
1325 2019-03-27 Jason Merrill <jason@redhat.com>
1327 PR c++/89831 - error with qualified-id in const member function.
1328 * semantics.c (finish_non_static_data_member): Use object cv-quals
1329 in scoped case, too.
1331 PR c++/89421 - ICE with lambda in template parameter list.
1332 * parser.c (cp_parser_lambda_expression): Also reject a lambda in a
1333 template parameter list before C++20.
1334 * pt.c (type_dependent_expression_p): True for LAMBDA_EXPR.
1335 * semantics.c (begin_class_definition): Restore error about defining
1336 non-lambda class in template parm list.
1338 2019-03-26 Jason Merrill <jason@redhat.com>
1340 PR c++/86932 - missed SFINAE with empty pack.
1341 * pt.c (coerce_template_parms): Don't add an empty pack if
1343 (fn_type_unification): Pass tf_partial to coerce_template_parms.
1345 PR c++/86429 - constexpr variable in lambda.
1348 * constexpr.c (cxx_eval_constant_expression): In a lambda function,
1349 try evaluating the captured variable directly.
1351 2019-03-26 Jakub Jelinek <jakub@redhat.com>
1354 * semantics.c (finish_omp_atomic): Add warning_sentinel for
1355 -Wunused-value around finish_expr_stmt call.
1357 2019-03-25 Paolo Carlini <paolo.carlini@oracle.com>
1361 * parser.c (cp_parser_binary_expression): Don't call cp_fully_fold
1362 to undo the disabling of warnings.
1364 2019-03-25 Jason Merrill <jason@redhat.com>
1366 PR c++/87748 - substitution failure error with decltype.
1367 * pt.c (most_specialized_partial_spec): Clear
1368 processing_template_decl.
1370 2019-03-25 Marek Polacek <polacek@redhat.com>
1372 PR c++/89214 - ICE when initializing aggregates with bases.
1373 * typeck2.c (digest_init_r): Warn about object slicing instead of
1376 PR c++/89705 - ICE with reference binding with conversion function.
1377 * call.c (reference_binding): If the result of the conversion function
1378 is a prvalue of non-class type, use the cv-unqualified type.
1380 2019-03-25 Nathan Sidwell <nathan@acm.org>
1382 * lambda.c (maybe_add_lambda_conv_op): Don't add to comdat group.
1384 2019-03-22 Jakub Jelinek <jakub@redhat.com>
1387 * cp-tree.h (get_tls_wrapper_fn): Remove declaration.
1388 (maybe_get_tls_wrapper_call): Declare.
1389 * decl2.c (get_tls_wrapper_fn): Make static.
1390 (maybe_get_tls_wrapper_call): New function.
1391 * typeck.c (build_class_member_access_expr): Handle accesses to TLS
1393 * semantics.c (finish_qualified_id_expr): Likewise.
1394 (finish_id_expression_1): Use maybe_get_tls_wrapper_call.
1395 * pt.c (tsubst_copy_and_build): Likewise.
1398 * constexpr.c (struct constexpr_ctx): Add constexpr_ops_count member.
1399 (cxx_eval_constant_expression): When not skipping, not constant class
1400 or location wrapper, increment *ctx->constexpr_ops_count and if it is
1401 above constexpr_loop_nest_limit, diagnose failure.
1402 (cxx_eval_outermost_constant_expr): Add constexpr_ops_count and
1403 initialize ctx.constexpr_ops_count to its address.
1404 (is_sub_constant_expr): Likewise.
1406 2019-03-21 Jakub Jelinek <jakub@redhat.com>
1409 * call.c (filed_in_pset): Change pset from hash_set<tree> * to
1410 hash_set<tree, true> &, adjust uses accordingly.
1411 (build_aggr_conv): Change pset from hash_set<tree> *
1412 to hash_set<tree, true>. Replace goto fail; with return NULL;,
1416 * parser.c (cp_parser_lambda_introducer): Add ids and first_capture_id
1417 variables, check for duplicates in this function.
1418 * lambda.c (add_capture): Don't check for duplicates nor use
1420 (register_capture_members): Don't clear IDENTIFIER_MARKED here.
1422 2019-03-21 Paolo Carlini <paolo.carlini@oracle.com>
1425 * method.c (after_nsdmi_defaulted_late_checks): Avoid passing
1426 error_mark_node to comp_except_specs.
1428 2019-03-20 Jason Merrill <jason@redhat.com>
1430 PR c++/87480 - decltype of member access in default template arg
1431 * pt.c (type_unification_real): Accept a dependent result in
1434 2019-03-19 Martin Sebor <msebor@redhat.com>
1436 PR tree-optimization/89688
1437 * typeck2.c (store_init_value): Call braced_lists_to_string for more
1438 kinds of initializers.
1440 2019-03-18 Jason Merrill <jason@redhat.com>
1442 PR c++/89630 - ICE with dependent using-decl as template arg.
1443 * tree.c (cp_tree_equal): Always return false for USING_DECL.
1445 PR c++/89761 - ICE with sizeof... in pack expansion.
1446 * pt.c (argument_pack_element_is_expansion_p): Handle
1447 ARGUMENT_PACK_SELECT.
1449 PR c++/89640 - GNU attributes on lambda.
1450 * parser.c (cp_parser_lambda_declarator_opt): Allow GNU attributes.
1452 PR c++/89682 - wrong access error in default argument.
1453 * pt.c (tsubst_default_argument): Don't defer access checks.
1455 2019-03-18 Paolo Carlini <paolo.carlini@oracle.com>
1458 * semantics.c (finish_non_static_data_member): Check return value
1459 of context_for_name_lookup and immediately return error_mark_node
1462 2019-03-17 Jason Merrill <jason@redhat.com>
1464 PR c++/89571 - ICE with ill-formed noexcept on constructor.
1465 * pt.c (maybe_instantiate_noexcept): Only return false if defaulted.
1466 (regenerate_decl_from_template): Use it for noexcept-specs.
1468 2019-03-14 Jason Merrill <jason@redhat.com>
1470 * parser.c (cp_parser_decl_specifier_seq): Support C++20
1471 concept-definition syntax without 'bool'.
1473 2019-03-14 Jakub Jelinek <jakub@redhat.com>
1476 * semantics.c (finish_qualified_id_expr): Reject variable templates.
1479 * constexpr.c (struct constexpr_ctx): Change save_exprs type from
1480 hash_set<tree> to vec<tree>.
1481 (cxx_eval_call_expression): Adjust for save_exprs being a vec instead
1483 (cxx_eval_loop_expr): Likewise. Truncate the vector after each
1484 removal of SAVE_EXPRs from values.
1485 (cxx_eval_constant_expression) <case SAVE_EXPR>: Call safe_push
1486 method on save_exprs instead of add.
1488 2019-03-13 Jason Merrill <jason@redhat.com>
1490 PR c++/86521 - C++17 copy elision in initialization by constructor.
1491 * call.c (joust_maybe_elide_copy): New.
1494 2019-03-13 Marek Polacek <polacek@redhat.com>
1496 PR c++/88979 - further P0634 fix for constructors.
1497 * parser.c (cp_parser_decl_specifier_seq): Pass flags to
1498 cp_parser_constructor_declarator_p.
1499 (cp_parser_direct_declarator): Allow missing typename for constructor
1501 (cp_parser_constructor_declarator_p): Add FLAGS parameter. Pass it to
1502 cp_parser_type_specifier.
1504 PR c++/89686 - mixing init-capture and simple-capture in lambda.
1505 * parser.c (cp_parser_lambda_introducer): Give error when combining
1506 init-capture and simple-capture.
1508 PR c++/89660 - bogus error with -Wredundant-move.
1509 * typeck.c (maybe_warn_pessimizing_move): Only accept (T &) &arg
1510 as the std::move's argument. Don't call convert_for_initialization
1511 when warn_redundant_move isn't on.
1513 2019-03-11 Jason Merrill <jason@redhat.com>
1515 PR c++/86521 - wrong overload resolution with ref-qualifiers.
1516 * call.c (build_user_type_conversion_1): Don't use a conversion to a
1517 reference of the wrong rvalueness for direct binding.
1519 2019-03-11 Martin Liska <mliska@suse.cz>
1521 * cvt.c (build_expr_type_conversion): Wrap apostrophes
1522 in gcc internal format with %'.
1523 * decl.c (check_no_redeclaration_friend_default_args): Likewise.
1524 (grokfndecl): Likewise.
1525 * name-lookup.c (do_pushtag): Likewise.
1526 * pt.c (unify_parameter_deduction_failure): Likewise.
1527 (unify_template_deduction_failure): Likewise.
1529 2019-03-11 Martin Liska <mliska@suse.cz>
1531 * call.c (convert_arg_to_ellipsis): Wrap an option name
1532 in a string format message and fix GNU coding style.
1533 (build_over_call): Likewise.
1534 * class.c (check_field_decl): Likewise.
1535 (layout_nonempty_base_or_field): Likewise.
1536 * constexpr.c (cxx_eval_loop_expr): Likewise.
1537 * cvt.c (type_promotes_to): Likewise.
1538 * decl.c (cxx_init_decl_processing): Likewise.
1539 (mark_inline_variable): Likewise.
1540 (grokdeclarator): Likewise.
1541 * decl2.c (record_mangling): Likewise.
1542 * error.c (maybe_warn_cpp0x): Likewise.
1543 * except.c (doing_eh): Likewise.
1544 * mangle.c (maybe_check_abi_tags): Likewise.
1545 * parser.c (cp_parser_diagnose_invalid_type_name): Likewise.
1546 (cp_parser_userdef_numeric_literal): Likewise.
1547 (cp_parser_primary_expression): Likewise.
1548 (cp_parser_unqualified_id): Likewise.
1549 (cp_parser_pseudo_destructor_name): Likewise.
1550 (cp_parser_builtin_offsetof): Likewise.
1551 (cp_parser_lambda_expression): Likewise.
1552 (cp_parser_lambda_introducer): Likewise.
1553 (cp_parser_lambda_declarator_opt): Likewise.
1554 (cp_parser_selection_statement): Likewise.
1555 (cp_parser_init_statement): Likewise.
1556 (cp_parser_decomposition_declaration): Likewise.
1557 (cp_parser_function_specifier_opt): Likewise.
1558 (cp_parser_static_assert): Likewise.
1559 (cp_parser_simple_type_specifier): Likewise.
1560 (cp_parser_namespace_definition): Likewise.
1561 (cp_parser_using_declaration): Likewise.
1562 (cp_parser_ctor_initializer_opt_and_function_body): Likewise.
1563 (cp_parser_initializer_list): Likewise.
1564 (cp_parser_type_parameter_key): Likewise.
1565 (cp_parser_member_declaration): Likewise.
1566 (cp_parser_try_block): Likewise.
1567 (cp_parser_std_attribute_spec): Likewise.
1568 (cp_parser_requires_clause_opt): Likewise.
1569 * pt.c (check_template_variable): Likewise.
1570 (check_default_tmpl_args): Likewise.
1571 (push_tinst_level_loc): Likewise.
1572 (instantiate_pending_templates): Likewise.
1573 (invalid_nontype_parm_type_p): Likewise.
1574 * repo.c (get_base_filename): Likewise.
1575 * rtti.c (typeid_ok_p): Likewise.
1576 (build_dynamic_cast_1): Likewise.
1577 * tree.c (maybe_warn_parm_abi): Likewise.
1579 2019-03-08 Jakub Jelinek <jakub@redhat.com>
1582 * parser.c (cp_parser_template_declaration_after_parameters): Avoid
1583 one space before " at the end of line and another after " on another
1584 line in a string literal.
1586 PR tree-optimization/89550
1587 * semantics.c (maybe_convert_cond): Only set TREE_NO_WARNING if
1588 warning_at returned true.
1589 * decl2.c (c_parse_final_cleanups): Likewise.
1590 * typeck.c (convert_for_assignment): Likewise.
1591 * decl.c (finish_function): Likewise.
1594 * parser.c (cp_parser_asm_definition): Just warn instead of error
1595 on volatile qualifier outside of function body.
1598 * constexpr.c (potential_constant_expression_1): Reject
1599 REINTERPRET_CAST_P NOP_EXPRs.
1602 * call.c (joust): Call print_z_candidate only if pedwarn returned
1605 2019-03-07 Jason Merrill <jason@redhat.com>
1607 PR c++/88123 - lambda and using-directive.
1608 * name-lookup.c (op_unqualified_lookup)
1609 (maybe_save_operator_binding, discard_operator_bindings)
1610 (push_operator_bindings): New.
1611 * typeck.c (build_x_binary_op, build_x_unary_op): Call
1612 maybe_save_operator_binding.
1613 * decl.c (start_preparsed_function): Call push_operator_bindings.
1614 * tree.c (cp_free_lang_data): Call discard_operator_bindings.
1616 PR c++/88820 - ICE with CTAD and member template used in DMI.
1617 * pt.c (do_class_deduction): Handle parm used as its own arg.
1619 2019-03-07 Jakub Jelinek <jakub@redhat.com>
1622 * parser.c (cp_parser_asm_definition): Parse asm qualifiers even
1623 at toplevel, but diagnose them.
1625 2019-03-06 Jason Merrill <jason@redhat.com>
1627 PR c++/89381 - implicit copy and using-declaration.
1628 * class.c (classtype_has_move_assign_or_move_ctor_p): Don't consider
1629 op= brought in by a using-declaration.
1631 2019-03-06 Jakub Jelinek <jakub@redhat.com>
1634 * init.c (build_value_init_noctor): Ignore flexible array members.
1636 2019-03-06 Jason Merrill <jason@redhat.com>
1638 PR c++/89576 - if constexpr of lambda capture.
1639 * semantics.c (maybe_convert_cond): Do convert a non-dependent
1640 condition in a template.
1641 * typeck.c (condition_conversion): Handle being called in a
1644 2019-03-06 Marek Polacek <polacek@redhat.com>
1646 PR c++/87378 - bogus -Wredundant-move warning.
1647 * typeck.c (maybe_warn_pessimizing_move): See if the maybe-rvalue
1648 overload resolution would actually succeed.
1650 2019-03-05 Jason Merrill <jason@redhat.com>
1652 * class.c (is_really_empty_class): Add ignore_vptr parm.
1653 (trivial_default_constructor_is_constexpr): Pass it.
1654 * call.c (build_over_call): Pass it.
1655 * constexpr.c (cxx_eval_constant_expression): Pass it instead of
1656 checking TYPE_POLYMORPHIC_P.
1657 (cxx_eval_component_reference, potential_constant_expression_1):
1659 * cp-gimplify.c (simple_empty_class_p): Pass it.
1660 * init.c (expand_aggr_init_1): Pass it.
1662 2019-03-04 Paolo Carlini <paolo.carlini@oracle.com>
1665 * parser.c (cp_parser_class_head): Reject TYPE_BEING_DEFINED too.
1667 2019-03-04 Jakub Jelinek <jakub@redhat.com>
1670 * call.c (field_in_pset): New function.
1671 (build_aggr_conv): Handle CONSTRUCTOR_IS_DESIGNATED_INIT correctly.
1673 2019-03-02 Jakub Jelinek <jakub@redhat.com>
1676 * cp-tree.h (CONSTRUCTOR_IS_DESIGNATED_INIT): Define.
1677 * parser.c (cp_parser_braced_list): Adjust cp_parser_initializer_list
1678 caller, set CONSTRUCTOR_IS_DESIGNATED_INIT.
1679 (cp_parser_initializer_list): Add designated parameter, set *designated
1680 to a bool whether any designators were parsed.
1681 * decl.c (reshape_init): Copy over CONSTRUCTOR_IS_DESIGNATED_INIT if
1683 * pt.c (tsubst_copy_and_build): Likewise.
1684 * call.c (implicit_conversion): If CONSTRUCTOR_IS_DESIGNATED_INIT,
1685 don't call build_list_conv, nor build_complex_conv, nor attempt to
1686 convert a single element initializer to scalar.
1688 2019-03-01 Marek Polacek <polacek@redhat.com>
1690 PR c++/89537 - missing location for error with non-static member fn.
1691 * call.c (resolve_args): Use EXPR_LOCATION.
1692 * typeck.c (build_class_member_access_expr): Use input_location.
1694 PR c++/89532 - ICE with incomplete type in decltype.
1695 * semantics.c (finish_compound_literal): Return error_mark_node
1696 if digest_init_flags returns error_mark_node.
1698 2019-03-01 Jakub Jelinek <jakub@redhat.com>
1700 Implement P1002R1, Try-catch blocks in constexpr functions
1702 * parser.c (cp_parser_ctor_initializer_opt_and_function_body):
1703 Diagnose constexpr ctor or function with function-try-block with
1704 pedwarn for c++17 and earlier. Formatting fix.
1705 (cp_parser_try_block): Use pedwarn instead of error and only for
1706 c++17 and earlier when try block appears in constexpr function.
1707 * constexpr.c (build_constexpr_constructor_member_initializers):
1708 Handle TRY_BLOCK here instead of erroring on it.
1710 2019-02-28 Jason Merrill <jason@redhat.com>
1712 PR c++/88183 - ICE with .* fold-expression.
1713 * pt.c (fold_expression) [DOTSTAR_EXPR]: Remove special handling.
1715 PR c++/86969 - ICE with constexpr if and recursive generic lambdas.
1716 * class.c, lambda.c, pt.c: Revert earlier change.
1717 * lambda.c (add_capture): Don't special-case capture of dependent
1720 * name-lookup.c (print_binding_level): Print this_entity.
1722 2019-02-27 Marek Polacek <polacek@redhat.com>
1724 PR c++/88857 - ICE with value-initialization of argument in template.
1725 * call.c (convert_like_real): Don't call build_value_init in template.
1727 2019-02-27 Jason Merrill <jason@redhat.com>
1729 PR c++/86969 - ICE with constexpr if and recursive generic lambdas.
1730 * semantics.c (process_outer_var_ref): Do capture dependent vars.
1731 * class.c (finish_struct): Only add TAG_DEFN if T is in
1732 current_function_decl.
1733 * lambda.c (vla_capture_type): Force the capture type out into the
1734 lambda's enclosing function.
1735 (add_capture): Pass in the lambda.
1736 * pt.c (tsubst_lambda_expr): complete_type a VLA capture type.
1738 2019-02-27 Marek Polacek <polacek@redhat.com>
1740 PR c++/89511 - ICE with using-declaration and unscoped enumerator.
1741 * parser.c (cp_parser_using_declaration): For an unscoped enum
1742 only use its context if it's not a function declaration.
1744 2019-02-27 Paolo Carlini <paolo.carlini@oracle.com>
1747 * method.c (process_subob_fn): When maybe_instantiate_noexcept
1748 returns false don't call merge_exception_specifiers.
1750 2019-02-27 Paolo Carlini <paolo.carlini@oracle.com>
1753 * parser.c (cp_parser_noexcept_specification_opt): Return NULL_TREE
1754 for a non-constant parsed expression.
1756 2019-02-26 Jakub Jelinek <jakub@redhat.com>
1759 * constexpr.c (cxx_eval_store_expression): When changing active union
1760 member, set no_zero_init.
1762 2019-02-23 Marek Polacek <polacek@redhat.com>
1764 PR c++/88294 - ICE with non-constant noexcept-specifier.
1765 * pt.c (maybe_instantiate_noexcept): Set up the list of local
1766 specializations. Set current_class_{ptr,ref}.
1768 2019-02-22 David Malcolm <dmalcolm@redhat.com>
1771 * parser.c (cp_parser_unqualified_id): Capture and use locations
1774 2019-02-22 Marek Polacek <polacek@redhat.com>
1776 PR c++/89420 - ICE with CAST_EXPR in explicit-specifier.
1777 * decl.c (build_explicit_specifier): Don't check
1778 processing_template_decl. Call instantiation_dependent_expression_p
1779 instead of value_dependent_expression_p. Call
1780 instantiate_non_dependent_expr_sfinae before
1781 build_converted_constant_expr instead of calling
1782 instantiate_non_dependent_expr after it. Add
1783 processing_template_decl_sentinel.
1785 2019-02-22 Thomas Schwinge <thomas@codesourcery.com>
1787 * parser.c (cp_parser_oacc_simple_clause): Remove parser formal
1788 parameter, move loc formal parameter to the front. Adjust all
1790 (cp_parser_oacc_shape_clause): Add loc formal parameter. Adjust
1793 2019-02-21 Jason Merrill <jason@redhat.com>
1795 PR c++/87685 - generic lambda 'this' capture error.
1796 * lambda.c (lambda_expr_this_capture): Change add_capture_p to int.
1797 (maybe_generic_this_capture): Pass -1.
1799 PR c++/88394 - ICE with VLA init-capture.
1800 * lambda.c (is_normal_capture_proxy): Check DECL_CAPTURED_VARIABLE.
1802 PR c++/88869 - C++17 ICE with CTAD and explicit specialization.
1803 * pt.c (do_class_deduction): Don't include explicit specialization
1806 PR c++/89422 - ICE with -g and lambda in default arg in template.
1807 * pt.c (tsubst_function_decl): SET_DECL_FRIEND_CONTEXT sooner.
1809 2019-02-21 Jason Merrill <jason@redhat.com>
1811 PR c++/88419 - C++17 ICE with class template arg deduction.
1812 * pt.c (make_template_placeholder): Set TYPE_CANONICAL after
1813 CLASS_PLACEHOLDER_TEMPLATE.
1815 2019-02-21 Jakub Jelinek <jakub@redhat.com>
1818 * constexpr.c (struct constexpr_fundef): Add parms and result members.
1819 (retrieve_constexpr_fundef): Adjust for the above change.
1820 (register_constexpr_fundef): Save constexpr body with copy_fn,
1821 temporarily set DECL_CONTEXT on DECL_RESULT before that.
1822 (get_fundef_copy): Change FUN argument to FUNDEF with
1823 constexpr_fundef * type, grab body and parms/result out of
1824 constexpr_fundef struct and temporarily change it for copy_fn calls
1826 (cxx_eval_builtin_function_call): For __builtin_FUNCTION temporarily
1827 adjust current_function_decl from ctx->call context. Test
1828 !potential_constant_expression instead of !is_constant_expression.
1829 (cxx_bind_parameters_in_call): Grab parameters from new_call. Undo
1830 convert_for_arg_passing changes for TREE_ADDRESSABLE type passing.
1831 (cxx_eval_call_expression): Adjust get_fundef_copy caller.
1832 (cxx_eval_conditional_expression): For IF_STMT, allow then or else
1833 operands to be NULL.
1834 (label_matches): Handle BREAK_STMT and CONTINUE_STMT.
1835 (cxx_eval_loop_expr): Add support for FOR_STMT, WHILE_STMT and DO_STMT.
1836 (cxx_eval_switch_expr): Add support for SWITCH_STMT.
1837 (cxx_eval_constant_expression): Handle IF_STMT, FOR_STMT, WHILE_STMT,
1838 DO_STMT, CONTINUE_STMT, SWITCH_STMT, BREAK_STMT and CONTINUE_STMT.
1839 For SIZEOF_EXPR, recurse on the result of fold_sizeof_expr. Ignore
1840 DECL_EXPR with USING_DECL operand.
1841 * lambda.c (maybe_add_lambda_conv_op): Build thisarg using
1842 build_int_cst to make it a valid constant expression.
1844 2019-02-20 Jason Merrill <jason@redhat.com>
1846 PR c++/88690 - C++17 ICE with empty base in aggregate.
1847 * typeck2.c (process_init_constructor_record): Skip trivial
1848 initialization of an empty base.
1850 2019-02-21 Richard Biener <rguenther@suse.de>
1853 * vtable-class-hierarchy.c (vtv_generate_init_routine): Do not
1854 make symtab process new functions here.
1856 2019-02-20 Jason Merrill <jason@redhat.com>
1858 PR c++/87921 - wrong error with inline static data member.
1859 * decl2.c (finish_static_data_member_decl): Don't set DECL_IN_AGGR_P
1860 for a non-template inline variable. Do nothing for an
1861 already-instantiated variable.
1862 (c_parse_final_cleanups): Check DECL_IN_AGGR_P without
1864 * decl.c (check_initializer): Likewise.
1865 (make_rtl_for_nonlocal_decl): Likewise.
1866 * pt.c (instantiate_decl): Likewise.
1867 * typeck2.c (store_init_value): Likewise.
1869 2019-02-20 Jakub Jelinek <jakub@redhat.com>
1872 * decl2.c (c_parse_final_cleanups): Move TREE_ASM_WRITTEN setting
1873 for flag_syntax_only from here...
1874 * semantics.c (expand_or_defer_fn_1): ... here.
1877 * decl.c (maybe_commonize_var): When clearing TREE_PUBLIC and
1878 DECL_COMMON, set DECL_INTERFACE_KNOWN.
1881 * constexpr.c (cxx_eval_store_expression): Diagnose changing of active
1882 union member for -std=c++17 and earlier.
1884 2019-02-19 Jason Merrill <jason@redhat.com>
1886 PR c++/87513 - 'sorry' mangling PMF template-id.
1887 * mangle.c (write_expression): Handle SCOPE_REF to BASELINK.
1889 2019-02-19 Jason Merrill <jason@redhat.com>
1891 PR c++/88380 - wrong-code with flexible array and NSDMI.
1892 * typeck2.c (process_init_constructor_record): Skip flexarrays.
1894 2019-02-20 will wray <wjwray@gmail.com>
1896 PR c++/88572 - wrong handling of braces on scalar init.
1897 * decl.c (reshape_init_r): Allow braces around scalar initializer
1898 within aggregate init. Reject double braced-init of scalar
1901 2019-02-20 Paolo Carlini <paolo.carlini@oracle.com>
1904 * pt.c (tsubst_init): Diagnose an initializer expanding to an
1905 empty list of expressions; tweak wrt dependent types.
1906 (regenerate_decl_from_template): For VAR_DECLs call tsubst_init
1907 instead of tsubst_expr.
1909 2019-02-19 Jason Merrill <jason@redhat.com>
1911 PR c++/88368 - wrong 'use of deleted function'
1912 * method.c (walk_field_subobs): Remember errors from get_nsdmi.
1913 (get_defaulted_eh_spec): Call push_tinst_level.
1914 * pt.c (maybe_instantiate_noexcept): Keep error_mark_node.
1915 * typeck2.c (merge_exception_specifiers): Handle error_mark_node.
1917 2019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
1920 * parser.c (cp_parser_oacc_clause_wait): Add representation of wait
1921 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
1923 2019-02-19 Jakub Jelinek <jakub@redhat.com>
1926 * lambda.c (maybe_generic_this_capture): Don't check
1927 DECL_NONSTATIC_MEMBER_FUNCTION_P on USING_DECLs.
1930 * typeck.c (build_reinterpret_cast_1): Don't handle void to
1931 && conversion go through build_target_expr_with_type.
1934 * error.c (qualified_name_lookup_error): Only call
1935 suggest_alternative_in_scoped_enum if name is IDENTIFIER_NODE.
1937 2019-02-19 Tom Honermann <tom@honermann.net>
1939 * name-lookup.c (get_std_name_hint): Added u8string as a name hint.
1941 2019-02-18 Jason Merrill <jason@redhat.com>
1943 PR c++/89336 - multiple stores in constexpr stmt.
1944 * constexpr.c (cxx_eval_store_expression): Preevaluate scalar or
1947 * pt.c (check_explicit_specialization): If the declarator is a
1948 template-id, only check whether the arguments are dependent.
1950 Improve duplicate [[likely]] diagnostic.
1951 * parser.c (cp_parser_statement): Make attrs_loc a range. Pass it
1952 to process_stmt_hotness_attribute.
1953 * cp-gimplify.c (process_stmt_hotness_attribute): Take attrs_loc.
1954 (genericize_if_stmt): Use likely/unlikely instead of predictor_name.
1956 2019-02-17 Marek Polacek <polacek@redhat.com>
1958 PR c++/89217 - ICE with list-initialization in range-based for loop.
1959 * constexpr.c (unshare_constructor): No longer static.
1960 * cp-tree.h (unshare_constructor): Declare.
1961 * semantics.c (finish_compound_literal): When dealing with a
1962 non-dependent expression in a template, return the original
1963 expression. Pass LOOKUP_NO_NARROWING to digest_init_flags.
1965 2019-02-13 Marek Polacek <polacek@redhat.com>
1967 PR c++/89297 - ICE with OVERLOAD in template.
1968 * semantics.c (finish_compound_literal): Call
1969 instantiate_non_dependent_expr_sfinae.
1971 2019-02-13 Alexandre Oliva <aoliva@redhat.com>
1974 * cp-tree.h (USING_DECL_SCOPE): Use result rather than type.
1975 * name-lookup.c (strip_using_decl): Use USING_DECL_SCOPE.
1976 * search.c (protected_accessible_p): Follow USING_DECL_DECLS.
1977 (shared_member_p): Likewise.
1978 (lookup_member): Likewise.
1979 * decl.c (grok_special_member_properties): Skip USING_DECLs.
1980 * semantics.c (finish_omp_declare_simd_methods): Likewise.
1981 (finish_qualified_id_expr): Do not call shared_member_p with
1985 * pt.c (tsubst_lambda_expr): Avoid duplicate tsubsting.
1986 Move cp_evaluated resetting before signature tsubsting.
1987 (gen_elem_of_pack_expansion_instantiation): Separate local
1988 specializations per index.
1990 2019-02-13 David Malcolm <dmalcolm@redhat.com>
1993 * class.c (add_method): Drop destructor assertion.
1995 2019-02-13 Paolo Carlini <paolo.carlini@oracle.com>
1998 * decl.c (make_typename_type): Allow for TYPE_PACK_EXPANSION as
1999 context (the first argument).
2000 * pt.c (tsubst, case TYPENAME_TYPE): Handle TYPE_PACK_EXPANSION
2003 2019-02-12 Jason Merrill <jason@redhat.com>
2005 PR c++/89144 - link error with constexpr initializer_list.
2006 * call.c (convert_like_real) [ck_list]: Don't allocate a temporary
2007 array for an empty list.
2008 * typeck2.c (store_init_value): Don't use cxx_constant_init in a
2011 2019-02-11 Jason Merrill <jason@redhat.com>
2013 PR c++/89241 - ICE with __func__ in lambda in template.
2014 * pt.c (enclosing_instantiation_of): Also check
2015 instantiated_lambda_fn_p for the template context.
2017 2019-02-11 Marek Polacek <polacek@redhat.com>
2019 PR c++/89212 - ICE converting nullptr to pointer-to-member-function.
2020 * pt.c (tsubst_copy_and_build) <case CONSTRUCTOR>: Return early for
2021 null member pointer value.
2023 2019-02-11 Jakub Jelinek <jakub@redhat.com>
2026 * pt.c (convert_nontype_argument): Pass true as manifestly_const_eval
2027 to maybe_constant_value calls.
2029 2019-02-11 Marek Polacek <polacek@redhat.com>
2031 * typeck2.c (digest_init_r): Remove commented code.
2033 2019-02-11 Martin Sebor <msebor@redhat.com>
2036 * decl.c (compute_array_index_type_loc): Preserve signed sizes
2037 for diagnostics. Call valid_array_size_p instead of error.
2038 * init.c (build_new_1): Compute size for diagnostic. Call
2039 invalid_array_size_error
2040 (build_new): Call valid_array_size_p instead of error.
2042 2019-02-07 Alexandre Oliva <aoliva@redhat.com>
2045 * call.c (compare_ics): Deal with ck_aggr in either cs.
2047 2019-02-06 David Malcolm <dmalcolm@redhat.com>
2050 * call.c (get_location_for_expr_unwinding_for_system_header): New
2052 (conversion_null_warnings): Use it when getting locations for
2053 EXPR, effectively adding a call to
2054 get_location_for_expr_unwinding_for_system_header for
2055 -Wconversion-null and making use of EXPR_LOCATION for
2056 -Wzero-as-null-pointer-constant.
2058 2019-02-05 Jakub Jelinek <jakub@redhat.com>
2061 * optimize.c (maybe_thunk_body): Clear TREE_ADDRESSABLE on
2062 PARM_DECLs of the thunk.
2063 * lambda.c (maybe_add_lambda_conv_op): Likewise.
2065 2019-02-05 Marek Polacek <polacek@redhat.com>
2067 PR c++/89158 - by-value capture of constexpr variable broken.
2068 * call.c (convert_like_real) <case ck_user>: Call mark_exp_read
2069 instead of mark_rvalue_use.
2071 2019-02-05 Alexandre Oliva <aoliva@redhat.com>
2074 * pt.c (instantiates_primary_template_p): New.
2075 (type_dependent_expression_p): Use it.
2077 2019-02-01 Jason Merrill <jason@redhat.com>
2079 PR c++/88761 - ICE with reference capture of constant.
2080 * lambda.c (mark_const_cap_r): Do walk subtrees of DECL_EXPR for
2083 2019-02-01 Marek Polacek <polacek@redhat.com>
2085 PR c++/88325 - ICE with invalid out-of-line template member definition.
2086 * parser.c (cp_parser_class_name): Don't call make_typename_type
2089 2019-02-01 Jakub Jelinek <jakub@redhat.com>
2092 * parser.c (cp_parser_gnu_attributes_opt): Set ok to false
2093 if require_open failed.
2095 2019-01-31 Marek Polacek <polacek@redhat.com>
2097 PR c++/89083, c++/80864 - ICE with list initialization in template.
2098 * constexpr.c (adjust_temp_type): Use copy_node and change the type
2099 instead of using build_constructor.
2100 * decl.c (reshape_init_r): Don't reshape a digested initializer.
2101 Return the initializer for COMPOUND_LITERAL_P.
2103 PR c++/88983 - ICE with switch in constexpr function.
2104 * constexpr.c (cxx_eval_switch_expr): Use SWITCH_COND and SWITCH_BODY.
2105 (cxx_eval_constant_expression) <case COND_EXPR>: Don't look for the
2106 label in the else branch if we found it in the then branch.
2108 2019-01-30 Jason Merrill <jason@redhat.com>
2110 PR c++/88752 - ICE with lambda and constexpr if.
2111 * cp-tree.h (LAMBDA_EXPR_INSTANTIATED): New.
2112 * pt.c (tsubst_lambda_expr): Set it.
2113 (instantiated_lambda_fn_p): Check it.
2114 (enclosing_instantiation_of): Use it.
2116 2019-01-31 Jakub Jelinek <jakub@redhat.com>
2119 * cxx-pretty-print.c (pp_cxx_enumeration_constant): Print always as
2120 a C cast in pp_c_flag_gnu_v3 mode.
2122 2019-01-30 Jakub Jelinek <jakub@redhat.com>
2125 * lambda.c (is_capture_proxy): Don't return true for
2126 DECL_OMP_PRIVATIZED_MEMBER artificial vars.
2128 2019-01-30 Marek Polacek <polacek@redhat.com>
2130 PR c++/89119 - ICE with value-initialization in template.
2131 * pt.c (tsubst_copy_and_build): Handle RANGE_EXPR.
2133 2019-01-29 Jason Merrill <jason@redhat.com>
2135 PR c++/86943 - wrong code converting lambda to function pointer.
2136 * lambda.c (maybe_add_lambda_conv_op): Use a template-id in the
2137 call. Only forward parms for decltype.
2138 * pt.c (tsubst_copy_and_build) [CALL_EXPR]: Handle CALL_FROM_THUNK_P
2140 * typeck.c (check_return_expr): Don't mess with a thunk call.
2142 2019-01-28 Jason Merrill <jason@redhat.com>
2144 PR c++/89089 - ICE with [[no_unique_address]].
2145 PR c++/88865 - wrong layout with [[no_unique_address]].
2146 * class.c (check_field_decls): A potentially-overlapping field makes
2147 the class non-layout-POD, but not non-empty.
2148 (end_of_class): Always consider empty data members.
2149 (layout_class_type): Set DECL_SIZE for empty fields.
2151 2019-01-28 Marek Polacek <polacek@redhat.com>
2153 PR c++/88358 - name wrongly treated as type.
2154 * parser.c (cp_parser_direct_declarator): Don't assume a qualified-id
2155 in parameter-list is a type if the function's declarator-id is not
2158 2019-01-27 Marek Polacek <polacek@redhat.com>
2160 PR c++/88815 - narrowing conversion lost in decltype.
2161 PR c++/78244 - narrowing conversion in template not detected.
2162 * cp-tree.h (CONSTRUCTOR_IS_DEPENDENT): New.
2163 * pt.c (instantiation_dependent_r): Consider a CONSTRUCTOR with
2164 CONSTRUCTOR_IS_DEPENDENT instantiation-dependent.
2165 * semantics.c (finish_compound_literal): When the compound literal
2166 isn't instantiation-dependent and the type isn't type-dependent,
2167 fall back to the normal processing. Set CONSTRUCTOR_IS_DEPENDENT.
2169 PR c++/89024 - ICE with incomplete enum type.
2170 * call.c (standard_conversion): When converting an
2171 ARITHMETIC_TYPE_P to an incomplete type, return NULL.
2173 2019-01-25 Paolo Carlini <paolo.carlini@oracle.com>
2176 * call.c (build_op_delete_call): Implement 7.6.2.5/(10.1).
2177 * decl2.c (coerce_delete_type): Use build_pointer_type instead
2180 2019-01-24 Jason Merrill <jason@redhat.com>
2182 PR c++/89001 - mangling of reference temporaries
2183 * cp-tree.h (struct saved_scope): Add ref_temp_count.
2184 (current_ref_temp_count): New macro.
2185 * mangle.c (mangle_ref_init_variable): Use it.
2186 * typeck2.c (store_init_value): Clear it.
2187 * call.c (make_temporary_var_for_ref_to_temp): Copy public and
2190 2019-01-24 Jakub Jelinek <jakub@redhat.com>
2193 * semantics.c (finish_omp_cancel): Diagnose more than one if
2194 on #pragma omp cancel with different modifiers. Use
2195 maybe_convert_cond when not in template or build_x_binary_op
2198 2019-01-23 Marek Polacek <polacek@redhat.com>
2200 PR c++/88757 - qualified name treated wrongly as type.
2201 * parser.c (cp_parser_direct_declarator): Don't treat qualified-ids
2202 in parameter-list as types if name lookup for declarator-id didn't
2203 find one or more function templates.
2205 2019-01-23 Jakub Jelinek <jakub@redhat.com>
2208 * cp-gimplify.c (genericize_cp_loop): Call begin_bc_block only
2209 after genericizing cond and incr expressions.
2212 * cp-gimplify.c (genericize_switch_stmt): Move cond genericization
2213 before the begin_bc_block call.
2215 2019-01-21 Jason Merrill <jason@redhat.com>
2217 PR c++/87893 - constexpr ctor ICE on ARM.
2218 PR c++/88293 - ICE with comma expression.
2219 * constexpr.c (initialized_type): Don't shortcut non-void type.
2220 Handle COMPOUND_EXPR.
2221 (cxx_eval_outermost_constant_expr): Return early for void type.
2223 2019-01-21 Jakub Jelinek <jakub@redhat.com>
2226 * optimize.c (cxx_copy_decl): New function.
2227 (clone_body): Use it instead of copy_decl_no_change.
2230 * typeck.c (cp_build_binary_op): Don't instrument
2231 SANITIZE_POINTER_COMPARE if processing_template_decl.
2232 (pointer_diff): Similarly for SANITIZE_POINTER_SUBTRACT.
2234 2019-01-18 Jason Merrill <jason@redhat.com>
2236 PR c++/88875 - error with explicit list constructor.
2237 * call.c (reference_binding): Don't modify EXPR. Set
2238 need_temporary_p on the ck_user conversion for a temporary.
2239 (convert_like_real): Check it.
2241 2019-01-18 H.J. Lu <hongjiu.lu@intel.com>
2245 * call.c (convert_for_arg_passing): Upate the
2246 warn_for_address_or_pointer_of_packed_member call.
2247 * typeck.c (convert_for_assignment): Likewise.
2249 2019-01-17 Jason Merrill <jason@redhat.com>
2251 PR c++/86205 - ICE with ?: of throw and template-id.
2252 * pt.c (resolve_nondeduced_context_or_error): Split out from...
2253 * typeck.c (decay_conversion): ...here.
2254 * call.c (build_conditional_expr_1): Use it.
2256 PR c++/86740, ICE with constexpr if and nested generic lambdas.
2257 * tree.c (cp_walk_subtrees): Handle LAMBDA_EXPR.
2259 2019-01-17 Paolo Carlini <paolo.carlini@oracle.com>
2261 * decl.c (grokdeclarator): Use typespec_loc in error messages
2262 about 'auto' and trailing return type.
2264 2019-01-17 David Malcolm <dmalcolm@redhat.com>
2267 * class.c (add_method): Don't use DECL_DESTRUCTOR_P on
2270 2019-01-17 Nathan Sidwell <nathan@acm.org>
2273 * semantics.c (process_outer_var_ref): Only skip dependent types
2276 2019-01-17 Alexandre Oliva <aoliva@redhat.com>
2279 * cp-tree.h (saved_scope): Add suppress_location_wrappers.
2280 * name-lookup.c (do_push_to_top_level): Save and reset it.
2281 (do_pop_from_top_level): Restore it.
2284 * pt.c (make_template_placeholder): Use auto_identifier.
2285 (is_auto): Drop CLASS_PLACEHOLDER_TEMPLATE test.
2286 * error.c (dump_type): Handle template placeholders.
2287 * cxx-pretty-print.c (pp_cx_unqualified_id): Likewise.
2290 * cvt.c (convert_to_void): Handle all cdtor calls as if
2293 2019-01-16 Paolo Carlini <paolo.carlini@oracle.com>
2295 * decl.c (grokdeclarator): Use locations[ds_storage_class] in
2296 error messages about ill-formed uses of mutable.
2298 2019-01-16 Marek Polacek <polacek@redhat.com>
2300 PR c++/78244 - narrowing conversion in template not detected.
2301 * call.c (perform_implicit_conversion_flags): Set
2302 IMPLICIT_CONV_EXPR_BRACED_INIT.
2303 * cp-tree.h (IMPLICIT_CONV_EXPR_BRACED_INIT): New.
2304 * pt.c (tsubst_copy_and_build): Use it.
2306 2019-01-15 David Malcolm <dmalcolm@redhat.com>
2309 * pt.c (build_deduction_guide): Bail out if tsubst_arg_types
2312 2019-01-15 Paolo Carlini <paolo.carlini@oracle.com>
2314 * decl.c (start_decl): Improve error location.
2315 * decl2.c (grokfield): Likewise.
2317 2019-01-15 Paolo Carlini <paolo.carlini@oracle.com>
2319 * decl.c (grokdeclarator): Move further up the location_t loc
2320 declaration and use the location when building a TYPE_DECL for
2322 * decl2.c (grokbitfield): Use DECL_SOURCE_LOCATION in the error
2323 about an ill-formed bit-field as typedef.
2325 2019-01-14 Marek Polacek <polacek@redhat.com>
2327 PR c++/88830 - ICE with abstract class.
2328 * decl2.c (maybe_emit_vtables): Check CLASSTYPE_LAZY_DESTRUCTOR.
2331 PR c++/88825 - ICE with bogus function return type deduction.
2332 * typeck.c (can_do_nrvo_p): Check error_mark_node.
2334 2019-01-14 Tom Honermann <tom@honermann.net>
2336 Implement P0482R5, char8_t: A type for UTF-8 characters and strings
2337 * cvt.c (type_promotes_to): Handle char8_t promotion.
2338 * decl.c (grokdeclarator): Handle invalid type specifier
2339 combinations involving char8_t.
2340 * lex.c (init_reswords): Add char8_t as a reserved word.
2341 * mangle.c (write_builtin_type): Add name mangling for char8_t (Du).
2342 * parser.c (cp_keyword_starts_decl_specifier_p)
2343 (cp_parser_simple_type_specifier): Recognize char8_t as a simple
2345 (cp_parser_string_literal): Use char8_array_type_node for the type
2347 (cp_parser_set_decl_spec_type): Tolerate char8_t typedefs in system
2349 * rtti.c (emit_support_tinfos): type_info support for char8_t.
2350 * tree.c (char_type_p): Recognize char8_t as a character type.
2351 * typeck.c (string_conv_p): Handle conversions of u8 string
2352 literals of char8_t type.
2353 (check_literal_operator_args): Handle UDLs with u8 string literals
2355 * typeck2.c (ordinary_char_type_p): New.
2356 (digest_init_r): Disallow initializing a char array with a u8 string
2359 2019-01-14 Martin Liska <mliska@suse.cz>
2361 PR gcov-profile/88263
2362 * decl2.c (get_tls_wrapper_fn): Use DECL_SOURCE_LOCATION
2363 as location of the TLS wrapper.
2365 2019-01-12 Paolo Carlini <paolo.carlini@oracle.com>
2367 * decl.c (cp_finish_decl): Improve error location.
2368 * decl2.c (grokfield): Likewise, improve two locations.
2370 2019-01-11 Marek Polacek <polacek@redhat.com>
2372 PR c++/88692, c++/87882 - -Wredundant-move false positive with *this.
2373 * typeck.c (maybe_warn_pessimizing_move): Return if ARG isn't
2376 2019-01-11 Jason Merrill <jason@redhat.com>
2378 PR c++/88312 - pack expansion of decltype.
2379 * pt.c (instantiation_dependent_r): A template non-type parameter
2380 pack is instantiation-dependent.
2382 2019-01-11 Jason Merrill <jason@redhat.com>
2384 PR c++/88613 - ICE with use of const var in lambda.
2385 * expr.c (mark_use): Fix location wrapper handling.
2386 * cp-gimplify.c (cp_fold_maybe_rvalue): Call mark_rvalue_use.
2388 2019-01-11 Tobias Burnus <burnus@net-b.de>
2391 * decl2.c (maybe_emit_vtables): If needed, generate code for
2392 the destructor of an abstract class.
2393 (mark_used): Update comment for older function-name change.
2395 2019-01-11 Paolo Carlini <paolo.carlini@oracle.com>
2397 * decl.c (start_decl): Improve error location.
2398 (grokdeclarator): Likewise, improve two locations.
2400 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
2404 * cp-tree.h: Mechanically replace "can not" with "cannot".
2405 * parser.c: Likewise.
2408 2019-01-08 Paolo Carlini <paolo.carlini@oracle.com>
2410 * decl.c (grok_reference_init): Improve error location.
2411 (grokdeclarator): Likewise, improve two locations.
2413 2019-01-08 Marek Polacek <polacek@redhat.com>
2415 PR c++/88538 - braced-init-list in template-argument-list.
2416 * parser.c (cp_parser_template_argument): Handle braced-init-list when
2419 PR c++/88548 - this accepted in static member functions.
2420 * parser.c (cp_debug_parser): Adjust printing of
2421 local_variables_forbidden_p.
2422 (cp_parser_new): Set local_variables_forbidden_p to 0 rather than false.
2423 (cp_parser_primary_expression): When checking
2424 local_variables_forbidden_p, use THIS_FORBIDDEN or
2425 LOCAL_VARS_FORBIDDEN.
2426 (cp_parser_lambda_body): Update the type of
2427 local_variables_forbidden_p. Set it to 0 rather than false.
2428 (cp_parser_condition): Adjust call to cp_parser_declarator.
2429 (cp_parser_explicit_instantiation): Likewise.
2430 (cp_parser_init_declarator): Likewise.
2431 (cp_parser_declarator): New parameter. Use it.
2432 (cp_parser_direct_declarator): New parameter. Use it to set
2433 local_variables_forbidden_p. Adjust call to cp_parser_declarator.
2434 (cp_parser_type_id_1): Adjust call to cp_parser_declarator.
2435 (cp_parser_parameter_declaration): Likewise.
2436 (cp_parser_default_argument): Update the type of
2437 local_variables_forbidden_p. Set it to LOCAL_VARS_AND_THIS_FORBIDDEN
2439 (cp_parser_member_declaration): Tell cp_parser_declarator if we saw
2440 'static' or 'friend'.
2441 (cp_parser_exception_declaration): Adjust call to cp_parser_declarator.
2442 (cp_parser_late_parsing_default_args): Update the type of
2443 local_variables_forbidden_p. Set it to LOCAL_VARS_AND_THIS_FORBIDDEN
2445 (cp_parser_cache_defarg): Adjust call to cp_parser_declarator.
2446 (cp_parser_objc_class_ivars): Likewise.
2447 (cp_parser_objc_struct_declaration): Likewise.
2448 (cp_parser_omp_for_loop_init): Likewise.
2449 * parser.h (cp_parser): Change the type of local_variables_forbidden_p
2451 (LOCAL_VARS_FORBIDDEN, LOCAL_VARS_AND_THIS_FORBIDDEN, THIS_FORBIDDEN):
2454 2019-01-08 Paolo Carlini <paolo.carlini@oracle.com>
2456 * decl.c (start_decl): Improve permerror location.
2458 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
2459 Jakub Jelinek <jakub@redhat.com>
2462 * decl.c (finish_function): For -Wreturn-type don't add a return *this;
2463 fixit hint if current_class_ref is NULL. Use a single if instead of
2466 2019-01-07 Paolo Carlini <paolo.carlini@oracle.com>
2468 * decl.c (start_decl): Improve two error_at locations.
2469 (expand_static_init): Likewise.
2471 2019-01-07 Marek Polacek <polacek@redhat.com>
2473 PR c++/88741 - wrong error with initializer-string.
2474 * decl.c (cp_complete_array_type): Strip any location wrappers.
2476 2019-01-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
2482 * cp-tree.h (LOOKUP_ALLOW_FLEXARRAY_INIT): New flag value.
2483 * typeck2.c (digest_init_r): Raise an error for non-static
2484 initialization of a flexible array member.
2485 (process_init_constructor, massage_init_elt,
2486 process_init_constructor_array, process_init_constructor_record,
2487 process_init_constructor_union, process_init_constructor): Add the
2488 flags parameter and pass it thru.
2489 (store_init_value): Pass LOOKUP_ALLOW_FLEXARRAY_INIT parameter to
2490 digest_init_flags for static decls.
2492 2019-01-07 Jakub Jelinek <jakub@redhat.com>
2495 * cp-tree.h (cp_build_vec_convert): Declare.
2496 * parser.c (cp_parser_postfix_expression): Parse
2497 __builtin_convertvector.
2498 * constexpr.c: Include fold-const-call.h.
2499 (cxx_eval_internal_function): Handle IFN_VEC_CONVERT.
2500 (potential_constant_expression_1): Likewise.
2501 * semantics.c (cp_build_vec_convert): New function.
2502 * pt.c (tsubst_copy_and_build): Handle CALL_EXPR to
2505 2019-01-03 Jakub Jelinek <jakub@redhat.com>
2508 * decl.c (builtin_function_1): Return result of pushdecl_top_level
2509 or pushdecl rather than decl.
2511 2019-01-03 Paolo Carlini <paolo.carlini@oracle.com>
2513 * tree.c (handle_nodiscard_attribute): Improve warning location.
2515 2019-01-02 Marek Polacek <polacek@redhat.com>
2517 PR c++/88612 - ICE with -Waddress-of-packed-member.
2518 * call.c (convert_for_arg_passing): Only give warnings with tf_warning.
2519 * typeck.c (convert_for_assignment): Likewise.
2521 PR c++/88631 - CTAD failing for value-initialization.
2522 * typeck2.c (build_functional_cast): Try deducing the template
2523 arguments even if there are no arguments to deduce from.
2525 2019-01-01 Jakub Jelinek <jakub@redhat.com>
2527 Update copyright years.
2529 Copyright (C) 2019 Free Software Foundation, Inc.
2531 Copying and distribution of this file, with or without modification,
2532 are permitted in any medium without royalty provided the copyright
2533 notice and this notice are preserved.