1 2019-06-23 Marek Polacek <polacek@redhat.com>
3 * call.c (convert_default_arg): Use DEFERRED_PARSE instead of
5 * cp-objcp-common.c (cp_tree_size): Likewise. Use tree_deferred_parse
6 instead of tree_default_arg.
7 * cp-tree.def: Rename DEFAULT_ARG to DEFERRED_PARSE.
8 * cp-tree.h: Rename DEFARG_TOKENS to DEFPARSE_TOKENS. Rename
9 DEFARG_INSTANTIATIONS to DEFPARSE_INSTANTIATIONS. Rename
10 tree_default_arg to tree_deferred_parse.
11 (UNPARSED_NOEXCEPT_SPEC_P): Use DEFERRED_PARSE instead of DEFAULT_ARG.
12 (cp_tree_node_structure_enum): Rename TS_CP_DEFAULT_ARG to
14 (lang_tree_node): Rename tree_default_arg to tree_deferred_parse.
15 Rename default_arg to deferred_parse. Use TS_CP_DEFERRED_PARSE instead
17 (defarg_location): Remove declaration.
18 (defparse_location): Add declaration.
19 * decl.c (grokfndecl): Use DEFERRED_PARSE instead of DEFAULT_ARG.
20 Call defparse_location instead of defarg_location.
21 (check_default_argument): Use DEFERRED_PARSE instead of DEFAULT_ARG.
22 (cp_tree_node_structure): Likewise. Use TS_CP_DEFERRED_PARSE instead
24 * decl2.c (grokfield): Use DEFERRED_PARSE instead of DEFAULT_ARG.
25 * error.c (dump_expr): Likewise.
26 (location_of): Likewise.
27 * init.c (get_nsdmi): Likewise.
28 * parser.c (cp_parser_save_noexcept): Likewise. Use DEFPARSE_TOKENS
29 instead of DEFARG_TOKENS.
30 (cp_parser_late_noexcept_specifier): Likewise.
31 (cp_parser_late_parse_one_default_arg): Use DEFPARSE_TOKENS instead
33 (cp_parser_late_parsing_default_args): Use DEFERRED_PARSE instead of
34 DEFAULT_ARG. Use DEFPARSE_INSTANTIATIONS instead of
35 DEFARG_INSTANTIATIONS.
36 (cp_parser_cache_defarg): Use DEFERRED_PARSE instead of DEFAULT_ARG.
37 Use DEFPARSE_TOKENS instead of DEFARG_TOKENS. Use
38 DEFPARSE_INSTANTIATIONS instead of DEFARG_INSTANTIATIONS.
39 (defparse_location): Renamed from defarg_location.
40 * pt.c (tsubst_default_argument): Use DEFERRED_PARSE instead of
42 (tsubst_arg_types): Likewise.
43 (dependent_type_p_r): Likewise.
44 * tree.c (cp_tree_equal): Likewise.
45 (cp_walk_subtrees): Likewise.
46 * typeck.c (convert_arguments): Likewise.
48 2019-06-22 Marek Polacek <polacek@redhat.com>
50 PR c++/86476 - noexcept-specifier is a complete-class context.
52 * cp-tree.def (DEFAULT_ARG): Update commentary.
53 * cp-tree.h (UNPARSED_NOEXCEPT_SPEC_P): New macro.
54 (tree_default_arg): Use tree_base instead of tree_common.
55 (do_push_parm_decls, maybe_check_overriding_exception_spec): Declare.
56 * decl.c (do_push_parm_decls): New function, broken out of...
57 (store_parm_decls): ...here. Call it.
58 * except.c (nothrow_spec_p): Accept DEFAULT_ARG in the assert.
59 * parser.c (cp_parser_noexcept_specification_opt,
60 cp_parser_late_noexcept_specifier, noexcept_override_late_checks):
62 (unparsed_noexcepts): New macro.
63 (push_unparsed_function_queues): Update initializer.
64 (cp_parser_direct_declarator): Pass FRIEND_P to
65 cp_parser_exception_specification_opt.
66 (inject_parm_decls): New.
67 (pop_injected_parms): New.
68 (cp_parser_class_specifier_1): Implement delayed parsing of
70 (cp_parser_save_noexcept): New.
71 (cp_parser_late_noexcept_specifier): New.
72 (noexcept_override_late_checks): New.
73 (cp_parser_noexcept_specification_opt): Add FRIEND_P parameter. Call
74 cp_parser_save_noexcept instead of the normal processing if needed.
75 (cp_parser_exception_specification_opt): Add FRIEND_P parameter and
76 pass it to cp_parser_noexcept_specification_opt.
77 (cp_parser_save_member_function_body): Fix comment.
78 (cp_parser_save_default_args): Maybe save the noexcept-specifier to
80 (cp_parser_transaction): Update call to
81 cp_parser_noexcept_specification_opt.
82 (cp_parser_transaction_expression): Likewise.
83 * parser.h (cp_unparsed_functions_entry): Add new field to carry
85 * pt.c (dependent_type_p_r): Handle unparsed noexcept expression.
86 * search.c (maybe_check_overriding_exception_spec): New function, broken
88 (check_final_overrider): ...here. Call
89 maybe_check_overriding_exception_spec.
90 * tree.c (canonical_eh_spec): Handle UNPARSED_NOEXCEPT_SPEC_P.
91 (cp_tree_equal): Handle DEFAULT_ARG.
93 PR c++/90881 - bogus -Wunused-value in unevaluated context.
94 * cvt.c (convert_to_void): Don't emit unused warnings in
95 an unevaluated context.
97 2019-06-22 Paolo Carlini <paolo.carlini@oracle.com>
99 * decl.c (grokdeclarator): Use id_loc, typespec_loc, and
100 locations[ds_storage_class] in a few additional places.
102 2019-06-21 Paolo Carlini <paolo.carlini@oracle.com>
106 2019-05-21 Paolo Carlini <paolo.carlini@oracle.com>
110 * call.c (build_over_call): Devirtualize when the final overrider
113 2019-06-21 Marek Polacek <polacek@redhat.com>
115 PR c++/61490 - qualified-id in friend function definition.
116 * decl.c (grokdeclarator): Diagnose qualified-id in friend function
117 definition. Improve location for diagnostics of friend functions.
119 PR c++/60223 - ICE with T{} in non-deduced context.
120 * pt.c (unify): Allow COMPOUND_LITERAL_P in a non-deduced context.
122 PR c++/64235 - missing syntax error with invalid alignas.
123 * parser.c (cp_parser_std_attribute_spec): Commit to tentative parse
124 if there's a missing close paren.
126 PR c++/90490 - fix decltype issues in noexcept-specifier.
127 * except.c (build_noexcept_spec): Call
128 instantiate_non_dependent_expr_sfinae before
129 build_converted_constant_expr instead of calling
130 instantiate_non_dependent_expr after it. Add
131 processing_template_decl_sentinel.
133 2019-06-21 Jakub Jelinek <jakub@redhat.com>
136 * semantics.c (finish_omp_clauses): Don't reject references to
137 incomplete types if processing_template_decl.
139 2019-06-19 Marek Polacek <polacek@redhat.com>
141 PR c++/60364 - noreturn after first decl not diagnosed.
142 * decl.c (duplicate_decls): Give an error when a function is
143 declared [[noreturn]] after its first declaration.
144 * parser.c (cp_parser_std_attribute): Don't treat C++11 noreturn
145 attribute as equivalent to GNU's.
146 * tree.c (std_attribute_table): Add noreturn.
148 2019-06-19 Jakub Jelinek <jakub@redhat.com>
150 * cp-gimplify.c (cp_genericize_r): Handle OMP_CLAUSE_{IN,EX}CLUSIVE
151 like OMP_CLAUSE_SHARED.
153 2019-06-18 Jason Merrill <jason@redhat.com>
155 * constexpr.c (cxx_eval_store_expression): Delay target evaluation.
157 2019-06-18 Jason Merrill <jason@redhat.com>
159 * constexpr.c (eval_and_check_array_index): Split out from...
160 (cxx_eval_array_reference): ...here.
161 (cxx_eval_store_expression): Use it here, too.
162 (diag_array_subscript): Take location. Strip location wrapper.
164 2019-06-18 Jason Merrill <jason@redhat.com>
166 * constexpr.c (cxx_eval_constant_expression): Handle conversion from
167 and then to the same type.
169 2019-06-18 Jason Merrill <jason@redhat.com>
171 * constexpr.c (unshare_constructor): Add MEM_STAT_DECL.
173 2019-06-17 Jakub Jelinek <jakub@redhat.com>
175 * semantics.c (finish_omp_clauses): For OMP_CLAUSE_REDUCTION_INSCAN
176 set need_copy_assignment.
178 2019-06-17 Marek Polacek <polacek@redhat.com>
180 PR c++/83820 - excessive attribute arguments not detected.
181 * parser.c (cp_parser_std_attribute): Detect excessive arguments.
183 2019-06-17 Nathan Sidwell <nathan@acm.org>
186 * name-lookup.c (lookup_type_scope_1): Calll qualify_lookup before
189 2019-06-14 Marek Polacek <polacek@redhat.com>
191 PR c++/90884 - stray note with -Wctor-dtor-privacy.
192 * class.c (maybe_warn_about_overly_private_class): Guard the call to
195 2019-06-12 Jason Merrill <jason@redhat.com>
197 PR c++/85552 - wrong instantiation of dtor for DMI.
198 * typeck2.c (digest_nsdmi_init): Set tf_no_cleanup for direct-init.
200 2019-06-13 Paolo Carlini <paolo.carlini@oracle.com>
202 * decl.c (grokdeclarator): Use id_loc in five additional places
203 in the last part of the function.
205 2019-06-13 Paolo Carlini <paolo.carlini@oracle.com>
207 * decl.c (grokdeclarator): Move further up the declaration of
208 id_loc, use it immediately, update its value after the loop
209 over declarator, use it again in the final part of function;
210 improve locations of error messages about multiple data types
211 and conflicting specifiers.
213 2019-06-13 Richard Biener <rguenther@suse.de>
216 * typeck2.c (split_nonconstant_init_1): Properly count
217 num_split_elts, optimize single constructor elt removal.
219 2019-06-12 Marek Polacek <polacek@redhat.com>
221 PR c++/66999 - 'this' captured by reference.
222 * parser.c (cp_parser_lambda_introducer): Reject `&this'. Use
223 cp_lexer_nth_token_is instead of cp_lexer_peek_nth_token.
225 PR c++/90825 - endless recursion when evaluating sizeof.
226 PR c++/90832 - endless recursion when evaluating sizeof.
227 * constexpr.c (cxx_eval_constant_expression): Don't recurse on the
228 result of fold_sizeof_expr if is returns a SIZEOF_EXPR.
229 * typeck.c (cxx_sizeof_expr): Only return a SIZEOF_EXPR if the operand
230 is instantiation-dependent.
232 PR c++/90736 - bogus error with alignof.
233 * constexpr.c (adjust_temp_type): Use cv_unqualified type.
235 2019-06-11 Matthew Beliveau <mbelivea@redhat.com>
237 PR c++/90449 - add -Winaccessible-base option.
238 * class.c (warn_about_ambiguous_bases): Changed name to:
239 maybe_warn_about_inaccessible_bases.
240 (maybe_warn_about_inaccessible_bases): Implemented new
241 Winaccessible-base warning option for both direct and virtual
243 (layout_class_type): Call to warn_about_ambiguous_bases changed to fit
246 2019-06-11 Richard Biener <rguenther@suse.de>
249 * typeck2.c (split_nonconstant_init_1): Avoid ordered remove
250 from CONSTRUCTOR by marking to remove elements and doing all
251 of them in a O(n) scan.
253 2019-06-11 Jakub Jelinek <jakub@redhat.com>
256 * init.c (constant_value_1): Handle VECTOR_CST DECL_INITIAL for
257 !DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P decls like CONSTRUCTOR.
259 2019-06-11 Martin Liska <mliska@suse.cz>
262 * pt.c (init_template_processing): Disable hash table
263 sanitization for decl_specializations and type_specializations.
265 2019-06-10 Jason Merrill <jason@redhat.com>
267 * constexpr.c (free_constructor): New.
268 (cxx_eval_call_expression): Free parameter value CONSTRUCTORs.
270 * constexpr.c (unshare_constructor): Only unshare if T is itself a
272 (cxx_eval_call_expression): Don't call it on the result here.
274 Reduce constexpr_call memory consumption.
275 * constexpr.c (cxx_bind_parameters_in_call): Use TREE_VEC rather
277 (constexpr_call_hasher::equal, cxx_bind_parameters_in_call)
278 (cxx_eval_call_expression): Adjust.
280 2019-06-10 Jakub Jelinek <jakub@redhat.com>
282 * parser.c (cp_parser_omp_clause_reduction): Don't sorry_at on inscan
284 (cp_parser_omp_scan_loop_body): New function.
285 (cp_parser_omp_for_loop): Call cp_parser_omp_scan_loop_body if there
286 are inscan reduction clauses.
287 (cp_parser_pragma): Reject PRAGMA_OMP_SCAN.
288 * semantics.c (finish_omp_clauses): Reject mixing inscan with
289 non-inscan reductions on the same construct, or inscan reductions with
290 ordered or schedule clauses, or inscan array reductions.
291 * pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_{IN,EX}CLUSIVE.
292 (tsubst_expr): Handle OMP_SCAN.
294 2019-06-07 Jason Merrill <jason@redhat.com>
296 * constexpr.c (cxx_eval_constant_expression): Call
297 STRIP_ANY_LOCATION_WRAPPER early.
298 [CONVERT_EXPR]: Don't build anything for conversion to void.
299 [ADDR_EXPR]: ggc_free unused ADDR_EXPR.
301 2019-06-05 Martin Sebor <msebor@redhat.com>
304 * typeck.c (maybe_warn_about_returning_address_of_local): Only
305 consider functions returning pointers as candidates for
308 2019-06-05 Paolo Carlini <paolo.carlini@oracle.com>
310 * decl.c (smallest_type_location): New.
311 (check_special_function_return_type): Use it.
312 (grokdeclarator): Lkewise.
314 2019-06-05 Paolo Carlini <paolo.carlini@oracle.com>
316 * decl.c (grokdeclarator): Use locations[ds_friend]
319 2019-06-05 Martin Sebor <msebor@redhat.com>
321 * call.c (build_conditional_expr_1): Adjust quoting and hyphenation.
322 (convert_like_real): Same.
323 (convert_arg_to_ellipsis): Same.
324 * constexpr.c (diag_array_subscript): Same.
325 * constraint.cc (diagnose_trait_expression): Same.
326 * cvt.c (ocp_convert): Same.
327 * decl.c (start_decl): Same.
328 (check_for_uninitialized_const_var): Same.
330 (check_special_function_return_type): Same.
331 (finish_enum_value_list): Same.
332 (start_preparsed_function): Same.
333 * parser.c (cp_parser_decl_specifier_seq): Same.
334 * typeck.c (cp_build_binary_op): Same.
335 (build_static_cast_1): Same.
337 2019-06-04 Nina Dinka Ranns <dinka.ranns@gmail.com>
339 PR c++/63149 - Wrong auto deduction from braced-init-list.
340 * pt.c (listify_autos): use non cv qualified auto_node in
341 std::initializer_list<auto>.
343 2019-06-04 Paolo Carlini <paolo.carlini@oracle.com>
345 * decl.c (grokdeclarator): Use declarator->id_loc in two
348 2019-06-04 Nathan Sidwell <nathan@acm.org>
350 * name-lookup.c (lookup_type_scope_1): Reimplement, handle local
351 and namespace scopes separately.
353 2019-06-04 Harald van Dijk <harald@gigawatt.nl>
355 PR c++/60531 - Wrong error about unresolved overloaded function
356 * typeck.c (cp_build_binary_op): See if overload can be resolved.
357 (cp_build_unary_op): Ditto.
359 2019-06-04 Jason Merrill <jason@redhat.com>
361 Reduce accumulated garbage in constexpr evaluation.
362 * constexpr.c (cxx_eval_call_expression): ggc_free any bindings we
364 (cxx_eval_increment_expression): ggc_free the MODIFY_EXPR after
367 2019-06-04 Jakub Jelinek <jakub@redhat.com>
369 * cp-tree.h (CP_OMP_CLAUSE_INFO): Allow for any clauses up to _condvar_
370 instead of only up to linear.
372 2019-06-03 Paolo Carlini <paolo.carlini@oracle.com>
374 * parser.c (cp_parser_unqualified_id): Use build_min_nt_loc in
377 2019-06-01 Ville Voutilainen <ville.voutilainen@gmail.com>
380 * class.c (fixup_type_variants): Handle CLASSTYPE_FINAL.
382 2019-05-31 Nathan Sidwell <nathan@acm.org>
384 * cp-tree.h (IDENTIFIER_LAMBDA_P): New.
386 (LAMBDA_TYPE_P, TYPE_UNNAMED_P): Likewise.
387 (LAMBDANAME_PREFIX, LAMBDANAME_FORMAT): Delete.
388 (make_lambda_name): Don't declare.
389 * error.c (dump_aggr_type): Check for lambdas before other
391 * lambda.c (begin_lambda_type): Use make_anon_name.
392 * cp-lang.c (cxx_dwarf_name): Lambda names smell anonymous.
393 * mangle.c (write_local_name): Likewise.
394 * name-lookup.c (lambda_cnt, make_lambda_name): Delete.
396 2019-05-30 Marek Polacek <polacek@redhat.com>
398 * cp-tree.h (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Fix a typo.
400 2019-05-31 Paolo Carlini <paolo.carlini@oracle.com>
402 * decl.c (grokdeclarator): Use declarator->id_loc in five
405 2019-05-29 Jakub Jelinek <jakub@redhat.com>
408 * tree.c (lvalue_kind): Return clk_none for expressions with
411 2019-05-29 Paolo Carlini <paolo.carlini@oracle.com>
414 * parser.c (cp_parser_sizeof_operand): When the type-id production
415 did not work out commit to the tentative parse.
417 2019-05-29 Jakub Jelinek <jakub@redhat.com>
419 P1091R3 - Extending structured bindings to be more like var decls
420 P1381R1 - Reference capture of structured bindings
421 * decl.c (cp_maybe_mangle_decomp): Handle TREE_STATIC decls even at
423 (cp_finish_decomp): Copy over various decl properties from decl to
424 v[i] in the tuple case.
425 (grokdeclarator): Allow static, thread_local and __thread for C++2a
426 and use pedwarn instead of error for older standard revisions.
427 Make other structured binding diagnostic messages more i18n friendly.
429 2019-05-28 Nathan Sidwell <nathan@acm.org>
431 * decl.c (duplicate_decls): Assert a template newdecl has no
434 2019-05-28 Marek Polacek <polacek@redhat.com>
436 PR c++/90548 - ICE with generic lambda and empty pack.
437 * pt.c (tsubst_copy_and_build): Handle pack expansion properly.
439 2019-05-28 Nathan Sidwell <nathan@acm.org>
441 * cp-tree.h (make_anon_name): Drop declaration.
442 (TYPE_UNNAMED_P): Use IDENTIFIER_ANON_P.
443 * cp-lang.c (cxx_dwarf_name): Likewise.
444 * class.c (find_flexarrays): Likewise.
445 * decl.c (name_unnamed_type, xref_tag_1): Likewise.
446 * error.c (dump_aggr_type): Likewise.
447 * pt.c (push_template_decl_real): Likewise.
448 * name-lookup.c (consider_binding_level): Likewise.
449 (anon_cnt, make_anon_name): Delete.
451 2019-05-25 Marek Polacek <polacek@redhat.com>
453 PR c++/90572 - wrong disambiguation in friend declaration.
454 * parser.c (cp_parser_constructor_declarator_p): Don't allow missing
455 typename for friend declarations.
457 2019-05-23 Jonathan Wakely <jwakely@redhat.com>
459 * cp-tree.h (CP_AGGREGATE_TYPE_P): Fix whitespace.
461 * init.c (std_placement_new_fn_p): Remove outdated TODO comment that
462 was resolved by r254694.
464 2019-05-22 Jason Merrill <jason@redhat.com>
466 PR c++/20408 - unnecessary code for empty struct.
467 * call.c (build_call_a): Use simple_empty_class_p.
469 PR c++/86485 - -Wmaybe-unused with empty class ?:
470 * cp-gimplify.c (simple_empty_class_p): Also true for MODIFY_EXPR.
472 2019-05-21 Paolo Carlini <paolo.carlini@oracle.com>
474 * parser.c (cp_parser_template_declaration_after_parameters): Use
475 DECL_SOURCE_LOCATION in literal operator template errors.
477 2019-05-21 Paolo Carlini <paolo.carlini@oracle.com>
481 * call.c (build_over_call): Devirtualize when the final overrider
484 2019-05-21 Nathan Sidwell <nathan@acm.org>
486 * name-lookup.c (do_nonmember_using_decl): Drop INSERT_P
488 (finish_nonmember_using_decl): Adjust do_nonmember_using_decl
489 calls. Remove stray FIXME comment.
491 * name-lookup.h (struct cp_binding_level): Drop usings field.
492 (finish_namespace_using_decl, finish_local_using_decl): Replace with ...
493 (finish_nonmember_using_decl): ... this.
494 * name-lookup.c (push_using_decl_1, push_using_decl):
495 (do_nonmember_using_decl): ... here. Add INSERT_P arg. Reimplement.
496 (validate_nonmember_using_decl, finish_namespace_using_decl)
497 (finish_local_using_decl): Replace with ...
498 (finish_nonmember_using_decl): ... this. Drop DECL parm.
499 * parser.c (cp_parser_using_declaration): Don't do lookup here.
500 * pt.c (tsubst_expr): Do not do using decl lookup here.
502 2019-05-21 Eric Botcazou <ebotcazou@adacore.com>
504 * decl2.c (cpp_check) <IS_ASSIGNMENT_OPERATOR>: New case.
506 2019-05-20 Marek Polacek <polacek@redhat.com>
508 CWG 2094 - volatile scalars are trivially copyable.
510 * tree.c (trivially_copyable_p): Don't check CP_TYPE_VOLATILE_P for
513 2019-05-20 Marek Polacek <polacek@redhat.com>
515 * pt.c (convert_template_argument): Add a diagnostic for the
516 [temp.arg]/2 ambiguity case.
518 * name-lookup.c (finish_using_directive): Don't issue inform() if the
519 warning didn't trigger. Add quoting. Tweak the inform message.
521 2019-05-20 Paolo Carlini <paolo.carlini@oracle.com>
523 * cp-tree.h: Remove remnants of CONV_NONCONVERTING.
525 2019-05-20 Nathan Sidwell <nathan@acm.org>
527 * name-lookup.c (finish_namespace_using_directive)
528 (finish_local_using_directive): Merge to ...
529 (finish_using_directive): ... here. Handle both contexts.
530 * name-lookup.h (finish_namespace_using_directive)
531 (finish_local_using_directive): Replace with ...
532 (finish_using_directive): ... this.
533 * parser.c (cp_parser_using_directive): Adjust.
534 * pt.c (tsubst_expr): Likewise.
536 * cp-tree.h (struct lang_decl_ns): Remove usings field.
537 (DECL_NAMESPACE_USING): Delete.
538 * name-lookup.c (name_lookup::search_usings): Use namespace's
540 (name_lookup::queue_namespae): Likewise.
541 (finish_namespace_using_directive, push_namespace): Likewise.
542 (has_using_namespace_std_directive): Just search the entire
545 2019-05-20 Jonathan Wakely <jwakely@redhat.com>
547 PR c++/90532 Ensure __is_constructible(T[]) is false
548 * method.c (is_xible_helper): Return error_mark_node for construction
549 of an array of unknown bound.
551 2019-05-17 Thomas Schwinge <thomas@codesourcery.com>
554 * parser.c (cp_finalize_oacc_routine): Rework checking if already
555 marked with an OpenACC 'routine' directive.
558 * parser.c (cp_parser_oacc_routine)
559 (cp_parser_late_parsing_oacc_routine): Normalize order of clauses.
560 (cp_finalize_oacc_routine): Call oacc_verify_routine_clauses.
563 * parser.c (cp_finalize_oacc_routine): Refer to OpenACC 'routine'
564 clauses from "omp declare target" attribute.
566 2019-05-16 Martin Sebor <msebor@redhat.com>
568 * call.c (print_z_candidate): Wrap diagnostic text in a gettext
570 (print_z_candidates): Same.
571 (build_conditional_expr_1): Quote keywords, operators, and types
573 (build_op_delete_call): Same.
574 (maybe_print_user_conv_context): Wrap diagnostic text in a gettext
576 (convert_like_real): Same.
577 (convert_arg_to_ellipsis): Quote keywords, operators, and types
579 (build_over_call): Same.
580 (joust): Break up an overlong line. Wrap diagnostic text in a gettext
582 * constexpr.c (cxx_eval_check_shift_p): Spell out >= in English.
583 (cxx_eval_constant_expression): Quote keywords, operators, and types
585 (potential_constant_expression_1): Same.
586 * cp-gimplify.c (cp_genericize_r): Same.
587 * cvt.c (maybe_warn_nodiscard): Quote keywords, operators, and types
589 (type_promotes_to): Same.
590 * decl.c (check_previous_goto_1): Same.
593 (cp_finish_decl): Avoid parenthesizing a sentence for consistency.
594 (grok_op_properties): Quote keywords, operators, and types
596 * decl2.c (grokfield): Same.
597 (coerce_delete_type): Same.
598 * except.c (is_admissible_throw_operand_or_catch_parameter): Same.
599 * friend.c (do_friend): Quote C++ tokens.
600 * init.c (build_new_1): Quote keywords, operators, and types
602 (build_vec_delete_1): Same.
603 (build_delete): Same.
604 * lex.c (parse_strconst_pragma): Same.
605 (handle_pragma_implementation): Same.
606 (unqualified_fn_lookup_error): Same.
607 * mangle.c (write_type): Same.
608 * method.c (defaulted_late_check): Avoid two consecutive punctuators.
609 * name-lookup.c (cp_binding_level_debug): Remove a trailing newline.
610 (pop_everything): Same.
611 * parser.c (cp_lexer_start_debugging): Quote a macro name.
613 (cp_lexer_stop_debugging): Same.
614 (cp_parser_userdef_numeric_literal): Quote a C++ header name
616 (cp_parser_nested_name_specifier_opt): Quote keywords, operators,
617 and types in diagnostics.
618 (cp_parser_question_colon_clause): Same.
619 (cp_parser_asm_definition): Same.
620 (cp_parser_init_declarator): Same.
621 (cp_parser_template_declaration_after_parameters): Avoid capitalizing
622 a sentence in a diagnostic.
623 (cp_parser_omp_declare_reduction): Quote keywords, operators, and types
625 (cp_parser_transaction): Same.
626 * pt.c (maybe_process_partial_specialization): Replace second call
627 to permerror with inform for consistency with other uses.
628 (expand_integer_pack): Quote keywords, operators, and types
630 * rtti.c (get_typeid): Quote keywords, operators, and types
632 (build_dynamic_cast_1): Same.
633 * semantics.c (finish_asm_stmt): Same.
634 (finish_label_decl): Same.
635 (finish_bases): Same.
636 (finish_offsetof): Same.
637 (cp_check_omp_declare_reduction): Same.
638 (finish_decltype_type): Same.
639 * tree.c (handle_init_priority_attribute): Same. Add detail
641 (maybe_warn_zero_as_null_pointer_constant): Same.
642 * typeck.c (cp_build_binary_op): Quote keywords, operators, and types
644 (cp_build_unary_op): Same.
645 (check_for_casting_away_constness): Same.
646 (build_static_cast): Same.
647 (build_const_cast_1): Same.
648 (maybe_warn_about_returning_address_of_local): Same.
649 (check_return_expr): Same.
650 * typeck2.c (abstract_virtuals_error_sfinae): Same.
651 (digest_init_r): Replace a tab with spaces in a diagnostic.
652 (build_functional_cast): Quote keywords, operators, and types
655 2019-05-15 Jakub Jelinek <jakub@redhat.com>
658 * cp-gimplify.c (genericize_cp_loop): Emit a DEBUG_BEGIN_STMT
659 before the condition (or if missing or constant non-zero at the end
660 of the loop. Emit a DEBUG_BEGIN_STMT before the increment expression
661 if any. Don't call protected_set_expr_location on incr if it already
664 2019-05-15 Marek Polacek <polacek@redhat.com>
666 CWG 2096 - constraints on literal unions.
667 * class.c (check_field_decls): Initialize booleans directly. A union
668 is literal if at least one of its non-static data members is of
669 non-volatile literal type.
671 2019-05-15 Paolo Carlini <paolo.carlini@oracle.com>
673 * cp-tree.h (REFERENCE_VLA_OK): Remove.
674 * lambda.c (build_capture_proxy): Remove use of the above.
676 2019-05-15 Paolo Carlini <paolo.carlini@oracle.com>
678 * call.c (perform_overload_resolution, build_new_method_call_1):
679 Use OVL_P; remove redundant TEMPLATE_DECL checks.
680 * decl.c (grokfndecl): Likewise.
681 * mangle.c (write_expression): Likewise.
682 * parser.c (cp_parser_template_id): Likewise.
683 * pt.c (resolve_overloaded_unification, type_dependent_expression_p):
685 * search.c (build_baselink): Likewise.
686 * tree.c (is_overloaded_fn, dependent_name, maybe_get_fns): Likewise.
688 2019-05-14 Paolo Carlini <paolo.carlini@oracle.com>
690 PR preprocessor/90382
691 * decl.c (grokdeclarator): Fix value assigned to typespec_loc, use
694 2019-05-13 Jason Merrill <jason@redhat.com>
696 Use releasing_vec more broadly.
697 * cp-tree.h (struct releasing_vec): Replace get_ref method with
699 (vec_safe_push, vec_safe_reserve, vec_safe_length, vec_safe_splice):
700 Forwarding functions for releasing_vec.
701 (release_tree_vector): Declare but don't define.
702 * call.c (build_op_delete_call, build_temp, call_copy_ctor)
703 (perform_direct_initialization_if_possible): Use releasing_vec.
704 * constexpr.c (cxx_eval_vec_init_1, cxx_eval_store_expression):
706 * cp-gimplify.c (cp_fold): Likewise.
707 * cvt.c (force_rvalue, ocp_convert): Likewise.
708 * decl.c (get_tuple_decomp_init): Likewise.
709 * except.c (build_throw): Likewise.
710 * init.c (perform_member_init, expand_default_init): Likewise.
711 * method.c (do_build_copy_assign, locate_fn_flags): Likewise.
712 * parser.c (cp_parser_userdef_char_literal)
713 (cp_parser_userdef_numeric_literal)
714 (cp_parser_userdef_string_literal)
715 (cp_parser_perform_range_for_lookup)
716 (cp_parser_range_for_member_function, cp_parser_omp_for_loop)
717 (cp_parser_omp_for_loop_init): Likewise.
718 * pt.c (tsubst_copy_and_build, do_class_deduction): Likewise.
719 * semantics.c (calculate_direct_bases, calculate_bases)
720 (finish_omp_barrier, finish_omp_flush, finish_omp_taskwait)
721 (finish_omp_taskyield, finish_omp_cancel)
722 (finish_omp_cancellation_point): Likewise.
723 * tree.c (build_vec_init_elt, strip_typedefs, strip_typedefs_expr)
724 (build_min_non_dep_op_overload): Likewise.
725 * typeck.c (build_function_call_vec, cp_build_function_call_nary)
726 (cp_build_modify_expr): Likewise.
727 * typeck2.c (build_functional_cast): Likewise.
729 2019-05-11 Paolo Carlini <paolo.carlini@oracle.com>
731 * typeck.c (cp_build_function_call_vec): When mark_used fails
732 unconditionally return error_mark_node.
734 2019-05-10 Paolo Carlini <paolo.carlini@oracle.com>
736 * decl.c (grokvardecl): Use an accurate location in error message
737 about main as a global variable.
739 2019-05-10 Paolo Carlini <paolo.carlini@oracle.com>
741 * call.c (build_call_a): Use FUNC_OR_METHOD_TYPE_P.
742 * cp-gimplify.c (cp_fold): Likewise.
743 * cp-objcp-common.c (cp_type_dwarf_attribute): Likewise.
744 * cp-tree.h (TYPE_OBJ_P, TYPE_PTROBV_P): Likewise.
745 * cvt.c (perform_qualification_conversions): Likewise.
746 * decl.c (grokdeclarator): Likewise.
747 * decl2.c (build_memfn_type): Likewise.
748 * mangle.c (canonicalize_for_substitution, write_type): Likewise.
749 * parser.c (cp_parser_omp_declare_reduction): Likewise.
750 * pt.c (check_explicit_specialization, uses_deducible_template_parms,
751 check_cv_quals_for_unify, dependent_type_p_r): Likewise.
752 * rtti.c (ptr_initializer): Likewise.
753 * semantics.c (finish_asm_stmt, finish_offsetof,
754 cp_check_omp_declare_reduction): Likewise.
755 * tree.c (cp_build_qualified_type_real,
756 cp_build_type_attribute_variant, cxx_type_hash_eq,
757 cxx_copy_lang_qualifiers, cp_free_lang_data): Likewise.
758 * typeck.c (structural_comptypes, convert_arguments,
759 cp_build_addr_expr_1, unary_complex_lvalue, cp_build_c_cast,
760 cp_build_modify_expr, comp_ptr_ttypes_real, type_memfn_rqual):
763 2019-05-10 Marek Polacek <polacek@redhat.com>
765 PR c++/78010 - bogus -Wsuggest-override warning on final function.
766 * class.c (check_for_override): Don't warn for final functions.
768 2019-05-10 Jakub Jelinek <jakub@redhat.com>
771 * config-lang.in (gtfiles): Remove c-family/c-lex.c, add
772 c-family/c-cppbuiltin.c.
774 2019-05-09 Paolo Carlini <paolo.carlini@oracle.com>
778 2018-04-26 Paolo Carlini <paolo.carlini@oracle.com>
780 * decl.c (grokdeclarator): Fix value assigned to typespec_loc, use
783 2019-05-08 Nathan Sidwell <nathan@acm.org>
785 Kill DECL_SAVED_FUNCTION_DATA .
786 * cp-tree.h (language_function): Remove x_auto_return_pattern.
787 (current_function_auto_return_pattern): Delete.
788 (lang_decl_fn): Replace saved_language_function with
789 saved_auto_return type.
790 (DECL_SAVED_FUNCTION_DATA): Delete.
791 (DECL_SAVED_AUTO_RETURN_TYPE): New.
792 (FNDECL_USED_AUTO): Correct documentation.
793 * decl.c (duplicate_decls): Adjust AUTO return handling.
794 (start_preparsed_function): Replace
795 current_function_auto_return_pattern with
796 DECL_SAVED_AUTO_RETURN_TYPE. Remove DECL_SAVED_FUNCTION_DATA
798 (finish_function): Likewise.
799 (save_function_data): Delete.
800 (fndecl_declared_return_type): Reimplement.
801 * mangle.c (write_unqualified_name): Use DECL_SAVED_AUTO_RETURN_TYPE.
802 * method.c (make_thunk, make_alias_for): Likewise.
803 * parser.c (cp_parser_jump_statement): Likewise.
804 * pt.c (do_auto_deduction): Likewise.
805 * typeck.c (check_return_expr): Likewise.
807 2019-05-06 Jason Merrill <jason@redhat.com>
809 PR c++/90171 - reorganize usual_deallocation_fn_p
810 * call.c (struct dealloc_info): New.
811 (usual_deallocation_fn_p): Take a dealloc_info*.
812 (aligned_deallocation_fn_p, sized_deallocation_fn_p): Remove.
813 (build_op_delete_call): Adjust.
815 2019-05-07 Jason Merrill <jason@redhat.com>
817 PR c++/86485 - -Wmaybe-unused with empty class ?:
818 * typeck.c (build_static_cast_1): Use cp_build_addr_expr.
820 * pt.c (type_dependent_expression_p): A non-type template parm with
821 a placeholder type is type-dependent.
823 2019-05-06 Marek Polacek <polacek@redhat.com>
825 PR c++/90265 - ICE with generic lambda.
826 * pt.c (tsubst_copy_and_build): Use a dedicated variable for the last
827 element in the vector.
829 2019-05-03 Martin Liska <mliska@suse.cz>
831 * call.c (build_aggr_conv): Use is_empty instead of
832 elements () == 0 (and similar usages).
833 * parser.c (cp_parser_lambda_introducer): Likewise.
835 2019-05-02 Nathan Sidwell <nathan@acm.org>
837 * semantics.c (finish_id_expression_1): Remove unreachable code.
839 2019-05-01 Nathan Sidwell <nathan@acm.org>
841 * name-lookup.h (get_class_binding_direct): Change final arg to
843 (get_class_binding): Likewise.
844 * name-lookup.c (get_class_binding_direct): Replace TYPE_OR_FNS
845 arg with WANT_TYPE bool. Simplify.
846 (get_class_binding): Adjust final arg.
847 * decl.c (reshape_init_class): Adjust get_class_binding calls.
849 2019-04-30 Nathan Sidwell <nathan@acm.org>
851 * cp-objcp-common.c (cp_common_init_ts): Use MARK_TS_EXP for _EXPR
852 nodes. Call c_common_init_ts.
854 2019-04-29 Nathan Sidwell <nathan@acm.org>
856 * decl.c (duplicate_decls): Add whitespace, move comments into
858 * method.c (explain_implicit_non_constexpr): Refactor.
859 * pt.c (check_explicit_specialization): Fix indentation.
860 * semantics.c (process_outer_var_ref): Reformat.
861 (finish_id_expression_1): Use STRIP_TEMPLATE.
863 2019-04-26 Jonathan Wakely <jwakely@redhat.com>
865 PR c++/90243 - orphaned note in uninstantiated constexpr function
866 * decl.c (check_for_uninitialized_const_var): Suppress notes if no
869 2019-04-26 Paolo Carlini <paolo.carlini@oracle.com>
872 * decl.c (grokdeclarator): Set type to error_mark_node
873 upon error about template placeholder type non followed
874 by a simple declarator-id.
876 2019-04-26 Paolo Carlini <paolo.carlini@oracle.com>
878 * decl.c (grokdeclarator): Fix value assigned to typespec_loc, use
881 2019-04-24 Jason Merrill <jason@redhat.com>
883 PR c++/90227 - error with template parameter packs.
884 * pt.c (coerce_template_parms): Do add empty pack when
887 2019-04-24 Richard Biener <rguenther@suse.de>
889 * call.c (null_ptr_cst_p): Order checks according to expensiveness.
890 (conversion_null_warnings): Likewise.
891 * typeck.c (same_type_ignoring_top_level_qualifiers_p): Return
892 early if type1 == type2.
894 2019-04-22 Jason Merrill <jason@redhat.com>
896 PR c++/87366 - wrong error with alias template.
897 * typeck.c (structural_comptypes): When comparing_specializations,
899 (comptypes): When comparing_specializations, do structural
902 2019-04-19 Jason Merrill <jason@redhat.com>
904 PR c++/90190 - CTAD with list-constructor.
905 * pt.c (do_class_deduction): Don't try the single element deduction
906 if the single element is also a braced list.
908 PR c++/90171 - ICE with destroying delete with size_t parm.
909 * call.c (sized_deallocation_fn_p): New. Use it instead of
910 second_parm_is_size_t in most cases.
911 (second_parm_is_size_t): Don't check for aligned.
913 2019-04-19 Paolo Carlini <paolo.carlini@oracle.com>
916 * pt.c (fn_type_unification): When handling null explicit
917 arguments do not special case non-parameter packs.
919 2019-04-19 Jakub Jelinek <jakub@redhat.com>
922 * pt.c (process_template_parm): Set decl to pushdecl result. If
923 !is_non_type, also set parm to that.
926 * decl.c (struct cp_switch): Remove outside_range_p member.
927 (push_switch): Don't clear it.
928 (pop_switch): Adjust c_do_switch_warnings caller.
929 (finish_case_label): Adjust c_add_case_label caller.
932 * decl.c (duplicate_decls): If remove is main variant and
933 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
934 variant that has newdecl as TYPE_NAME if any.
936 2019-04-18 Jason Merrill <jason@redhat.com>
938 PR c++/87554 - ICE with extern template and reference member.
939 * decl.c (cp_finish_decl): Don't set DECL_INITIAL of external vars.
941 2019-04-17 Jason Merrill <jason@redhat.com>
943 PR c++/90047 - ICE with enable_if alias template.
944 * pt.c (tsubst_decl) [TYPE_DECL]: Don't put an erroneous decl in the
945 hash table when we're in SFINAE context.
947 2019-04-17 Marek Polacek <polacek@redhat.com>
949 PR c++/90124 - bogus error with incomplete type in decltype.
950 * typeck.c (build_class_member_access_expr): Check
951 cp_unevaluated_operand.
953 2019-04-12 Jakub Jelinek <jakub@redhat.com>
956 * decl.c (duplicate_decls): When newdecl's type is its main variant,
957 don't try to remove it from the variant list, but instead assert
960 2019-04-12 Martin Sebor <msebor@redhat.com>
964 * parser.c (cp_parser_has_attribute_expression): Handle assignment
967 2019-04-12 Jason Merrill <jason@redhat.com>
969 * call.c (null_member_pointer_value_p): Handle an empty CONSTRUCTOR
972 2019-04-12 Marek Polacek <polacek@redhat.com>
974 * except.c (build_noexcept_spec): Use build_converted_constant_bool_expr
975 instead of perform_implicit_conversion_flags.
977 PR c++/87603 - constexpr functions are no longer noexcept.
978 * constexpr.c (is_sub_constant_expr): Remove unused function.
979 * cp-tree.h (is_sub_constant_expr): Remove declaration.
980 * except.c (check_noexcept_r): Don't consider a call to a constexpr
983 2019-04-11 Jakub Jelinek <jakub@redhat.com>
986 * parser.h (struct cp_parser): Add
987 type_definition_forbidden_message_arg member.
988 * parser.c (cp_debug_parser): Print it.
989 (cp_parser_check_type_definition): Pass
990 parser->type_definition_forbidden_message_arg as second argument to
992 (cp_parser_has_attribute_expression, cp_parser_sizeof_operand): Set
993 parser->type_definition_forbidden_message_arg and use G_() with
994 %qs for parser->type_definition_forbidden_message instead of
995 building untranslatable message using concat.
997 2019-04-09 Jakub Jelinek <jakub@redhat.com>
1000 * typeck2.c (check_narrowing): Remove trailing space from diagnostics.
1002 2019-04-08 Marek Polacek <polacek@redhat.com>
1004 * typeck2.c (digest_init_r): Don't condition the object slicing warning
1007 2019-04-08 Paolo Carlini <paolo.carlini@oracle.com>
1010 * semantics.c (trait_expr_value): Don't use TYPE_NOTHROW_P
1011 when maybe_instantiate_noexcept fails.
1012 (classtype_has_nothrow_assign_or_copy_p): Likewise.
1013 * method.c (implicitly_declare_fn): Avoid passing error_mark_node
1014 to build_exception_variant.
1016 2019-04-05 Marek Polacek <polacek@redhat.com>
1018 PR c++/87145 - bogus error converting class type in template arg list.
1019 * pt.c (convert_nontype_argument): Don't call
1020 build_converted_constant_expr if it could involve calling a conversion
1021 function with a instantiation-dependent constructor as its argument.
1023 2019-04-05 Martin Sebor <msebor@redhat.com>
1026 * decl.c (reshape_init_array_1): Avoid treating empty strings
1027 as zeros in array initializers.
1028 Use trivial_type_p () instead of TYPE_HAS_TRIVIAL_DFLT().
1030 2019-04-04 Jason Merrill <jason@redhat.com>
1032 PR c++/89948 - ICE with break in statement-expr.
1033 * constexpr.c (cxx_eval_statement_list): Jumping out of a
1034 statement-expr is non-constant.
1036 2019-04-04 Jason Merrill <jason@redhat.com>
1038 PR c++/89966 - error with non-type auto tparm.
1039 * pt.c (do_auto_deduction): Clear tf_partial.
1041 2019-04-04 Jason Merrill <jason@redhat.com>
1043 PR c++/86986 - ICE with TTP with parameter pack.
1044 * pt.c (coerce_template_parameter_pack): Only look at the type of a
1045 non-type parameter pack.
1046 (fixed_parameter_pack_p_1): Don't recurse into the type of a
1047 non-type parameter pack.
1048 (coerce_template_template_parms): Call add_outermost_template_args.
1050 2019-04-04 Martin Sebor <msebor@redhat.com>
1056 * decl.c (reshape_init_array_1): Strip trailing zero-initializers
1057 from arrays of trivial type and known size.
1058 * mangle.c (write_expression): Convert braced initializer lists
1060 (write_expression): Trim trailing zero-initializers from arrays
1062 (write_template_arg_literal): Mangle strings the same as braced
1065 2019-04-03 Jason Merrill <jason@redhat.com>
1067 PR c++/81866 - ICE with member template and default targ.
1068 * pt.c (tsubst_template_decl): Handle getting a type from
1069 retrieve_specialization.
1071 PR c++/86586 - -fcompare-debug=-Wsign-compare.
1072 * typeck.c (cp_build_binary_op): Don't fold for -Wsign-compare.
1074 PR c++/89331 - ICE with offsetof in incomplete class.
1075 * semantics.c (finish_offsetof): Handle error_mark_node.
1076 * typeck.c (build_class_member_access_expr): Call
1077 complete_type_or_maybe_complain before converting to base.
1079 PR c++/89917 - ICE with lambda in variadic mem-init.
1080 * pt.c (make_pack_expansion): Change type_pack_expansion_p to false.
1082 2019-04-01 Jason Merrill <jason@redhat.com>
1084 PR c++/86946 - ICE with function call in template argument.
1086 * pt.c (iterative_hash_template_arg) [CALL_EXPR]: Use
1089 2019-04-01 Paolo Carlini <paolo.carlini@oracle.com>
1092 * pt.c (tsubst_copy): Deal with lookup_name not returing a variable.
1094 2019-03-31 Marek Polacek <polacek@redhat.com>
1096 PR c++/89852 - ICE with C++11 functional cast with { }.
1097 * constexpr.c (fold_non_dependent_expr_template): New static function
1099 (fold_non_dependent_expr): ...here.
1100 (fold_non_dependent_init): New function.
1101 * cp-tree.h (fold_non_dependent_init): Declare.
1102 * typeck2.c (massage_init_elt): Call fold_non_dependent_init instead
1103 of fold_non_dependent_expr. Don't call maybe_constant_init.
1105 2019-03-30 Jason Merrill <jason@redhat.com>
1107 PR c++/89744 - ICE with specialization of member class template.
1108 * pt.c (lookup_template_class_1): If the partial instantiation is
1109 explicitly specialized, adjust.
1110 (maybe_process_partial_specialization): Also adjust
1113 2019-03-29 Jakub Jelinek <jakub@redhat.com>
1116 * typeck.c: Include gimplify.h.
1117 (cp_build_modify_expr) <case COND_EXPR>: Unshare rhs before using it
1118 for second time. Formatting fixes.
1120 2019-03-29 Marek Polacek <polacek@redhat.com>
1122 PR c++/89876 - ICE with deprecated conversion.
1123 * call.c (convert_like_real): Only give warnings with tf_warning.
1125 2019-03-28 Marek Polacek <polacek@redhat.com>
1127 PR c++/89612 - ICE with member friend template with noexcept.
1128 * pt.c (maybe_instantiate_noexcept): For function templates, use their
1129 template result (function decl). Don't set up local specializations.
1130 Temporarily turn on processing_template_decl. Update the template type
1133 PR c++/89836 - bool constant expression and explicit conversions.
1134 * call.c (build_converted_constant_expr_internal): New function,
1136 (build_converted_constant_expr): ...this. New.
1137 (build_converted_constant_bool_expr): New.
1138 * cp-tree.h (build_converted_constant_bool_expr): Declare.
1139 * decl.c (build_explicit_specifier): Call
1140 build_converted_constant_bool_expr.
1142 2019-03-28 Jakub Jelinek <jakub@redhat.com>
1145 * constexpr.c (struct check_for_return_continue_data): New type.
1146 (check_for_return_continue): New function.
1147 (potential_constant_expression_1) <case SWITCH_STMT>: Walk
1148 SWITCH_STMT_BODY to find RETURN_EXPRs or CONTINUE_STMTs not nested
1149 in loop bodies and set *jump_target to that if found.
1151 2019-03-27 Jason Merrill <jason@redhat.com>
1153 PR c++/89831 - error with qualified-id in const member function.
1154 * semantics.c (finish_non_static_data_member): Use object cv-quals
1155 in scoped case, too.
1157 PR c++/89421 - ICE with lambda in template parameter list.
1158 * parser.c (cp_parser_lambda_expression): Also reject a lambda in a
1159 template parameter list before C++20.
1160 * pt.c (type_dependent_expression_p): True for LAMBDA_EXPR.
1161 * semantics.c (begin_class_definition): Restore error about defining
1162 non-lambda class in template parm list.
1164 2019-03-26 Jason Merrill <jason@redhat.com>
1166 PR c++/86932 - missed SFINAE with empty pack.
1167 * pt.c (coerce_template_parms): Don't add an empty pack if
1169 (fn_type_unification): Pass tf_partial to coerce_template_parms.
1171 PR c++/86429 - constexpr variable in lambda.
1174 * constexpr.c (cxx_eval_constant_expression): In a lambda function,
1175 try evaluating the captured variable directly.
1177 2019-03-26 Jakub Jelinek <jakub@redhat.com>
1180 * semantics.c (finish_omp_atomic): Add warning_sentinel for
1181 -Wunused-value around finish_expr_stmt call.
1183 2019-03-25 Paolo Carlini <paolo.carlini@oracle.com>
1187 * parser.c (cp_parser_binary_expression): Don't call cp_fully_fold
1188 to undo the disabling of warnings.
1190 2019-03-25 Jason Merrill <jason@redhat.com>
1192 PR c++/87748 - substitution failure error with decltype.
1193 * pt.c (most_specialized_partial_spec): Clear
1194 processing_template_decl.
1196 2019-03-25 Marek Polacek <polacek@redhat.com>
1198 PR c++/89214 - ICE when initializing aggregates with bases.
1199 * typeck2.c (digest_init_r): Warn about object slicing instead of
1202 PR c++/89705 - ICE with reference binding with conversion function.
1203 * call.c (reference_binding): If the result of the conversion function
1204 is a prvalue of non-class type, use the cv-unqualified type.
1206 2019-03-25 Nathan Sidwell <nathan@acm.org>
1208 * lambda.c (maybe_add_lambda_conv_op): Don't add to comdat group.
1210 2019-03-22 Jakub Jelinek <jakub@redhat.com>
1213 * cp-tree.h (get_tls_wrapper_fn): Remove declaration.
1214 (maybe_get_tls_wrapper_call): Declare.
1215 * decl2.c (get_tls_wrapper_fn): Make static.
1216 (maybe_get_tls_wrapper_call): New function.
1217 * typeck.c (build_class_member_access_expr): Handle accesses to TLS
1219 * semantics.c (finish_qualified_id_expr): Likewise.
1220 (finish_id_expression_1): Use maybe_get_tls_wrapper_call.
1221 * pt.c (tsubst_copy_and_build): Likewise.
1224 * constexpr.c (struct constexpr_ctx): Add constexpr_ops_count member.
1225 (cxx_eval_constant_expression): When not skipping, not constant class
1226 or location wrapper, increment *ctx->constexpr_ops_count and if it is
1227 above constexpr_loop_nest_limit, diagnose failure.
1228 (cxx_eval_outermost_constant_expr): Add constexpr_ops_count and
1229 initialize ctx.constexpr_ops_count to its address.
1230 (is_sub_constant_expr): Likewise.
1232 2019-03-21 Jakub Jelinek <jakub@redhat.com>
1235 * call.c (filed_in_pset): Change pset from hash_set<tree> * to
1236 hash_set<tree, true> &, adjust uses accordingly.
1237 (build_aggr_conv): Change pset from hash_set<tree> *
1238 to hash_set<tree, true>. Replace goto fail; with return NULL;,
1242 * parser.c (cp_parser_lambda_introducer): Add ids and first_capture_id
1243 variables, check for duplicates in this function.
1244 * lambda.c (add_capture): Don't check for duplicates nor use
1246 (register_capture_members): Don't clear IDENTIFIER_MARKED here.
1248 2019-03-21 Paolo Carlini <paolo.carlini@oracle.com>
1251 * method.c (after_nsdmi_defaulted_late_checks): Avoid passing
1252 error_mark_node to comp_except_specs.
1254 2019-03-20 Jason Merrill <jason@redhat.com>
1256 PR c++/87480 - decltype of member access in default template arg
1257 * pt.c (type_unification_real): Accept a dependent result in
1260 2019-03-19 Martin Sebor <msebor@redhat.com>
1262 PR tree-optimization/89688
1263 * typeck2.c (store_init_value): Call braced_lists_to_string for more
1264 kinds of initializers.
1266 2019-03-18 Jason Merrill <jason@redhat.com>
1268 PR c++/89630 - ICE with dependent using-decl as template arg.
1269 * tree.c (cp_tree_equal): Always return false for USING_DECL.
1271 PR c++/89761 - ICE with sizeof... in pack expansion.
1272 * pt.c (argument_pack_element_is_expansion_p): Handle
1273 ARGUMENT_PACK_SELECT.
1275 PR c++/89640 - GNU attributes on lambda.
1276 * parser.c (cp_parser_lambda_declarator_opt): Allow GNU attributes.
1278 PR c++/89682 - wrong access error in default argument.
1279 * pt.c (tsubst_default_argument): Don't defer access checks.
1281 2019-03-18 Paolo Carlini <paolo.carlini@oracle.com>
1284 * semantics.c (finish_non_static_data_member): Check return value
1285 of context_for_name_lookup and immediately return error_mark_node
1288 2019-03-17 Jason Merrill <jason@redhat.com>
1290 PR c++/89571 - ICE with ill-formed noexcept on constructor.
1291 * pt.c (maybe_instantiate_noexcept): Only return false if defaulted.
1292 (regenerate_decl_from_template): Use it for noexcept-specs.
1294 2019-03-14 Jason Merrill <jason@redhat.com>
1296 * parser.c (cp_parser_decl_specifier_seq): Support C++20
1297 concept-definition syntax without 'bool'.
1299 2019-03-14 Jakub Jelinek <jakub@redhat.com>
1302 * semantics.c (finish_qualified_id_expr): Reject variable templates.
1305 * constexpr.c (struct constexpr_ctx): Change save_exprs type from
1306 hash_set<tree> to vec<tree>.
1307 (cxx_eval_call_expression): Adjust for save_exprs being a vec instead
1309 (cxx_eval_loop_expr): Likewise. Truncate the vector after each
1310 removal of SAVE_EXPRs from values.
1311 (cxx_eval_constant_expression) <case SAVE_EXPR>: Call safe_push
1312 method on save_exprs instead of add.
1314 2019-03-13 Jason Merrill <jason@redhat.com>
1316 PR c++/86521 - C++17 copy elision in initialization by constructor.
1317 * call.c (joust_maybe_elide_copy): New.
1320 2019-03-13 Marek Polacek <polacek@redhat.com>
1322 PR c++/88979 - further P0634 fix for constructors.
1323 * parser.c (cp_parser_decl_specifier_seq): Pass flags to
1324 cp_parser_constructor_declarator_p.
1325 (cp_parser_direct_declarator): Allow missing typename for constructor
1327 (cp_parser_constructor_declarator_p): Add FLAGS parameter. Pass it to
1328 cp_parser_type_specifier.
1330 PR c++/89686 - mixing init-capture and simple-capture in lambda.
1331 * parser.c (cp_parser_lambda_introducer): Give error when combining
1332 init-capture and simple-capture.
1334 PR c++/89660 - bogus error with -Wredundant-move.
1335 * typeck.c (maybe_warn_pessimizing_move): Only accept (T &) &arg
1336 as the std::move's argument. Don't call convert_for_initialization
1337 when warn_redundant_move isn't on.
1339 2019-03-11 Jason Merrill <jason@redhat.com>
1341 PR c++/86521 - wrong overload resolution with ref-qualifiers.
1342 * call.c (build_user_type_conversion_1): Don't use a conversion to a
1343 reference of the wrong rvalueness for direct binding.
1345 2019-03-11 Martin Liska <mliska@suse.cz>
1347 * cvt.c (build_expr_type_conversion): Wrap apostrophes
1348 in gcc internal format with %'.
1349 * decl.c (check_no_redeclaration_friend_default_args): Likewise.
1350 (grokfndecl): Likewise.
1351 * name-lookup.c (do_pushtag): Likewise.
1352 * pt.c (unify_parameter_deduction_failure): Likewise.
1353 (unify_template_deduction_failure): Likewise.
1355 2019-03-11 Martin Liska <mliska@suse.cz>
1357 * call.c (convert_arg_to_ellipsis): Wrap an option name
1358 in a string format message and fix GNU coding style.
1359 (build_over_call): Likewise.
1360 * class.c (check_field_decl): Likewise.
1361 (layout_nonempty_base_or_field): Likewise.
1362 * constexpr.c (cxx_eval_loop_expr): Likewise.
1363 * cvt.c (type_promotes_to): Likewise.
1364 * decl.c (cxx_init_decl_processing): Likewise.
1365 (mark_inline_variable): Likewise.
1366 (grokdeclarator): Likewise.
1367 * decl2.c (record_mangling): Likewise.
1368 * error.c (maybe_warn_cpp0x): Likewise.
1369 * except.c (doing_eh): Likewise.
1370 * mangle.c (maybe_check_abi_tags): Likewise.
1371 * parser.c (cp_parser_diagnose_invalid_type_name): Likewise.
1372 (cp_parser_userdef_numeric_literal): Likewise.
1373 (cp_parser_primary_expression): Likewise.
1374 (cp_parser_unqualified_id): Likewise.
1375 (cp_parser_pseudo_destructor_name): Likewise.
1376 (cp_parser_builtin_offsetof): Likewise.
1377 (cp_parser_lambda_expression): Likewise.
1378 (cp_parser_lambda_introducer): Likewise.
1379 (cp_parser_lambda_declarator_opt): Likewise.
1380 (cp_parser_selection_statement): Likewise.
1381 (cp_parser_init_statement): Likewise.
1382 (cp_parser_decomposition_declaration): Likewise.
1383 (cp_parser_function_specifier_opt): Likewise.
1384 (cp_parser_static_assert): Likewise.
1385 (cp_parser_simple_type_specifier): Likewise.
1386 (cp_parser_namespace_definition): Likewise.
1387 (cp_parser_using_declaration): Likewise.
1388 (cp_parser_ctor_initializer_opt_and_function_body): Likewise.
1389 (cp_parser_initializer_list): Likewise.
1390 (cp_parser_type_parameter_key): Likewise.
1391 (cp_parser_member_declaration): Likewise.
1392 (cp_parser_try_block): Likewise.
1393 (cp_parser_std_attribute_spec): Likewise.
1394 (cp_parser_requires_clause_opt): Likewise.
1395 * pt.c (check_template_variable): Likewise.
1396 (check_default_tmpl_args): Likewise.
1397 (push_tinst_level_loc): Likewise.
1398 (instantiate_pending_templates): Likewise.
1399 (invalid_nontype_parm_type_p): Likewise.
1400 * repo.c (get_base_filename): Likewise.
1401 * rtti.c (typeid_ok_p): Likewise.
1402 (build_dynamic_cast_1): Likewise.
1403 * tree.c (maybe_warn_parm_abi): Likewise.
1405 2019-03-08 Jakub Jelinek <jakub@redhat.com>
1408 * parser.c (cp_parser_template_declaration_after_parameters): Avoid
1409 one space before " at the end of line and another after " on another
1410 line in a string literal.
1412 PR tree-optimization/89550
1413 * semantics.c (maybe_convert_cond): Only set TREE_NO_WARNING if
1414 warning_at returned true.
1415 * decl2.c (c_parse_final_cleanups): Likewise.
1416 * typeck.c (convert_for_assignment): Likewise.
1417 * decl.c (finish_function): Likewise.
1420 * parser.c (cp_parser_asm_definition): Just warn instead of error
1421 on volatile qualifier outside of function body.
1424 * constexpr.c (potential_constant_expression_1): Reject
1425 REINTERPRET_CAST_P NOP_EXPRs.
1428 * call.c (joust): Call print_z_candidate only if pedwarn returned
1431 2019-03-07 Jason Merrill <jason@redhat.com>
1433 PR c++/88123 - lambda and using-directive.
1434 * name-lookup.c (op_unqualified_lookup)
1435 (maybe_save_operator_binding, discard_operator_bindings)
1436 (push_operator_bindings): New.
1437 * typeck.c (build_x_binary_op, build_x_unary_op): Call
1438 maybe_save_operator_binding.
1439 * decl.c (start_preparsed_function): Call push_operator_bindings.
1440 * tree.c (cp_free_lang_data): Call discard_operator_bindings.
1442 PR c++/88820 - ICE with CTAD and member template used in DMI.
1443 * pt.c (do_class_deduction): Handle parm used as its own arg.
1445 2019-03-07 Jakub Jelinek <jakub@redhat.com>
1448 * parser.c (cp_parser_asm_definition): Parse asm qualifiers even
1449 at toplevel, but diagnose them.
1451 2019-03-06 Jason Merrill <jason@redhat.com>
1453 PR c++/89381 - implicit copy and using-declaration.
1454 * class.c (classtype_has_move_assign_or_move_ctor_p): Don't consider
1455 op= brought in by a using-declaration.
1457 2019-03-06 Jakub Jelinek <jakub@redhat.com>
1460 * init.c (build_value_init_noctor): Ignore flexible array members.
1462 2019-03-06 Jason Merrill <jason@redhat.com>
1464 PR c++/89576 - if constexpr of lambda capture.
1465 * semantics.c (maybe_convert_cond): Do convert a non-dependent
1466 condition in a template.
1467 * typeck.c (condition_conversion): Handle being called in a
1470 2019-03-06 Marek Polacek <polacek@redhat.com>
1472 PR c++/87378 - bogus -Wredundant-move warning.
1473 * typeck.c (maybe_warn_pessimizing_move): See if the maybe-rvalue
1474 overload resolution would actually succeed.
1476 2019-03-05 Jason Merrill <jason@redhat.com>
1478 * class.c (is_really_empty_class): Add ignore_vptr parm.
1479 (trivial_default_constructor_is_constexpr): Pass it.
1480 * call.c (build_over_call): Pass it.
1481 * constexpr.c (cxx_eval_constant_expression): Pass it instead of
1482 checking TYPE_POLYMORPHIC_P.
1483 (cxx_eval_component_reference, potential_constant_expression_1):
1485 * cp-gimplify.c (simple_empty_class_p): Pass it.
1486 * init.c (expand_aggr_init_1): Pass it.
1488 2019-03-04 Paolo Carlini <paolo.carlini@oracle.com>
1491 * parser.c (cp_parser_class_head): Reject TYPE_BEING_DEFINED too.
1493 2019-03-04 Jakub Jelinek <jakub@redhat.com>
1496 * call.c (field_in_pset): New function.
1497 (build_aggr_conv): Handle CONSTRUCTOR_IS_DESIGNATED_INIT correctly.
1499 2019-03-02 Jakub Jelinek <jakub@redhat.com>
1502 * cp-tree.h (CONSTRUCTOR_IS_DESIGNATED_INIT): Define.
1503 * parser.c (cp_parser_braced_list): Adjust cp_parser_initializer_list
1504 caller, set CONSTRUCTOR_IS_DESIGNATED_INIT.
1505 (cp_parser_initializer_list): Add designated parameter, set *designated
1506 to a bool whether any designators were parsed.
1507 * decl.c (reshape_init): Copy over CONSTRUCTOR_IS_DESIGNATED_INIT if
1509 * pt.c (tsubst_copy_and_build): Likewise.
1510 * call.c (implicit_conversion): If CONSTRUCTOR_IS_DESIGNATED_INIT,
1511 don't call build_list_conv, nor build_complex_conv, nor attempt to
1512 convert a single element initializer to scalar.
1514 2019-03-01 Marek Polacek <polacek@redhat.com>
1516 PR c++/89537 - missing location for error with non-static member fn.
1517 * call.c (resolve_args): Use EXPR_LOCATION.
1518 * typeck.c (build_class_member_access_expr): Use input_location.
1520 PR c++/89532 - ICE with incomplete type in decltype.
1521 * semantics.c (finish_compound_literal): Return error_mark_node
1522 if digest_init_flags returns error_mark_node.
1524 2019-03-01 Jakub Jelinek <jakub@redhat.com>
1526 Implement P1002R1, Try-catch blocks in constexpr functions
1528 * parser.c (cp_parser_ctor_initializer_opt_and_function_body):
1529 Diagnose constexpr ctor or function with function-try-block with
1530 pedwarn for c++17 and earlier. Formatting fix.
1531 (cp_parser_try_block): Use pedwarn instead of error and only for
1532 c++17 and earlier when try block appears in constexpr function.
1533 * constexpr.c (build_constexpr_constructor_member_initializers):
1534 Handle TRY_BLOCK here instead of erroring on it.
1536 2019-02-28 Jason Merrill <jason@redhat.com>
1538 PR c++/88183 - ICE with .* fold-expression.
1539 * pt.c (fold_expression) [DOTSTAR_EXPR]: Remove special handling.
1541 PR c++/86969 - ICE with constexpr if and recursive generic lambdas.
1542 * class.c, lambda.c, pt.c: Revert earlier change.
1543 * lambda.c (add_capture): Don't special-case capture of dependent
1546 * name-lookup.c (print_binding_level): Print this_entity.
1548 2019-02-27 Marek Polacek <polacek@redhat.com>
1550 PR c++/88857 - ICE with value-initialization of argument in template.
1551 * call.c (convert_like_real): Don't call build_value_init in template.
1553 2019-02-27 Jason Merrill <jason@redhat.com>
1555 PR c++/86969 - ICE with constexpr if and recursive generic lambdas.
1556 * semantics.c (process_outer_var_ref): Do capture dependent vars.
1557 * class.c (finish_struct): Only add TAG_DEFN if T is in
1558 current_function_decl.
1559 * lambda.c (vla_capture_type): Force the capture type out into the
1560 lambda's enclosing function.
1561 (add_capture): Pass in the lambda.
1562 * pt.c (tsubst_lambda_expr): complete_type a VLA capture type.
1564 2019-02-27 Marek Polacek <polacek@redhat.com>
1566 PR c++/89511 - ICE with using-declaration and unscoped enumerator.
1567 * parser.c (cp_parser_using_declaration): For an unscoped enum
1568 only use its context if it's not a function declaration.
1570 2019-02-27 Paolo Carlini <paolo.carlini@oracle.com>
1573 * method.c (process_subob_fn): When maybe_instantiate_noexcept
1574 returns false don't call merge_exception_specifiers.
1576 2019-02-27 Paolo Carlini <paolo.carlini@oracle.com>
1579 * parser.c (cp_parser_noexcept_specification_opt): Return NULL_TREE
1580 for a non-constant parsed expression.
1582 2019-02-26 Jakub Jelinek <jakub@redhat.com>
1585 * constexpr.c (cxx_eval_store_expression): When changing active union
1586 member, set no_zero_init.
1588 2019-02-23 Marek Polacek <polacek@redhat.com>
1590 PR c++/88294 - ICE with non-constant noexcept-specifier.
1591 * pt.c (maybe_instantiate_noexcept): Set up the list of local
1592 specializations. Set current_class_{ptr,ref}.
1594 2019-02-22 David Malcolm <dmalcolm@redhat.com>
1597 * parser.c (cp_parser_unqualified_id): Capture and use locations
1600 2019-02-22 Marek Polacek <polacek@redhat.com>
1602 PR c++/89420 - ICE with CAST_EXPR in explicit-specifier.
1603 * decl.c (build_explicit_specifier): Don't check
1604 processing_template_decl. Call instantiation_dependent_expression_p
1605 instead of value_dependent_expression_p. Call
1606 instantiate_non_dependent_expr_sfinae before
1607 build_converted_constant_expr instead of calling
1608 instantiate_non_dependent_expr after it. Add
1609 processing_template_decl_sentinel.
1611 2019-02-22 Thomas Schwinge <thomas@codesourcery.com>
1613 * parser.c (cp_parser_oacc_simple_clause): Remove parser formal
1614 parameter, move loc formal parameter to the front. Adjust all
1616 (cp_parser_oacc_shape_clause): Add loc formal parameter. Adjust
1619 2019-02-21 Jason Merrill <jason@redhat.com>
1621 PR c++/87685 - generic lambda 'this' capture error.
1622 * lambda.c (lambda_expr_this_capture): Change add_capture_p to int.
1623 (maybe_generic_this_capture): Pass -1.
1625 PR c++/88394 - ICE with VLA init-capture.
1626 * lambda.c (is_normal_capture_proxy): Check DECL_CAPTURED_VARIABLE.
1628 PR c++/88869 - C++17 ICE with CTAD and explicit specialization.
1629 * pt.c (do_class_deduction): Don't include explicit specialization
1632 PR c++/89422 - ICE with -g and lambda in default arg in template.
1633 * pt.c (tsubst_function_decl): SET_DECL_FRIEND_CONTEXT sooner.
1635 2019-02-21 Jason Merrill <jason@redhat.com>
1637 PR c++/88419 - C++17 ICE with class template arg deduction.
1638 * pt.c (make_template_placeholder): Set TYPE_CANONICAL after
1639 CLASS_PLACEHOLDER_TEMPLATE.
1641 2019-02-21 Jakub Jelinek <jakub@redhat.com>
1644 * constexpr.c (struct constexpr_fundef): Add parms and result members.
1645 (retrieve_constexpr_fundef): Adjust for the above change.
1646 (register_constexpr_fundef): Save constexpr body with copy_fn,
1647 temporarily set DECL_CONTEXT on DECL_RESULT before that.
1648 (get_fundef_copy): Change FUN argument to FUNDEF with
1649 constexpr_fundef * type, grab body and parms/result out of
1650 constexpr_fundef struct and temporarily change it for copy_fn calls
1652 (cxx_eval_builtin_function_call): For __builtin_FUNCTION temporarily
1653 adjust current_function_decl from ctx->call context. Test
1654 !potential_constant_expression instead of !is_constant_expression.
1655 (cxx_bind_parameters_in_call): Grab parameters from new_call. Undo
1656 convert_for_arg_passing changes for TREE_ADDRESSABLE type passing.
1657 (cxx_eval_call_expression): Adjust get_fundef_copy caller.
1658 (cxx_eval_conditional_expression): For IF_STMT, allow then or else
1659 operands to be NULL.
1660 (label_matches): Handle BREAK_STMT and CONTINUE_STMT.
1661 (cxx_eval_loop_expr): Add support for FOR_STMT, WHILE_STMT and DO_STMT.
1662 (cxx_eval_switch_expr): Add support for SWITCH_STMT.
1663 (cxx_eval_constant_expression): Handle IF_STMT, FOR_STMT, WHILE_STMT,
1664 DO_STMT, CONTINUE_STMT, SWITCH_STMT, BREAK_STMT and CONTINUE_STMT.
1665 For SIZEOF_EXPR, recurse on the result of fold_sizeof_expr. Ignore
1666 DECL_EXPR with USING_DECL operand.
1667 * lambda.c (maybe_add_lambda_conv_op): Build thisarg using
1668 build_int_cst to make it a valid constant expression.
1670 2019-02-20 Jason Merrill <jason@redhat.com>
1672 PR c++/88690 - C++17 ICE with empty base in aggregate.
1673 * typeck2.c (process_init_constructor_record): Skip trivial
1674 initialization of an empty base.
1676 2019-02-21 Richard Biener <rguenther@suse.de>
1679 * vtable-class-hierarchy.c (vtv_generate_init_routine): Do not
1680 make symtab process new functions here.
1682 2019-02-20 Jason Merrill <jason@redhat.com>
1684 PR c++/87921 - wrong error with inline static data member.
1685 * decl2.c (finish_static_data_member_decl): Don't set DECL_IN_AGGR_P
1686 for a non-template inline variable. Do nothing for an
1687 already-instantiated variable.
1688 (c_parse_final_cleanups): Check DECL_IN_AGGR_P without
1690 * decl.c (check_initializer): Likewise.
1691 (make_rtl_for_nonlocal_decl): Likewise.
1692 * pt.c (instantiate_decl): Likewise.
1693 * typeck2.c (store_init_value): Likewise.
1695 2019-02-20 Jakub Jelinek <jakub@redhat.com>
1698 * decl2.c (c_parse_final_cleanups): Move TREE_ASM_WRITTEN setting
1699 for flag_syntax_only from here...
1700 * semantics.c (expand_or_defer_fn_1): ... here.
1703 * decl.c (maybe_commonize_var): When clearing TREE_PUBLIC and
1704 DECL_COMMON, set DECL_INTERFACE_KNOWN.
1707 * constexpr.c (cxx_eval_store_expression): Diagnose changing of active
1708 union member for -std=c++17 and earlier.
1710 2019-02-19 Jason Merrill <jason@redhat.com>
1712 PR c++/87513 - 'sorry' mangling PMF template-id.
1713 * mangle.c (write_expression): Handle SCOPE_REF to BASELINK.
1715 2019-02-19 Jason Merrill <jason@redhat.com>
1717 PR c++/88380 - wrong-code with flexible array and NSDMI.
1718 * typeck2.c (process_init_constructor_record): Skip flexarrays.
1720 2019-02-20 will wray <wjwray@gmail.com>
1722 PR c++/88572 - wrong handling of braces on scalar init.
1723 * decl.c (reshape_init_r): Allow braces around scalar initializer
1724 within aggregate init. Reject double braced-init of scalar
1727 2019-02-20 Paolo Carlini <paolo.carlini@oracle.com>
1730 * pt.c (tsubst_init): Diagnose an initializer expanding to an
1731 empty list of expressions; tweak wrt dependent types.
1732 (regenerate_decl_from_template): For VAR_DECLs call tsubst_init
1733 instead of tsubst_expr.
1735 2019-02-19 Jason Merrill <jason@redhat.com>
1737 PR c++/88368 - wrong 'use of deleted function'
1738 * method.c (walk_field_subobs): Remember errors from get_nsdmi.
1739 (get_defaulted_eh_spec): Call push_tinst_level.
1740 * pt.c (maybe_instantiate_noexcept): Keep error_mark_node.
1741 * typeck2.c (merge_exception_specifiers): Handle error_mark_node.
1743 2019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
1746 * parser.c (cp_parser_oacc_clause_wait): Add representation of wait
1747 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
1749 2019-02-19 Jakub Jelinek <jakub@redhat.com>
1752 * lambda.c (maybe_generic_this_capture): Don't check
1753 DECL_NONSTATIC_MEMBER_FUNCTION_P on USING_DECLs.
1756 * typeck.c (build_reinterpret_cast_1): Don't handle void to
1757 && conversion go through build_target_expr_with_type.
1760 * error.c (qualified_name_lookup_error): Only call
1761 suggest_alternative_in_scoped_enum if name is IDENTIFIER_NODE.
1763 2019-02-19 Tom Honermann <tom@honermann.net>
1765 * name-lookup.c (get_std_name_hint): Added u8string as a name hint.
1767 2019-02-18 Jason Merrill <jason@redhat.com>
1769 PR c++/89336 - multiple stores in constexpr stmt.
1770 * constexpr.c (cxx_eval_store_expression): Preevaluate scalar or
1773 * pt.c (check_explicit_specialization): If the declarator is a
1774 template-id, only check whether the arguments are dependent.
1776 Improve duplicate [[likely]] diagnostic.
1777 * parser.c (cp_parser_statement): Make attrs_loc a range. Pass it
1778 to process_stmt_hotness_attribute.
1779 * cp-gimplify.c (process_stmt_hotness_attribute): Take attrs_loc.
1780 (genericize_if_stmt): Use likely/unlikely instead of predictor_name.
1782 2019-02-17 Marek Polacek <polacek@redhat.com>
1784 PR c++/89217 - ICE with list-initialization in range-based for loop.
1785 * constexpr.c (unshare_constructor): No longer static.
1786 * cp-tree.h (unshare_constructor): Declare.
1787 * semantics.c (finish_compound_literal): When dealing with a
1788 non-dependent expression in a template, return the original
1789 expression. Pass LOOKUP_NO_NARROWING to digest_init_flags.
1791 2019-02-13 Marek Polacek <polacek@redhat.com>
1793 PR c++/89297 - ICE with OVERLOAD in template.
1794 * semantics.c (finish_compound_literal): Call
1795 instantiate_non_dependent_expr_sfinae.
1797 2019-02-13 Alexandre Oliva <aoliva@redhat.com>
1800 * cp-tree.h (USING_DECL_SCOPE): Use result rather than type.
1801 * name-lookup.c (strip_using_decl): Use USING_DECL_SCOPE.
1802 * search.c (protected_accessible_p): Follow USING_DECL_DECLS.
1803 (shared_member_p): Likewise.
1804 (lookup_member): Likewise.
1805 * decl.c (grok_special_member_properties): Skip USING_DECLs.
1806 * semantics.c (finish_omp_declare_simd_methods): Likewise.
1807 (finish_qualified_id_expr): Do not call shared_member_p with
1811 * pt.c (tsubst_lambda_expr): Avoid duplicate tsubsting.
1812 Move cp_evaluated resetting before signature tsubsting.
1813 (gen_elem_of_pack_expansion_instantiation): Separate local
1814 specializations per index.
1816 2019-02-13 David Malcolm <dmalcolm@redhat.com>
1819 * class.c (add_method): Drop destructor assertion.
1821 2019-02-13 Paolo Carlini <paolo.carlini@oracle.com>
1824 * decl.c (make_typename_type): Allow for TYPE_PACK_EXPANSION as
1825 context (the first argument).
1826 * pt.c (tsubst, case TYPENAME_TYPE): Handle TYPE_PACK_EXPANSION
1829 2019-02-12 Jason Merrill <jason@redhat.com>
1831 PR c++/89144 - link error with constexpr initializer_list.
1832 * call.c (convert_like_real) [ck_list]: Don't allocate a temporary
1833 array for an empty list.
1834 * typeck2.c (store_init_value): Don't use cxx_constant_init in a
1837 2019-02-11 Jason Merrill <jason@redhat.com>
1839 PR c++/89241 - ICE with __func__ in lambda in template.
1840 * pt.c (enclosing_instantiation_of): Also check
1841 instantiated_lambda_fn_p for the template context.
1843 2019-02-11 Marek Polacek <polacek@redhat.com>
1845 PR c++/89212 - ICE converting nullptr to pointer-to-member-function.
1846 * pt.c (tsubst_copy_and_build) <case CONSTRUCTOR>: Return early for
1847 null member pointer value.
1849 2019-02-11 Jakub Jelinek <jakub@redhat.com>
1852 * pt.c (convert_nontype_argument): Pass true as manifestly_const_eval
1853 to maybe_constant_value calls.
1855 2019-02-11 Marek Polacek <polacek@redhat.com>
1857 * typeck2.c (digest_init_r): Remove commented code.
1859 2019-02-11 Martin Sebor <msebor@redhat.com>
1862 * decl.c (compute_array_index_type_loc): Preserve signed sizes
1863 for diagnostics. Call valid_array_size_p instead of error.
1864 * init.c (build_new_1): Compute size for diagnostic. Call
1865 invalid_array_size_error
1866 (build_new): Call valid_array_size_p instead of error.
1868 2019-02-07 Alexandre Oliva <aoliva@redhat.com>
1871 * call.c (compare_ics): Deal with ck_aggr in either cs.
1873 2019-02-06 David Malcolm <dmalcolm@redhat.com>
1876 * call.c (get_location_for_expr_unwinding_for_system_header): New
1878 (conversion_null_warnings): Use it when getting locations for
1879 EXPR, effectively adding a call to
1880 get_location_for_expr_unwinding_for_system_header for
1881 -Wconversion-null and making use of EXPR_LOCATION for
1882 -Wzero-as-null-pointer-constant.
1884 2019-02-05 Jakub Jelinek <jakub@redhat.com>
1887 * optimize.c (maybe_thunk_body): Clear TREE_ADDRESSABLE on
1888 PARM_DECLs of the thunk.
1889 * lambda.c (maybe_add_lambda_conv_op): Likewise.
1891 2019-02-05 Marek Polacek <polacek@redhat.com>
1893 PR c++/89158 - by-value capture of constexpr variable broken.
1894 * call.c (convert_like_real) <case ck_user>: Call mark_exp_read
1895 instead of mark_rvalue_use.
1897 2019-02-05 Alexandre Oliva <aoliva@redhat.com>
1900 * pt.c (instantiates_primary_template_p): New.
1901 (type_dependent_expression_p): Use it.
1903 2019-02-01 Jason Merrill <jason@redhat.com>
1905 PR c++/88761 - ICE with reference capture of constant.
1906 * lambda.c (mark_const_cap_r): Do walk subtrees of DECL_EXPR for
1909 2019-02-01 Marek Polacek <polacek@redhat.com>
1911 PR c++/88325 - ICE with invalid out-of-line template member definition.
1912 * parser.c (cp_parser_class_name): Don't call make_typename_type
1915 2019-02-01 Jakub Jelinek <jakub@redhat.com>
1918 * parser.c (cp_parser_gnu_attributes_opt): Set ok to false
1919 if require_open failed.
1921 2019-01-31 Marek Polacek <polacek@redhat.com>
1923 PR c++/89083, c++/80864 - ICE with list initialization in template.
1924 * constexpr.c (adjust_temp_type): Use copy_node and change the type
1925 instead of using build_constructor.
1926 * decl.c (reshape_init_r): Don't reshape a digested initializer.
1927 Return the initializer for COMPOUND_LITERAL_P.
1929 PR c++/88983 - ICE with switch in constexpr function.
1930 * constexpr.c (cxx_eval_switch_expr): Use SWITCH_COND and SWITCH_BODY.
1931 (cxx_eval_constant_expression) <case COND_EXPR>: Don't look for the
1932 label in the else branch if we found it in the then branch.
1934 2019-01-30 Jason Merrill <jason@redhat.com>
1936 PR c++/88752 - ICE with lambda and constexpr if.
1937 * cp-tree.h (LAMBDA_EXPR_INSTANTIATED): New.
1938 * pt.c (tsubst_lambda_expr): Set it.
1939 (instantiated_lambda_fn_p): Check it.
1940 (enclosing_instantiation_of): Use it.
1942 2019-01-31 Jakub Jelinek <jakub@redhat.com>
1945 * cxx-pretty-print.c (pp_cxx_enumeration_constant): Print always as
1946 a C cast in pp_c_flag_gnu_v3 mode.
1948 2019-01-30 Jakub Jelinek <jakub@redhat.com>
1951 * lambda.c (is_capture_proxy): Don't return true for
1952 DECL_OMP_PRIVATIZED_MEMBER artificial vars.
1954 2019-01-30 Marek Polacek <polacek@redhat.com>
1956 PR c++/89119 - ICE with value-initialization in template.
1957 * pt.c (tsubst_copy_and_build): Handle RANGE_EXPR.
1959 2019-01-29 Jason Merrill <jason@redhat.com>
1961 PR c++/86943 - wrong code converting lambda to function pointer.
1962 * lambda.c (maybe_add_lambda_conv_op): Use a template-id in the
1963 call. Only forward parms for decltype.
1964 * pt.c (tsubst_copy_and_build) [CALL_EXPR]: Handle CALL_FROM_THUNK_P
1966 * typeck.c (check_return_expr): Don't mess with a thunk call.
1968 2019-01-28 Jason Merrill <jason@redhat.com>
1970 PR c++/89089 - ICE with [[no_unique_address]].
1971 PR c++/88865 - wrong layout with [[no_unique_address]].
1972 * class.c (check_field_decls): A potentially-overlapping field makes
1973 the class non-layout-POD, but not non-empty.
1974 (end_of_class): Always consider empty data members.
1975 (layout_class_type): Set DECL_SIZE for empty fields.
1977 2019-01-28 Marek Polacek <polacek@redhat.com>
1979 PR c++/88358 - name wrongly treated as type.
1980 * parser.c (cp_parser_direct_declarator): Don't assume a qualified-id
1981 in parameter-list is a type if the function's declarator-id is not
1984 2019-01-27 Marek Polacek <polacek@redhat.com>
1986 PR c++/88815 - narrowing conversion lost in decltype.
1987 PR c++/78244 - narrowing conversion in template not detected.
1988 * cp-tree.h (CONSTRUCTOR_IS_DEPENDENT): New.
1989 * pt.c (instantiation_dependent_r): Consider a CONSTRUCTOR with
1990 CONSTRUCTOR_IS_DEPENDENT instantiation-dependent.
1991 * semantics.c (finish_compound_literal): When the compound literal
1992 isn't instantiation-dependent and the type isn't type-dependent,
1993 fall back to the normal processing. Set CONSTRUCTOR_IS_DEPENDENT.
1995 PR c++/89024 - ICE with incomplete enum type.
1996 * call.c (standard_conversion): When converting an
1997 ARITHMETIC_TYPE_P to an incomplete type, return NULL.
1999 2019-01-25 Paolo Carlini <paolo.carlini@oracle.com>
2002 * call.c (build_op_delete_call): Implement 7.6.2.5/(10.1).
2003 * decl2.c (coerce_delete_type): Use build_pointer_type instead
2006 2019-01-24 Jason Merrill <jason@redhat.com>
2008 PR c++/89001 - mangling of reference temporaries
2009 * cp-tree.h (struct saved_scope): Add ref_temp_count.
2010 (current_ref_temp_count): New macro.
2011 * mangle.c (mangle_ref_init_variable): Use it.
2012 * typeck2.c (store_init_value): Clear it.
2013 * call.c (make_temporary_var_for_ref_to_temp): Copy public and
2016 2019-01-24 Jakub Jelinek <jakub@redhat.com>
2019 * semantics.c (finish_omp_cancel): Diagnose more than one if
2020 on #pragma omp cancel with different modifiers. Use
2021 maybe_convert_cond when not in template or build_x_binary_op
2024 2019-01-23 Marek Polacek <polacek@redhat.com>
2026 PR c++/88757 - qualified name treated wrongly as type.
2027 * parser.c (cp_parser_direct_declarator): Don't treat qualified-ids
2028 in parameter-list as types if name lookup for declarator-id didn't
2029 find one or more function templates.
2031 2019-01-23 Jakub Jelinek <jakub@redhat.com>
2034 * cp-gimplify.c (genericize_cp_loop): Call begin_bc_block only
2035 after genericizing cond and incr expressions.
2038 * cp-gimplify.c (genericize_switch_stmt): Move cond genericization
2039 before the begin_bc_block call.
2041 2019-01-21 Jason Merrill <jason@redhat.com>
2043 PR c++/87893 - constexpr ctor ICE on ARM.
2044 PR c++/88293 - ICE with comma expression.
2045 * constexpr.c (initialized_type): Don't shortcut non-void type.
2046 Handle COMPOUND_EXPR.
2047 (cxx_eval_outermost_constant_expr): Return early for void type.
2049 2019-01-21 Jakub Jelinek <jakub@redhat.com>
2052 * optimize.c (cxx_copy_decl): New function.
2053 (clone_body): Use it instead of copy_decl_no_change.
2056 * typeck.c (cp_build_binary_op): Don't instrument
2057 SANITIZE_POINTER_COMPARE if processing_template_decl.
2058 (pointer_diff): Similarly for SANITIZE_POINTER_SUBTRACT.
2060 2019-01-18 Jason Merrill <jason@redhat.com>
2062 PR c++/88875 - error with explicit list constructor.
2063 * call.c (reference_binding): Don't modify EXPR. Set
2064 need_temporary_p on the ck_user conversion for a temporary.
2065 (convert_like_real): Check it.
2067 2019-01-18 H.J. Lu <hongjiu.lu@intel.com>
2071 * call.c (convert_for_arg_passing): Upate the
2072 warn_for_address_or_pointer_of_packed_member call.
2073 * typeck.c (convert_for_assignment): Likewise.
2075 2019-01-17 Jason Merrill <jason@redhat.com>
2077 PR c++/86205 - ICE with ?: of throw and template-id.
2078 * pt.c (resolve_nondeduced_context_or_error): Split out from...
2079 * typeck.c (decay_conversion): ...here.
2080 * call.c (build_conditional_expr_1): Use it.
2082 PR c++/86740, ICE with constexpr if and nested generic lambdas.
2083 * tree.c (cp_walk_subtrees): Handle LAMBDA_EXPR.
2085 2019-01-17 Paolo Carlini <paolo.carlini@oracle.com>
2087 * decl.c (grokdeclarator): Use typespec_loc in error messages
2088 about 'auto' and trailing return type.
2090 2019-01-17 David Malcolm <dmalcolm@redhat.com>
2093 * class.c (add_method): Don't use DECL_DESTRUCTOR_P on
2096 2019-01-17 Nathan Sidwell <nathan@acm.org>
2099 * semantics.c (process_outer_var_ref): Only skip dependent types
2102 2019-01-17 Alexandre Oliva <aoliva@redhat.com>
2105 * cp-tree.h (saved_scope): Add suppress_location_wrappers.
2106 * name-lookup.c (do_push_to_top_level): Save and reset it.
2107 (do_pop_from_top_level): Restore it.
2110 * pt.c (make_template_placeholder): Use auto_identifier.
2111 (is_auto): Drop CLASS_PLACEHOLDER_TEMPLATE test.
2112 * error.c (dump_type): Handle template placeholders.
2113 * cxx-pretty-print.c (pp_cx_unqualified_id): Likewise.
2116 * cvt.c (convert_to_void): Handle all cdtor calls as if
2119 2019-01-16 Paolo Carlini <paolo.carlini@oracle.com>
2121 * decl.c (grokdeclarator): Use locations[ds_storage_class] in
2122 error messages about ill-formed uses of mutable.
2124 2019-01-16 Marek Polacek <polacek@redhat.com>
2126 PR c++/78244 - narrowing conversion in template not detected.
2127 * call.c (perform_implicit_conversion_flags): Set
2128 IMPLICIT_CONV_EXPR_BRACED_INIT.
2129 * cp-tree.h (IMPLICIT_CONV_EXPR_BRACED_INIT): New.
2130 * pt.c (tsubst_copy_and_build): Use it.
2132 2019-01-15 David Malcolm <dmalcolm@redhat.com>
2135 * pt.c (build_deduction_guide): Bail out if tsubst_arg_types
2138 2019-01-15 Paolo Carlini <paolo.carlini@oracle.com>
2140 * decl.c (start_decl): Improve error location.
2141 * decl2.c (grokfield): Likewise.
2143 2019-01-15 Paolo Carlini <paolo.carlini@oracle.com>
2145 * decl.c (grokdeclarator): Move further up the location_t loc
2146 declaration and use the location when building a TYPE_DECL for
2148 * decl2.c (grokbitfield): Use DECL_SOURCE_LOCATION in the error
2149 about an ill-formed bit-field as typedef.
2151 2019-01-14 Marek Polacek <polacek@redhat.com>
2153 PR c++/88830 - ICE with abstract class.
2154 * decl2.c (maybe_emit_vtables): Check CLASSTYPE_LAZY_DESTRUCTOR.
2157 PR c++/88825 - ICE with bogus function return type deduction.
2158 * typeck.c (can_do_nrvo_p): Check error_mark_node.
2160 2019-01-14 Tom Honermann <tom@honermann.net>
2162 Implement P0482R5, char8_t: A type for UTF-8 characters and strings
2163 * cvt.c (type_promotes_to): Handle char8_t promotion.
2164 * decl.c (grokdeclarator): Handle invalid type specifier
2165 combinations involving char8_t.
2166 * lex.c (init_reswords): Add char8_t as a reserved word.
2167 * mangle.c (write_builtin_type): Add name mangling for char8_t (Du).
2168 * parser.c (cp_keyword_starts_decl_specifier_p)
2169 (cp_parser_simple_type_specifier): Recognize char8_t as a simple
2171 (cp_parser_string_literal): Use char8_array_type_node for the type
2173 (cp_parser_set_decl_spec_type): Tolerate char8_t typedefs in system
2175 * rtti.c (emit_support_tinfos): type_info support for char8_t.
2176 * tree.c (char_type_p): Recognize char8_t as a character type.
2177 * typeck.c (string_conv_p): Handle conversions of u8 string
2178 literals of char8_t type.
2179 (check_literal_operator_args): Handle UDLs with u8 string literals
2181 * typeck2.c (ordinary_char_type_p): New.
2182 (digest_init_r): Disallow initializing a char array with a u8 string
2185 2019-01-14 Martin Liska <mliska@suse.cz>
2187 PR gcov-profile/88263
2188 * decl2.c (get_tls_wrapper_fn): Use DECL_SOURCE_LOCATION
2189 as location of the TLS wrapper.
2191 2019-01-12 Paolo Carlini <paolo.carlini@oracle.com>
2193 * decl.c (cp_finish_decl): Improve error location.
2194 * decl2.c (grokfield): Likewise, improve two locations.
2196 2019-01-11 Marek Polacek <polacek@redhat.com>
2198 PR c++/88692, c++/87882 - -Wredundant-move false positive with *this.
2199 * typeck.c (maybe_warn_pessimizing_move): Return if ARG isn't
2202 2019-01-11 Jason Merrill <jason@redhat.com>
2204 PR c++/88312 - pack expansion of decltype.
2205 * pt.c (instantiation_dependent_r): A template non-type parameter
2206 pack is instantiation-dependent.
2208 2019-01-11 Jason Merrill <jason@redhat.com>
2210 PR c++/88613 - ICE with use of const var in lambda.
2211 * expr.c (mark_use): Fix location wrapper handling.
2212 * cp-gimplify.c (cp_fold_maybe_rvalue): Call mark_rvalue_use.
2214 2019-01-11 Tobias Burnus <burnus@net-b.de>
2217 * decl2.c (maybe_emit_vtables): If needed, generate code for
2218 the destructor of an abstract class.
2219 (mark_used): Update comment for older function-name change.
2221 2019-01-11 Paolo Carlini <paolo.carlini@oracle.com>
2223 * decl.c (start_decl): Improve error location.
2224 (grokdeclarator): Likewise, improve two locations.
2226 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
2230 * cp-tree.h: Mechanically replace "can not" with "cannot".
2231 * parser.c: Likewise.
2234 2019-01-08 Paolo Carlini <paolo.carlini@oracle.com>
2236 * decl.c (grok_reference_init): Improve error location.
2237 (grokdeclarator): Likewise, improve two locations.
2239 2019-01-08 Marek Polacek <polacek@redhat.com>
2241 PR c++/88538 - braced-init-list in template-argument-list.
2242 * parser.c (cp_parser_template_argument): Handle braced-init-list when
2245 PR c++/88548 - this accepted in static member functions.
2246 * parser.c (cp_debug_parser): Adjust printing of
2247 local_variables_forbidden_p.
2248 (cp_parser_new): Set local_variables_forbidden_p to 0 rather than false.
2249 (cp_parser_primary_expression): When checking
2250 local_variables_forbidden_p, use THIS_FORBIDDEN or
2251 LOCAL_VARS_FORBIDDEN.
2252 (cp_parser_lambda_body): Update the type of
2253 local_variables_forbidden_p. Set it to 0 rather than false.
2254 (cp_parser_condition): Adjust call to cp_parser_declarator.
2255 (cp_parser_explicit_instantiation): Likewise.
2256 (cp_parser_init_declarator): Likewise.
2257 (cp_parser_declarator): New parameter. Use it.
2258 (cp_parser_direct_declarator): New parameter. Use it to set
2259 local_variables_forbidden_p. Adjust call to cp_parser_declarator.
2260 (cp_parser_type_id_1): Adjust call to cp_parser_declarator.
2261 (cp_parser_parameter_declaration): Likewise.
2262 (cp_parser_default_argument): Update the type of
2263 local_variables_forbidden_p. Set it to LOCAL_VARS_AND_THIS_FORBIDDEN
2265 (cp_parser_member_declaration): Tell cp_parser_declarator if we saw
2266 'static' or 'friend'.
2267 (cp_parser_exception_declaration): Adjust call to cp_parser_declarator.
2268 (cp_parser_late_parsing_default_args): Update the type of
2269 local_variables_forbidden_p. Set it to LOCAL_VARS_AND_THIS_FORBIDDEN
2271 (cp_parser_cache_defarg): Adjust call to cp_parser_declarator.
2272 (cp_parser_objc_class_ivars): Likewise.
2273 (cp_parser_objc_struct_declaration): Likewise.
2274 (cp_parser_omp_for_loop_init): Likewise.
2275 * parser.h (cp_parser): Change the type of local_variables_forbidden_p
2277 (LOCAL_VARS_FORBIDDEN, LOCAL_VARS_AND_THIS_FORBIDDEN, THIS_FORBIDDEN):
2280 2019-01-08 Paolo Carlini <paolo.carlini@oracle.com>
2282 * decl.c (start_decl): Improve permerror location.
2284 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
2285 Jakub Jelinek <jakub@redhat.com>
2288 * decl.c (finish_function): For -Wreturn-type don't add a return *this;
2289 fixit hint if current_class_ref is NULL. Use a single if instead of
2292 2019-01-07 Paolo Carlini <paolo.carlini@oracle.com>
2294 * decl.c (start_decl): Improve two error_at locations.
2295 (expand_static_init): Likewise.
2297 2019-01-07 Marek Polacek <polacek@redhat.com>
2299 PR c++/88741 - wrong error with initializer-string.
2300 * decl.c (cp_complete_array_type): Strip any location wrappers.
2302 2019-01-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
2308 * cp-tree.h (LOOKUP_ALLOW_FLEXARRAY_INIT): New flag value.
2309 * typeck2.c (digest_init_r): Raise an error for non-static
2310 initialization of a flexible array member.
2311 (process_init_constructor, massage_init_elt,
2312 process_init_constructor_array, process_init_constructor_record,
2313 process_init_constructor_union, process_init_constructor): Add the
2314 flags parameter and pass it thru.
2315 (store_init_value): Pass LOOKUP_ALLOW_FLEXARRAY_INIT parameter to
2316 digest_init_flags for static decls.
2318 2019-01-07 Jakub Jelinek <jakub@redhat.com>
2321 * cp-tree.h (cp_build_vec_convert): Declare.
2322 * parser.c (cp_parser_postfix_expression): Parse
2323 __builtin_convertvector.
2324 * constexpr.c: Include fold-const-call.h.
2325 (cxx_eval_internal_function): Handle IFN_VEC_CONVERT.
2326 (potential_constant_expression_1): Likewise.
2327 * semantics.c (cp_build_vec_convert): New function.
2328 * pt.c (tsubst_copy_and_build): Handle CALL_EXPR to
2331 2019-01-03 Jakub Jelinek <jakub@redhat.com>
2334 * decl.c (builtin_function_1): Return result of pushdecl_top_level
2335 or pushdecl rather than decl.
2337 2019-01-03 Paolo Carlini <paolo.carlini@oracle.com>
2339 * tree.c (handle_nodiscard_attribute): Improve warning location.
2341 2019-01-02 Marek Polacek <polacek@redhat.com>
2343 PR c++/88612 - ICE with -Waddress-of-packed-member.
2344 * call.c (convert_for_arg_passing): Only give warnings with tf_warning.
2345 * typeck.c (convert_for_assignment): Likewise.
2347 PR c++/88631 - CTAD failing for value-initialization.
2348 * typeck2.c (build_functional_cast): Try deducing the template
2349 arguments even if there are no arguments to deduce from.
2351 2019-01-01 Jakub Jelinek <jakub@redhat.com>
2353 Update copyright years.
2355 Copyright (C) 2019 Free Software Foundation, Inc.
2357 Copying and distribution of this file, with or without modification,
2358 are permitted in any medium without royalty provided the copyright
2359 notice and this notice are preserved.