c++: Infinite diagnostic loop with decltype([]{}) [PR94521]
[gcc.git] / gcc / cp / ChangeLog
1 2020-04-13 Patrick Palka <ppalka@redhat.com>
2
3 PR c++/94521
4 * error.c (dump_scope): Pass TFF_NO_FUNCTION_ARGUMENTS to
5 dump_function_decl when printing a function template instantiation as a
6 scope.
7
8 PR c++/94470
9 * constexpr.c (get_or_insert_ctor_field): Set default value of parameter
10 'pos_hint' to -1.
11 (cxx_eval_bare_aggregate): Use get_or_insert_ctor_field instead of
12 assuming the the next index belongs at the end of the new CONSTRUCTOR.
13 (cxx_eval_store_expression): Revert PR c++/78572 fix.
14
15 2020-04-13 Nathan Sidwell <nathan@acm.org>
16
17 PR c++/94426 lambdas with internal linkage are different to no-linkage
18 * decl2.c (determine_visibility): A lambda's visibility is
19 affected by its extra scope.
20 * pt.c (instantiate_decl): Determine var's visibility before
21 instantiating its initializer.
22 * tree.c (no_linkage_check): Revert code looking at visibility of
23 lambda's extra scope.
24 `
25 2020-04-10 Iain Sandoe <iain@sandoe.co.uk>
26
27 PR c++/94528
28 * coroutines.cc (co_await_expander): Remove.
29 (expand_one_await_expression): New.
30 (process_one_statement): New.
31 (await_statement_expander): New.
32 (build_actor_fn): Revise to use per-statement expander.
33 (struct susp_frame_data): Reorder and comment.
34 (register_awaits): Factor code.
35 (replace_statement_captures): New, factored from...
36 (maybe_promote_captured_temps):.. here.
37 (await_statement_walker): Revise to process per statement.
38 (morph_fn_to_coro): Use revised susp_frame_data layout.
39
40 2020-04-10 Marek Polacek <polacek@redhat.com>
41
42 PR c++/94149
43 * method.c (constructible_expr): In C++20, try using parenthesized
44 initialization of aggregates to determine the result of
45 __is_constructible.
46
47 2020-04-10 Bin Cheng <bin.cheng@linux.alibaba.com>
48
49 * coroutines.cc (co_await_expander): Simplify.
50
51 2020-04-09 Jason Merrill <jason@redhat.com>
52
53 PR c++/94523
54 * constexpr.c (cxx_eval_constant_expression) [VAR_DECL]: Look at
55 ctx->object and ctx->global->values first.
56
57 2020-04-09 Marek Polacek <polacek@redhat.com>
58
59 PR c++/93790
60 * call.c (initialize_reference): If the reference binding failed, maybe
61 try initializing from { }.
62 * decl.c (grok_reference_init): For T& t(e), set
63 LOOKUP_AGGREGATE_PAREN_INIT but don't build up a constructor yet.
64
65 2020-04-08 Iain Sandoe <iain@sandoe.co.uk>
66 Jun Ma <JunMa@linux.alibaba.com>
67
68 * coroutines.cc (maybe_promote_captured_temps): Add a cleanup
69 expression, if needed, to any call from which we promoted
70 temporaries captured by reference.
71
72 2020-04-08 Marek Polacek <polacek@redhat.com>
73
74 PR c++/94507 - ICE-on-invalid with lambda template.
75 * pt.c (tsubst_lambda_expr): Cope when tsubst_template_decl or
76 tsubst_function_decl returns error_mark_node.
77
78 2020-04-08 Martin Liska <mliska@suse.cz>
79
80 PR c++/94314
81 * decl.c (duplicate_decls): Duplicate also DECL_IS_REPLACEABLE_OPERATOR.
82 (cxx_init_decl_processing): Mark replaceable all implicitly defined
83 operators.
84
85 2020-04-08 Patrick Palka <ppalka@redhat.com>
86
87 Core issues 1001 and 1322
88 PR c++/92010
89 * pt.c (rebuild_function_or_method_type): Split function out from ...
90 (tsubst_function_type): ... here.
91 (maybe_rebuild_function_decl_type): New function.
92 (tsubst_function_decl): Use it.
93
94 2020-04-08 Jakub Jelinek <jakub@redhat.com>
95
96 PR c++/94325
97 * decl.c (begin_destructor_body): For CLASSTYPE_VBASECLASSES class
98 dtors, if CLASSTYPE_PRIMARY_BINFO is non-NULL, but not BINFO_VIRTUAL_P,
99 look at CLASSTYPE_PRIMARY_BINFO of its BINFO_TYPE if it is not
100 BINFO_VIRTUAL_P, and so on.
101
102 2020-04-08 Marek Polacek <polacek@redhat.com>
103
104 PR c++/94478 - ICE with defaulted comparison operator
105 * method.c (early_check_defaulted_comparison): Give an error when the
106 context is null.
107
108 2020-04-08 Tobias Burnus <tobias@codesourcery.com>
109
110 PR middle-end/94120
111 * paser.c (cp_parser_oacc_declare): Add check that variables
112 are declared in the same scope as the directive.
113
114 2020-04-07 Jason Merrill <jason@redhat.com>
115
116 PR c++/94480
117 * parser.c (cp_parser_requires_expression): Use tentative_firewall.
118
119 PR c++/94481
120 * parser.c (cp_parser_placeholder_type_specifier): Use
121 matching_parens.
122
123 2020-04-07 Iain Sandoe <iain@sandoe.co.uk>
124
125 * coroutines.cc (maybe_promote_captured_temps): Ensure that
126 reference capture placeholder vars are properly declared.
127
128 2020-04-07 Patrick Palka <ppalka@redhat.com>
129
130 PR c++/90996
131 * tree.c (replace_placeholders): Look through all handled components,
132 not just COMPONENT_REFs.
133 * typeck2.c (process_init_constructor_array): Propagate
134 CONSTRUCTOR_PLACEHOLDER_BOUNDARY up from each element initializer to
135 the array initializer.
136
137 2020-04-07 Jakub Jelinek <jakub@redhat.com>
138
139 PR c++/94512
140 * parser.c (cp_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
141 if cp_parser_omp_master succeeded.
142
143 2020-04-06 Jason Merrill <jason@redhat.com>
144
145 PR c++/94462
146 * decl.c (duplicate_decls): Fix handling of DECL_HIDDEN_FRIEND_P.
147
148 2020-04-04 Marek Polacek <polacek@redhat.com>
149 Jason Merrill <jason@redhat.com>
150
151 PR c++/94155 - crash in gimplifier with paren init of aggregates.
152 * init.c (build_vec_init): Fill in indexes.
153
154 2020-04-04 Jason Merrill <jason@redhat.com>
155
156 PR c++/91377
157 * mangle.c (write_expression): Skip IMPLICIT_CONV_EXPR.
158
159 2020-04-04 Patrick Palka <ppalka@redhat.com>
160
161 PR c++/94205
162 PR c++/79937
163 * constexpr.c (struct constexpr_ctx): New field 'parent'.
164 (cxx_eval_bare_aggregate): Propagate CONSTRUCTOR_PLACEHOLDER_BOUNDARY
165 flag from the original constructor to the reduced constructor.
166 (lookup_placeholder): Prefer to return the outermost matching object
167 by recursively calling lookup_placeholder on the 'parent' context,
168 but don't cross CONSTRUCTOR_PLACEHOLDER_BOUNDARY constructors.
169 (cxx_eval_constant_expression): Link the 'ctx' context to the 'new_ctx'
170 context via 'new_ctx.parent' when being expanded without an explicit
171 target. Don't call replace_placeholders.
172 (cxx_eval_outermost_constant_expr): Initialize 'ctx.parent' to NULL.
173
174 PR c++/94219
175 PR c++/94205
176 * constexpr.c (get_or_insert_ctor_field): Split out (while adding
177 support for VECTOR_TYPEs, and optimizations for the common case)
178 from ...
179 (cxx_eval_store_expression): ... here. Rename local variable
180 'changed_active_union_member_p' to 'activated_union_member_p'. Record
181 the sequence of indexes into 'indexes' that yields the subobject we're
182 assigning to. Record the integer offsets of the constructor indexes
183 we're assigning through into 'index_pos_hints'. After evaluating the
184 initializer of the store expression, recompute 'valp' using 'indexes'
185 and using 'index_pos_hints' as hints.
186 (cxx_eval_bare_aggregate): Tweak comments. Use get_or_insert_ctor_field
187 to recompute the constructor_elt pointer we're assigning through after
188 evaluating each initializer.
189
190 2020-04-04 Jason Merrill <jason@redhat.com>
191
192 PR c++/67825
193 * constraint.cc (tsubst_valid_expression_requirement): Call
194 convert_to_void.
195
196 2020-04-04 Jason Merrill <jason@redhat.com>
197
198 PR c++/94453
199 * constexpr.c (maybe_constant_value): Use break_out_target_exprs.
200 * expr.c (mark_use) [VIEW_CONVERT_EXPR]: Don't wrap a TARGET_EXPR in
201 NON_LVALUE_EXPR.
202
203 2020-04-04 Jakub Jelinek <jakub@redhat.com>
204
205 PR debug/94441
206 * parser.c (cp_parser_omp_for_loop): Use
207 protected_set_expr_location_if_unset.
208 * cp-gimplify.c (genericize_if_stmt, genericize_cp_loop): Likewise.
209
210 PR c++/94477
211 * pt.c (tsubst_expr) <case OMP_MASTER>: Clear
212 omp_parallel_combined_clauses.
213
214 2020-04-03 Jason Merrill <jason@redhat.com>
215
216 PR c++/91966
217 * pt.c (complex_pack_expansion_r): New.
218 (complex_alias_template_p): Use it.
219
220 2020-03-31 Jason Merrill <jason@redhat.com>
221
222 PR c++/94205
223 * constexpr.c (cxx_eval_constant_expression) [TARGET_EXPR]: Call
224 replace_placeholders.
225 * typeck2.c (store_init_value): Fix arguments to
226 fold_non_dependent_expr.
227
228 2020-03-31 Jason Merrill <jason@redhat.com>
229
230 * constexpr.c (cxx_eval_constant_expression) [TARGET_EXPR]: Use
231 local variables.
232
233 2020-03-30 Jason Merrill <jason@redhat.com>
234
235 PR c++/90711
236 * tree.c (cp_tree_equal) [CALL_EXPR]: Compare KOENIG_LOOKUP_P.
237 (called_fns_equal): Check DECL_CONTEXT.
238
239 2020-03-30 Jakub Jelinek <jakub@redhat.com>
240
241 PR c++/94385
242 * semantics.c (add_stmt): Only set STMT_IS_FULL_EXPR_P on trees with
243 STATEMENT_CODE_P code.
244
245 2020-03-28 Patrick Palka <ppalka@redhat.com>
246
247 PR c++/94306
248 * parser.c (cp_parser_requires_clause_opt): Diagnose and recover from
249 "requires {" when "requires requires {" was probably intended.
250
251 PR c++/94252
252 * constraint.cc (tsubst_compound_requirement): Always suppress errors
253 from type_deducible_p and expression_convertible_p, as they're not
254 substitution errors.
255 (diagnose_atomic_constraint) <case INTEGER_CST>: Remove this case so
256 that we diagnose INTEGER_CST expressions of non-bool type via the
257 default case.
258 * cp-gimplify.c (cp_genericize_r) <case REQUIRES_EXPR>: New case.
259 * parser.c (cp_parser_requires_expression): Always parse the requirement
260 body as if we're processing a template, by temporarily incrementing
261 processing_template_decl. Afterwards, if we're not actually in a
262 template context, perform semantic processing to diagnose any invalid
263 types and expressions.
264 * pt.c (tsubst_copy_and_build) <case REQUIRES_EXPR>: Remove dead code.
265 * semantics.c (finish_static_assert): Explain an assertion failure
266 when the condition is a REQUIRES_EXPR like we do when it is a concept
267 check.
268
269 * constraint.cc (diagnose_compound_requirement): When diagnosing a
270 compound requirement, maybe replay the satisfaction failure, subject to
271 the current diagnosis depth.
272
273 * constraint.cc (finish_constraint_binary_op): Set the location of EXPR
274 as well as its range, because build_x_binary_op doesn't always do so.
275 (current_constraint_diagnosis_depth): New.
276 (concepts_diagnostics_max_depth_exceeded_p): New.
277 (collect_operands_of_disjunction): New.
278 (satisfy_disjunction): When diagnosing a satisfaction failure, maybe
279 replay each branch of the disjunction, subject to the current diagnosis
280 depth.
281 (diagnose_valid_expression): When diagnosing a satisfaction failure,
282 maybe replay the substitution error, subject to the current diagnosis
283 recursion.
284 (diagnose_valid_type): Likewise.
285 (diagnose_nested_requiremnet): Likewise.
286 (diagnosing_failed_constraint::diagnosing_failed_constraint): Increment
287 current_constraint_diagnosis_depth when diagnosing.
288 (diagnosing_failed_constraint::~diagnosing_failed_constraint): Decrement
289 current_constraint_diagnosis_depth when diagnosing.
290 (diagnosing_failed_constraint::replay_errors_p): New static member
291 function.
292 (diagnose_constraints): Don't diagnose if concepts_diagnostics_max_depth
293 is 0. Emit a one-off note to increase -fconcepts-diagnostics-depth if
294 the limit was exceeded.
295 * cp-tree.h (diagnosing_failed_constraint::replay_errors_p): Declare.
296
297 2020-03-27 Nathan Sidwell <nathan@acm.org>
298
299 PR c++/84733
300 * name-lookup.c (do_pushdecl): Look through cleanp levels.
301
302 2020-03-27 Martin Sebor <msebor@redhat.com>
303
304 PR c++/94078
305 PR c++/93824
306 PR c++/93810
307 * cp-tree.h (most_specialized_partial_spec): Declare.
308 * parser.c (cp_parser_elaborated_type_specifier): Distinguish alias
309 from declarations.
310 (specialization_of): New function.
311 (cp_parser_check_class_key): Move code...
312 (class_decl_loc_t::add): ...to here. Add parameters. Avoid issuing
313 -Wredundant-tags on first-time declarations in other declarators.
314 Correct handling of template specializations.
315 (class_decl_loc_t::diag_mismatched_tags): Also expect to be called
316 when -Wredundant-tags is enabled. Use primary template or partial
317 specialization as the guide for uses of implicit instantiations.
318 * pt.c (most_specialized_partial_spec): Declare extern.
319
320 2020-03-27 Nathan Sidwell <nathan@acm.org>
321
322 PR c++/94257
323 * name-lookup.c (push_namespace): Triage ambiguous lookups that
324 contain namespaces.
325
326 2020-03-27 Jakub Jelinek <jakub@redhat.com>
327
328 PR c++/94326
329 * call.c (set_flags_from_callee): Don't update
330 cp_function_chain->can_throw or current_function_returns_abnormally
331 if cp_unevaluated_operand.
332
333 PR c++/94339
334 * cvt.c (ocp_convert): Handle COMPOUND_EXPR by recursion on the second
335 operand and creating a new COMPOUND_EXPR if anything changed.
336
337 2020-03-26 Marek Polacek <polacek@redhat.com>
338
339 PR c++/94336 - template keyword accepted before destructor names.
340 * parser.c (cp_parser_unqualified_id): Give an error when 'template'
341 is followed by a destructor name.
342
343 2020-03-27 Patrick Palka <ppalka@redhat.com>
344
345 * decl.c (compute_array_index_type_loc): Remove redundant
346 type_dependent_expression_p check that is subsumed by
347 value_dependent_expression_p.
348 * decl2.c (is_late_template_attribute): Likewise.
349 * pt.c (uses_template_parms): Likewise.
350 (dependent_template_arg_p): Likewise.
351
352 2020-03-26 Marek Polacek <polacek@redhat.com>
353
354 DR 1710
355 PR c++/94057 - template keyword in a typename-specifier.
356 * parser.c (check_template_keyword_in_nested_name_spec): New.
357 (cp_parser_nested_name_specifier_opt): Implement DR1710, optional
358 'template'. Call check_template_keyword_in_nested_name_spec.
359 (cp_parser_simple_type_specifier): Assume that a <
360 following a qualified-id in a typename-specifier begins
361 a template argument list.
362
363 2020-03-26 Iain Sandoe <iain@sandoe.co.uk>
364
365 * coroutines.cc (coro_init_identifiers): Initialize an identifier
366 for the cororoutine handle 'address' method name.
367 (struct coro_aw_data): Add fields to cover the continuations.
368 (co_await_expander): Determine the kind of await_suspend in use.
369 If we have the case that returns a continuation handle, then save
370 this and make the target for 'scope exit without cleanup' be the
371 continuation resume label.
372 (expand_co_awaits): Remove.
373 (struct suspend_point_info): Remove fields that kept the returned
374 await_suspend handle type.
375 (transform_await_expr): Remove code tracking continuation handles.
376 (build_actor_fn): Add the continuation handle as an actor-function
377 scope var. Build the symmetric transfer continuation point. Call
378 the tree walk for co_await expansion directly, rather than via a
379 trivial shim function.
380 (register_await_info): Remove fields tracking continuation handles.
381 (get_await_suspend_return_type): Remove.
382 (register_awaits): Remove code tracking continuation handles.
383 (morph_fn_to_coro): Remove code tracking continuation handles.
384
385 2020-03-26 Iain Sandoe <iain@sandoe.co.uk>
386
387 * coroutines.cc (co_await_expander): If we are expanding the
388 initial await expression, set a boolean flag to show that we
389 have now reached the initial await_resume() method call.
390 (expand_co_awaits): Handle the 'initial await resume called' flag.
391 (build_actor_fn): Insert the initial await expression into the
392 start of the user-authored function-body. Handle the 'initial await
393 resume called' flag.
394 (morph_fn_to_coro): Initialise the 'initial await resume called'
395 flag. Modify the unhandled exception catch clause to recognise
396 exceptions that occur before the initial await_resume() and re-
397 throw them.
398
399 2020-03-26 Jakub Jelinek <jakub@redhat.com>
400
401 PR c++/81349
402 * class.c (user_provided_p): Use STRIP_TEMPLATE instead of returning
403 true for all TEMPLATE_DECLs.
404
405 PR c++/94272
406 * cp-gimplify.c (cp_genericize_r): Handle STATEMENT_LIST.
407
408 2020-03-25 Patrick Palka <ppalka@redhat.com>
409
410 PR c++/94265
411 * parser.c (cp_parser_selection_statement) <case RID_IF>: Invalidate the
412 current condition chain when the if-statement has a non-empty
413 init-statement.
414
415 2020-03-25 Iain Sandoe <iain@sandoe.co.uk>
416
417 PR c++/94319
418 * coroutines.cc (captures_temporary): Fix a missing dereference.
419
420 2020-03-24 Marek Polacek <polacek@redhat.com>
421
422 PR c++/94190 - wrong no post-decrement operator error in template.
423 * call.c (convert_like_real): Use convert_from_reference on the result.
424
425 2020-03-24 Jason Merrill <jason@redhat.com>
426
427 PR c++/94186
428 * constraint.cc (constraint_satisfaction_value): Repeat noisily on
429 error.
430 (tsubst_nested_requirement): Likewise.
431 (get_constraint_error_location): Allow missing context.
432 (diagnose_atomic_constraint): Diagnose non-bool constraint here.
433 (satisfy_atom): Not here. Only diagnose non-constant when noisy.
434
435 2020-03-24 Jason Merrill <jason@redhat.com>
436
437 * pt.c (any_template_parm_r): Look into the type of a non-type
438 template parm.
439
440 2020-03-24 Jason Merrill <jason@redhat.com>
441
442 * cp-tree.h (cp_expr): When constructing from an expr and a
443 location, call protected_set_expr_location.
444
445 2020-03-23 Patrick Palka <ppalka@redhat.com>
446
447 PR c++/93805
448 * except.c (maybe_noexcept_warning): Add TODO.
449 * method.c (walk_field_subobs): Pass tf_none to expr_noexcept_p.
450
451 2020-03-23 nathans <nathan@acm.org>
452
453 PR c++/94044
454 * tree.c (cp_tree_equal) [SIZEOF_EXPR]: Detect argument pack
455 operand.
456
457 2020-03-21 Patrick Palka <ppalka@redhat.com>
458
459 PR c++/94066
460 * constexpr.c (reduced_constant_expression_p) [CONSTRUCTOR]: Properly
461 handle unions without an initializer.
462 (cxx_eval_component_reference): Emit a different diagnostic when the
463 constructor element corresponding to a union member is NULL.
464 (cxx_eval_bare_aggregate): When constructing a union, always set the
465 active union member before evaluating the initializer. Relax assertion
466 that verifies the index of the constructor element we're initializing
467 hasn't been changed.
468 (cxx_eval_store_expression): Diagnose changing the active union member
469 while the union is in the process of being initialized. After setting
470 an active union member, clear CONSTRUCTOR_NO_CLEARING on the underlying
471 CONSTRUCTOR.
472 (cxx_eval_constant_expression) [PLACEHOLDER_EXPR]: Don't re-reduce a
473 CONSTRUCTOR returned by lookup_placeholder.
474
475 2020-03-20 Patrick Palka <ppalka@redhat.com>
476
477 * cxx-pretty-print.c (pp_cxx_parameter_mapping): Make extern. Move
478 the "[with ]" bits to here from ...
479 (pp_cxx_atomic_constraint): ... here.
480 * cxx-pretty-print.h (pp_cxx_parameter_mapping): Declare.
481 * error.c (rebuild_concept_check): Delete.
482 (print_concept_check_info): Print the dependent form of the constraint and the
483 preferably substituted parameter mapping alongside it.
484
485 2020-03-19 Jason Merrill <jason@redhat.com>
486
487 PR c++/94175
488 * cp-gimplify.c (simple_empty_class_p): Look through
489 SIMPLE_TARGET_EXPR_P.
490 (cp_gimplify_expr) [MODIFY_EXPR]: Likewise.
491 [RETURN_EXPR]: Avoid producing 'return *retval;'.
492 * call.c (build_call_a): Strip TARGET_EXPR from empty class arg.
493 * cp-tree.h (SIMPLE_TARGET_EXPR_P): Check that TARGET_EXPR_INITIAL
494 is non-null.
495
496 2020-03-19 Jakub Jelinek <jakub@redhat.com>
497
498 PR c++/93931
499 * parser.c (cp_parser_omp_var_list_no_open): Call process_outer_var_ref
500 on outer_automatic_var_p decls.
501 * cp-gimplify.c (cxx_omp_disregard_value_expr): Return true also for
502 capture proxy decls.
503
504 2020-03-18 Nathan Sidwell <nathan@acm.org>
505
506 PR c++/94147 - mangling of lambdas assigned to globals
507 * parser.c (cp_parser_init_declarator): Namespace-scope variables
508 provide a lambda scope.
509 * tree.c (no_linkage_check): Lambdas with a variable for extra
510 scope have a linkage from the variable.
511
512 2020-03-18 Jakub Jelinek <jakub@redhat.com>
513
514 * constraint.cc (resolve_function_concept_check, subsumes_constraints,
515 strictly_subsumes): Fix up duplicated word issue in a comment.
516 * coroutines.cc (build_init_or_final_await, captures_temporary):
517 Likewise.
518 * logic.cc (dnf_size_r, cnf_size_r): Likewise.
519 * pt.c (append_type_to_template_for_access_check): Likewise.
520
521 PR c++/91759
522 * decl.c (grokfndecl): Restore old diagnostics about deduction
523 guide declared in different scope if in_namespace is NULL_TREE.
524
525 2020-03-17 Jakub Jelinek <jakub@redhat.com>
526
527 PR c++/90995
528 * parser.c (cp_parser_enum_specifier): Use temp_override for
529 parser->colon_corrects_to_scope_p, replace goto out with return.
530 If scoped enum or enum with underlying type is not followed by
531 { or ;, call cp_parser_commit_to_tentative_parse before calling
532 cp_parser_error and make sure to return error_mark_node instead of
533 NULL_TREE. Formatting fixes.
534
535 2020-03-17 Ville Voutilainen <ville.voutilainen@gmail.com>
536
537 PR c++/94197
538 * method.c (assignable_expr): Use cp_unevaluated.
539 (is_xible_helper): Push a non-deferred access check for
540 the stub objects created by assignable_expr and constructible_expr.
541
542 2020-03-17 Jakub Jelinek <jakub@redhat.com>
543
544 * pt.c (tsubst): Fix up duplicated word issue in a diagnostic message.
545 (lookup_template_class_1, tsubst_expr): Fix up duplicated word issue
546 in a comment.
547 * parser.c (cp_parser_statement, cp_parser_linkage_specification,
548 cp_parser_placeholder_type_specifier,
549 cp_parser_constraint_requires_parens): Likewise.
550 * name-lookup.c (suggest_alternative_in_explicit_scope): Likewise.
551
552 2020-03-15 Iain Sandoe <iain@sandoe.co.uk>
553
554 * coroutines.cc (co_await_expander): Fix indentation.
555
556 2020-03-14 Jason Merrill <jason@redhat.com>
557
558 PR c++/92068
559 * pt.c (process_partial_specialization): Error rather than crash on
560 extra pack expansion.
561
562 2020-03-14 Jason Merrill <jason@redhat.com>
563
564 PR c++/92909
565 * pt.c (find_parameter_packs_r): [DECL_EXPR]: Walk
566 DECL_ORIGINAL_TYPE of a typedef.
567
568 2020-03-14 Jason Merrill <jason@redhat.com>
569
570 PR c++/93248
571 * pt.c (build_deduction_guide): Clear cp_unevaluated_operand for
572 substituting DECL_ARGUMENTS.
573
574 2020-03-14 Jakub Jelinek <jakub@redhat.com>
575
576 * logic.cc (formula::formula): Change "a an" to "an" in a comment.
577 * parser.c (cp_debug_parser): Change "a an" to "an" in a string
578 literal.
579
580 2020-03-13 Patrick Palka <ppalka@redhat.com>
581
582 PR c++/67960
583 * call.c (build_over_call): Use a warning_sentinel to disable
584 warn_deprecated_decl before calling build_addr_func.
585
586 2020-03-12 Jakub Jelinek <jakub@redhat.com>
587
588 PR c++/94124
589 * decl.c (reshape_init_array_1): Don't unshare constructor if there
590 aren't any trailing zero elts, otherwise only unshare the first
591 nelts.
592
593 2020-03-11 Jason Merrill <jason@redhat.com>
594
595 PR c++/93907
596 * constraint.cc (tsubst_parameter_mapping): Canonicalize type
597 argument.
598
599 2020-03-11 Marek Polacek <polacek@redhat.com>
600 Jason Merrill <jason@redhat.com>
601
602 PR c++/94074 - wrong modifying const object error for COMPONENT_REF.
603 * constexpr.c (cref_has_const_field): New function.
604 (modifying_const_object_p): Consider a COMPONENT_REF
605 const only if any of its fields are const.
606 (cxx_eval_store_expression): Mark a CONSTRUCTOR of a const type
607 as readonly after its initialization has been done.
608
609 2020-03-10 Marek Polacek <polacek@redhat.com>
610
611 PR c++/94124 - wrong conversion error with non-viable overload.
612 * decl.c (reshape_init_array_1): Unshare a constructor if we
613 stripped trailing zero-initializers.
614
615 2020-03-10 Jason Merrill <jason@redhat.com>
616
617 PR c++/93901
618 * pt.c (maybe_instantiate_noexcept): Always update clones.
619
620 2020-03-10 Jason Merrill <jason@redhat.com>
621
622 PR c++/93596
623 * pt.c (maybe_aggr_guide): Check BRACE_ENCLOSED_INITIALIZER_P.
624
625 2020-03-10 Jason Merrill <jason@redhat.com>
626
627 PR c++/93922
628 PR c++/94041
629 PR c++/52320
630 PR c++/66139
631 * cp-gimplify.c (cp_gimplify_init_expr): Partially revert patch for
632 66139: Don't split_nonconstant_init. Remove pre_p parameter.
633
634 2020-03-09 Marek Polacek <polacek@redhat.com>
635
636 PR c++/92031 - bogus taking address of rvalue error.
637 PR c++/91465 - ICE with template codes in check_narrowing.
638 PR c++/93870 - wrong error when converting template non-type arg.
639 PR c++/94068 - ICE with template codes in check_narrowing.
640 * call.c (convert_like_real): Return IMPLICIT_CONV_EXPR
641 in a template when not ck_identity and we're dealing with a class.
642 (convert_like_real) <case ck_ref_bind>: Return IMPLICIT_CONV_EXPR
643 in a template if we need a temporary.
644 * decl.c (compute_array_index_type_loc): Remove
645 instantiate_non_dependent_expr_sfinae call. Call
646 fold_non_dependent_expr instead of maybe_constant_value.
647 (build_explicit_specifier): Don't instantiate or create a sentinel
648 before converting the expression.
649 * except.c (build_noexcept_spec): Likewise.
650 * pt.c (convert_nontype_argument): Don't build IMPLICIT_CONV_EXPR.
651 Set IMPLICIT_CONV_EXPR_NONTYPE_ARG if that's what
652 build_converted_constant_expr returned.
653 * typeck2.c (check_narrowing): Call fold_non_dependent_expr instead
654 of maybe_constant_value.
655
656 2020-03-09 Jakub Jelinek <jakub@redhat.com>
657
658 PR c++/94067
659 Revert
660 2019-10-11 Paolo Carlini <paolo.carlini@oracle.com>
661
662 * constexpr.c (cxx_eval_constant_expression): Do not handle
663 RROTATE_EXPR and LROTATE_EXPR.
664
665 2020-03-09 Marek Polacek <polacek@redhat.com>
666
667 PR c++/94050 - ABI issue with alignas on armv7hl.
668 * class.c (layout_class_type): Don't replace a class's
669 CLASSTYPE_AS_BASE if their TYPE_USER_ALIGN don't match.
670
671 2020-03-09 Bin Cheng <bin.cheng@linux.alibaba.com>
672
673 * coroutines.cc (build_actor_fn): Factor out code inserting the
674 default return_void call to...
675 (morph_fn_to_coro): ...here, also hoist local var declarations.
676
677 2020-03-08 Patrick Palka <ppalka@redhat.com>
678
679 PR c++/93729
680 * call.c (convert_like_real): Check complain before emitting an error
681 about binding a bit-field to a reference.
682
683 * cxx-pretty-print.c (cxx_pretty_printer::simple_type_specifier)
684 [TYPENAME_TYPE]: Print the TYPENAME_TYPE_FULLNAME instead of the
685 TYPE_NAME.
686
687 2020-03-06 Nathan Sidwell <nathan@acm.org>
688
689 PR c++/94027
690 * mangle.c (find_substitution): Don't call same_type_p on template
691 args that cannot match.
692
693 2020-03-04 Martin Sebor <msebor@redhat.com>
694
695 PR c++/90938
696 * tree.c (type_initializer_zero_p): Fail for structs initialized
697 with non-structs.
698
699 2020-03-04 Jason Merrill <jason@redhat.com>
700
701 PR c++/90432
702 * init.c (perform_member_init): Don't do aggregate initialization of
703 empty field.
704 * constexpr.c (cx_check_missing_mem_inits): Don't enforce
705 initialization of empty field.
706
707 2020-03-04 Martin Liska <mliska@suse.cz>
708
709 * method.c: Wrap array in ctor with braces in order
710 to silent clang warnings.
711
712 2020-03-03 Jason Merrill <jason@redhat.com>
713 Marek Polacek <polacek@redhat.com>
714
715 PR c++/90505 - mismatch in template argument deduction.
716 * pt.c (tsubst): Don't reduce the template level of template
717 parameters when tf_partial.
718
719 2020-03-03 Jakub Jelinek <jakub@redhat.com>
720
721 PR c++/93998
722 * constexpr.c (cxx_eval_constant_expression)
723 <case TARGET_EXPR, case SAVE_EXPR>: Don't record anything if
724 *non_constant_p is true.
725
726 2020-03-03 Jun Ma <JunMa@linux.alibaba.com>
727
728 * coroutines.cc (captures_temporary): Strip component_ref
729 to its base object.
730
731 2020-03-03 Jun Ma <JunMa@linux.alibaba.com>
732
733 * coroutines.cc (finish_co_await_expr): Build co_await_expr
734 with unknown_type_node.
735 (finish_co_yield_expr): Ditto.
736 *pt.c (type_dependent_expression_p): Set co_await/yield_expr
737 with unknown type as dependent.
738
739 2020-03-02 Iain Sandoe <iain@sandoe.co.uk>
740
741 * coroutines.cc (struct local_var_info): Adjust to remove the
742 reference to the captured var, and just to note that this is a
743 lambda capture proxy.
744 (transform_local_var_uses): Handle lambda captures specially.
745 (struct param_frame_data): Add a visited set.
746 (register_param_uses): Also check for param uses in lambda
747 capture proxies.
748 (struct local_vars_frame_data): Remove captures list.
749 (register_local_var_uses): Handle lambda capture proxies by
750 noting and bypassing them.
751 (morph_fn_to_coro): Update to remove lifetime extension of
752 lambda capture-by-copy vars.
753
754 2020-03-02 Iain Sandoe <iain@sandoe.co.uk>
755
756 * coroutines.cc (build_co_await): Do not build frame
757 awaitable proxy vars when the co_await expression is
758 a function parameter or local var.
759 (co_await_expander): Do not initialise a frame var with
760 itself.
761 (transform_await_expr): Only substitute the awaitable
762 frame var if it's needed.
763 (register_awaits): Do not make frame copies for param
764 or local vars that are awaitables.
765
766 2020-02-28 Jason Merrill <jason@redhat.com>
767
768 Implement P2092R0, Disambiguating Nested-Requirements
769 * parser.c (cp_parser_requirement_parameter_list): Pass
770 CP_PARSER_FLAGS_TYPENAME_OPTIONAL.
771
772 * call.c (build_user_type_conversion_1): Don't look at the second
773 conversion of a non-viable candidate.
774
775 2020-02-28 Jakub Jelinek <jakub@redhat.com>
776
777 P1937R2 - Fixing inconsistencies between const{expr,eval} functions
778 * typeck.c (cp_build_addr_expr_1): Allow taking address of immediate
779 functions in unevaluated contexts.
780
781 2020-02-27 Nathan Sidwell <nathan@acm.org>
782
783 PR c++/93933
784 * pt.c (template_args_equal): Pass ARGUMENT_PACKS through to
785 cp_tree_equal.
786 * tree.c (cp_tree_equal): Compare ARGUMENT_PACKS here,
787 * typeck.c (comptypes): Assert we don't get any argument packs.
788
789 * class.c (adjust_clone_args): Correct arg-checking assert.
790 * typeck.c (comptypes): Assert not nulls.
791
792 2020-02-26 Marek Polacek <polacek@redhat.com>
793
794 PR c++/93789 - ICE with invalid array bounds.
795 * decl.c (compute_array_index_type_loc): Don't use the folded
796 size when folding cleared TREE_CONSTANT.
797
798 2020-02-26 Iain Sandoe <iain@sandoe.co.uk>
799
800 * class.c (classtype_has_non_deleted_copy_ctor): New.
801 * coroutines.cc (struct param_info): Keep track of params
802 that are references, and cache the original type and whether
803 the DTOR is trivial.
804 (build_actor_fn): Handle param copies always, and adjust the
805 handling for references.
806 (register_param_uses): Only handle uses here.
807 (classtype_has_non_deleted_copy_ctor): New.
808 (morph_fn_to_coro): Adjust param copy handling to match n4849
809 by reordering ahead of the promise CTOR and always making a
810 frame copy, even if the param is unused in the coroutine body.
811 * cp-tree.h (classtype_has_non_deleted_copy_ctor): New.
812
813 2020-02-26 Patrick Palka <ppalka@redhat.com>
814
815 * constraint.cc (finish_constraint_binary_op): Set expr's location range
816 to the range of its operands.
817 (satisfy_atom): Pass MAP instead of ARGS to diagnose_atomic_constraint.
818 (diagnose_trait_expr): Take the instantiated parameter mapping MAP
819 instead of the corresponding template arguments ARGS and adjust body
820 accordingly.
821 (diagnose_requires_expr): Likewise.
822 (diagnose_atomic_constraint): Likewise. When printing an atomic
823 constraint expression, print the instantiated parameter mapping
824 alongside it.
825 * cxx-pretty-print.cc (cxx_pretty_printer::expression)
826 [NONTYPE_ARGUMENT_PACK]: Print braces around a NONTYPE_ARGUMENT_PACK.
827 (cxx_pretty_printer::type_id): Handle TYPE_ARGUMENT_PACK.
828
829 2020-02-26 Marek Polacek <polacek@redhat.com>
830
831 PR c++/93676 - value-init crash in template.
832 * init.c (build_new_1): Don't call build_vec_init in a template.
833
834 2020-02-26 Marek Polacek <polacek@redhat.com>
835
836 PR c++/93862 - ICE with static_cast when converting from int[].
837 * call.c (reference_compatible_p): No longer static.
838 * cp-tree.h (reference_compatible_p): Declare.
839 * typeck.c (build_static_cast_1): Use reference_compatible_p instead
840 of reference_related_p.
841
842 2020-02-26 Marek Polacek <polacek@redhat.com>
843
844 PR c++/93803 - ICE with constexpr init and [[no_unique_address]].
845 * constexpr.c (reduced_constant_expression_p): Don't crash on a null
846 field.
847
848 2020-02-24 Martin Sebor <msebor@redhat.com>
849
850 PR c++/93804
851 * parser.c (cp_parser_check_class_key): Avoid issuing -Wredundant-tags
852 in shared C/C++ code in headers.
853 Remove a duplicate hunk of code.
854
855 2020-02-24 Marek Polacek <polacek@redhat.com>
856
857 PR c++/93869 - ICE with -Wmismatched-tags.
858 * parser.c (cp_parser_check_class_key): Check class_key earlier.
859
860 2020-02-24 Marek Polacek <polacek@redhat.com>
861
862 PR c++/93712 - ICE with ill-formed array list-initialization.
863 * call.c (next_conversion): Return NULL for ck_aggr.
864 (build_aggr_conv): Set u.expr instead of u.next.
865 (build_array_conv): Likewise.
866 (build_complex_conv): Likewise.
867 (conv_get_original_expr): Handle ck_aggr.
868
869 2020-02-24 Jakub Jelinek <jakub@redhat.com>
870
871 P1937R2 - Fixing inconsistencies between const{expr,eval} functions
872 * call.c (build_over_call): Don't evaluate immediate functions in
873 unevaluated operands.
874
875 2020-02-24 Jason Merrill <jason@redhat.com>
876
877 P0780R2: Resolve lambda init-capture pack grammar.
878 * parser.c (cp_parser_lambda_introducer): Expect &...x=y rather than
879 ...&x=y.
880
881 2020-02-22 Marek Polacek <polacek@redhat.com>
882
883 PR c++/93882
884 * decl.c (grokdeclarator): Use %qs in a diagnostic message.
885
886 2020-02-21 Martin Sebor <msebor@redhat.com>
887
888 PR gcov-profile/93753
889 * class.c (check_flexarrays): Tighten up a test for potential members
890 of anonymous structs or unions.
891
892 2020-02-20 Martin Sebor <msebor@redhat.com>
893
894 PR c++/93801
895 * parser.c (cp_parser_check_class_key): Only handle true C++ class-keys.
896
897 2020-02-20 Martin Liska <mliska@suse.cz>
898
899 PR translation/93841
900 * config/or1k/or1k.opt: Remove superfluous word.
901 * doc/invoke.texi: Likewise.
902
903 2020-02-20 Martin Liska <mliska@suse.cz>
904
905 PR translation/93838
906 * parser.c (cp_parser_decl_specifier_seq): Remove trailing space.
907
908 2020-02-19 Marek Polacek <polacek@redhat.com>
909
910 PR c++/93169 - wrong-code with a non-constexpr constructor.
911 * constexpr.c (cxx_eval_call_expression): Only set TREE_READONLY
912 on constant CONSTRUCTORs.
913
914 2020-02-15 Marek Polacek <polacek@redhat.com>
915
916 PR c++/93710 - poor diagnostic for array initializer.
917 * call.c (build_user_type_conversion_1): Use cp_expr_loc_or_input_loc
918 for an error call.
919
920 2020-02-15 Jason Merrill <jason@redhat.com>
921
922 PR c++/92556
923 * pt.c (any_template_parm_r): Look into lambda body.
924
925 PR c++/92583
926 * pt.c (any_template_parm_r): Remove CONSTRUCTOR handling.
927
928 2020-02-14 Jakub Jelinek <jakub@redhat.com>
929
930 PR c++/61414
931 * class.c (enum_min_precision): Change prec type from int to int &.
932
933 PR libstdc++/92906
934 * cp-tree.h (enum cp_tree_index): Add CPTI_FALLBACK_DFLOAT32_TYPE,
935 CPTI_FALLBACK_DFLOAT64_TYPE and CPTI_FALLBACK_DFLOAT128_TYPE.
936 (fallback_dfloat32_type, fallback_dfloat64_type,
937 fallback_dfloat128_type): Define.
938 * mangle.c (write_builtin_type): Handle fallback_dfloat*_type like
939 dfloat*_type_node.
940 * rtti.c (emit_support_tinfos): Emit DFP typeinfos even when dfp
941 is disabled for compatibility.
942
943 2020-02-13 Jason Merrill <jason@redhat.com>
944
945 PR c++/93713
946 * name-lookup.c (matching_fn_p): A function does not match a
947 template.
948
949 PR c++/93643
950 PR c++/91476
951 * tree.c (decl_linkage): Always lk_none for locals.
952
953 2020-02-12 Jason Merrill <jason@redhat.com>
954
955 PR c++/92583
956 PR c++/92654
957 * tree.c (cp_walk_subtrees): Walk CONSTRUCTOR types here.
958 * pt.c (find_parameter_packs_r): Not here.
959
960 2020-02-12 Iain Sandoe <iain@sandoe.co.uk>
961
962 * coroutines.cc (build_actor_fn): Implement deallocation function
963 selection per n4849, dcl.fct.def.coroutine bullet 12.
964 (morph_fn_to_coro): Implement allocation function selection per
965 n4849, dcl.fct.def.coroutine bullets 9 and 10.
966
967 2020-02-12 Marek Polacek <polacek@redhat.com>
968
969 PR c++/93684 - ICE-on-invalid with broken attribute.
970 * parser.c (cp_parser_std_attribute): Peek a token first before
971 consuming it.
972
973 2020-02-11 Jason Merrill <jason@redhat.com>
974
975 PR c++/93675
976 * class.c (add_implicitly_declared_members): Use do_friend.
977 * method.c (implicitly_declare_fn): Fix friend handling.
978 (decl_remember_implicit_trigger_p): New.
979 (synthesize_method): Use it.
980 * decl2.c (mark_used): Use it.
981
982 2020-02-11 Jason Merrill <jason@redhat.com>
983
984 PR c++/93650
985 PR c++/90691
986 * constexpr.c (maybe_constant_value): Correct earlier change.
987 (cxx_eval_binary_expression) [SPACESHIP_EXPR]: Pass lval through.
988 * method.c (genericize_spaceship): Wrap result in TARGET_EXPR.
989
990 2020-02-12 Patrick Palka <ppalka@redhat.com>
991
992 PR c++/69448
993 PR c++/80471
994 * type-utils.h (find_type_usage): Refactor to take a tree * and to
995 return a tree *, and update documentation accordingly.
996 * pt.c (make_auto_1): Set AUTO_IS_DECLTYPE when building a
997 decltype(auto) node.
998 (make_constrained_decltype_auto): No need to explicitly set
999 AUTO_IS_DECLTYPE anymore.
1000 (splice_late_return_type): Use find_type_usage to find and
1001 replace a possibly nested auto node instead of using is_auto.
1002 Check test for is_auto into an assert when deciding whether
1003 to late_return_type.
1004 (type_uses_auto): Adjust the call to find_type_usage.
1005 * parser.c (cp_parser_decltype): No need to explicitly set
1006 AUTO_IS_DECLTYPE anymore.
1007
1008 * error.c (dump_decl) [CONCEPT_DECL]: Use dump_simple_decl.
1009 (dump_simple_decl): Handle standard concept definitions as well as
1010 variable concept definitions.
1011
1012 2020-02-10 Jakub Jelinek <jakub@redhat.com>
1013
1014 PR other/93641
1015 * error.c (dump_decl_name): Fix up last argument to strncmp.
1016
1017 2020-02-10 Jason Merrill <jason@redhat.com>
1018
1019 PR c++/93618
1020 * tree.c (array_of_unknown_bound_p): New.
1021 * init.c (perform_member_init): Do nothing for flexible arrays.
1022
1023 2020-02-09 Jakub Jelinek <jakub@redhat.com>
1024
1025 PR c++/93633
1026 * constexpr.c (cxx_eval_constant_expression): If obj is heap var with
1027 ARRAY_TYPE, use the element type. Punt if objtype after that is not
1028 a class type.
1029
1030 2020-02-08 Jason Merrill <jason@redhat.com>
1031
1032 PR c++/90691
1033 * expr.c (fold_for_warn): Call maybe_constant_value.
1034 * constexpr.c (struct constexpr_ctx): Add uid_sensitive bit-field.
1035 (maybe_constant_value): Add uid_sensitive parm.
1036 (get_fundef_copy): Don't copy if it's true.
1037 (cxx_eval_call_expression): Don't instantiate if it's true.
1038 (cxx_eval_outermost_constant_expr): Likewise.
1039
1040 PR c++/92852
1041 * constexpr.c (maybe_constant_value): Don't unshare if the cached
1042 value is the same as the argument.
1043
1044 * typeck.c (maybe_warn_about_returning_address_of_local): Add
1045 location parameter.
1046
1047 * typeck2.c (process_init_constructor): Also clear TREE_SIDE_EFFECTS
1048 if appropriate.
1049
1050 2020-02-08 Jakub Jelinek <jakub@redhat.com>
1051
1052 PR c++/93549
1053 * constexpr.c (find_array_ctor_elt): If last element has no index,
1054 for flag_checking verify all elts have no index. If i is within the
1055 elts, return it directly, if it is right after the last elt, append
1056 if NULL index, otherwise force indexes on all elts.
1057 (cxx_eval_store_expression): Allow cep->index to be NULL.
1058
1059 2020-02-07 Marek Polacek <polacek@redhat.com>
1060
1061 PR c++/92947 - Paren init of aggregates in unevaluated context.
1062 * call.c (build_new_method_call_1): Don't check
1063 cp_unevaluated_operand. Check the return value of digest_init.
1064
1065 2020-02-06 Jason Merrill <jason@redhat.com>
1066
1067 PR c++/92654
1068 * tree.c (cp_walk_subtrees): Walk into type template arguments.
1069 * cp-tree.h (TYPE_TEMPLATE_INFO_MAYBE_ALIAS): Use typedef_variant_p
1070 instead of TYPE_ALIAS_P.
1071 * pt.c (push_template_decl_real): Likewise.
1072 (find_parameter_packs_r): Likewise. Remove dead code.
1073 * error.c (find_typenames_r): Remove dead code.
1074
1075 2020-02-06 Jason Merrill <jason@redhat.com>
1076
1077 PR c++/92517
1078 * parser.c (cp_parser_constraint_primary_expression): Do the main
1079 parse non-tentatively.
1080
1081 2020-02-06 Marek Polacek <polacek@redhat.com>
1082
1083 PR c++/93597 - ICE with lambda in operator function.
1084 * name-lookup.c (maybe_save_operator_binding): Check is_overloaded_fn.
1085
1086 2020-02-05 Jason Merrill <jason@redhat.com>
1087
1088 PR c++/93140
1089 * pt.c (tsubst_decl) [PARM_DECL]: Check cp_unevaluated_operand in
1090 handling of TREE_CHAIN for empty pack.
1091
1092 2020-02-05 Jakub Jelinek <jakub@redhat.com>
1093
1094 PR c++/93557
1095 * semantics.c (cp_build_vec_convert): Call decay_conversion on arg
1096 prior to passing it to c_build_vec_convert.
1097
1098 2020-02-05 Marek Polacek <polacek@redhat.com>
1099
1100 PR c++/93559 - ICE with CONSTRUCTOR flags verification.
1101 * decl.c (reshape_init_array_1): Don't reuse a CONSTRUCTOR with
1102 TREE_SIDE_EFFECTS.
1103
1104 2020-02-05 Jason Merrill <jason@redhat.com>
1105
1106 PR c++/92593
1107 * decl.c (grokdeclarator): Reject field of current class type even
1108 in a template.
1109
1110 2020-02-05 Bin Cheng <bin.cheng@linux.alibaba.com>
1111
1112 * coroutines.cc (maybe_promote_captured_temps): Increase the index
1113 number for temporary variables' name.
1114
1115 2020-02-05 Jun Ma <JunMa@linux.alibaba.com>
1116
1117 * coroutines.cc (build_co_await): Call convert_from_reference
1118 to wrap co_await_expr with indirect_ref which avoid
1119 reference/non-reference type confusion.
1120
1121 (co_await_expander): Sink to call_expr if await_resume
1122 is wrapped by indirect_ref.
1123
1124 2020-02-04 Jason Merrill <jason@redhat.com>
1125
1126 PR c++/93551
1127 * constraint.cc (satisfy_declaration_constraints): Check return
1128 value of push_tinst_level.
1129
1130 PR c++/90951
1131 * constexpr.c (cxx_eval_array_reference): {}-initialize missing
1132 elements instead of value-initializing them.
1133
1134 PR c++/86917
1135 * init.c (perform_member_init): Simplify.
1136 * constexpr.c (cx_check_missing_mem_inits): Allow uninitialized
1137 flexarray.
1138 (cxx_eval_vec_init_1): Handle CONSTRUCTOR.
1139
1140 2020-02-04 Iain Sandoe <iain@sandoe.co.uk>
1141
1142 * coroutines.cc (find_promise_type): Delete unused forward
1143 declaration.
1144 (struct coroutine_info): Add a bool for no promise type error.
1145 (coro_promise_type_found_p): Only emit the error for a missing
1146 promise once in each affected coroutine.
1147
1148 2020-02-03 Jason Merrill <jason@redhat.com>
1149
1150 PR c++/66477
1151 * constexpr.c (cxx_eval_constant_expression) [PARM_DECL]: Don't
1152 defer loading the value of a reference.
1153
1154 2020-02-03 Jason Merrill <jason@redhat.com>
1155
1156 PR c++/91953
1157 * constexpr.c (potential_constant_expression_1) [PARM_DECL]: Allow
1158 empty class type.
1159 [COMPONENT_REF]: A member function reference doesn't use the object
1160 as an rvalue.
1161
1162 2020-02-03 Iain Sandoe <iain@sandoe.co.uk>
1163
1164 PR c++/93458
1165 * coroutines.cc (struct coroutine_info): Add a bool flag to note
1166 that we emitted an error for a bad function return type.
1167 (get_coroutine_info): Tolerate an unset info table in case of
1168 missing traits.
1169 (find_coro_traits_template_decl): In case of error or if we didn't
1170 find a type template, note we emitted the error and suppress
1171 duplicates.
1172 (find_coro_handle_template_decl): Likewise.
1173 (instantiate_coro_traits): Only check for error_mark_node in the
1174 return from lookup_qualified_name.
1175 (coro_promise_type_found_p): Reorder initialization so that we check
1176 for the traits and their usability before allocation of the info
1177 table. Check for a suitable return type and emit a diagnostic for
1178 here instead of relying on the lookup machinery. This allows the
1179 error to have a better location, and means we can suppress multiple
1180 copies.
1181 (coro_function_valid_p): Re-check for a valid promise (and thus the
1182 traits) before proceeding. Tolerate missing info as a fatal error.
1183
1184 2020-02-03 Jason Merrill <jason@redhat.com>
1185
1186 PR c++/88256
1187 * cp-gimplify.c (predeclare_vla): New.
1188 (cp_genericize_r) [NOP_EXPR]: Call it.
1189
1190 2020-02-03 Jun Ma <JunMa@linux.alibaba.com>
1191
1192 * coroutines.cc (transform_await_wrapper): Set actor funcion as
1193 new context of label_decl.
1194 (build_actor_fn): Fill new field of await_xform_data.
1195
1196 2020-02-02 Marek Polacek <polacek@redhat.com>
1197
1198 PR c++/93530 - ICE on invalid alignas in a template.
1199 * decl.c (grokdeclarator): Call cplus_decl_attributes instead of
1200 decl_attributes.
1201
1202 2020-01-31 Jason Merrill <jason@redhat.com>
1203
1204 PR c++/86216
1205 * semantics.c (process_outer_var_ref): Capture VLAs even in
1206 unevaluated context.
1207
1208 PR c++/14179
1209 * decl.c (reshape_init_array_1): Reuse a single CONSTRUCTOR with
1210 non-aggregate elements.
1211 (reshape_init_array): Add first_initializer_p parm.
1212 (reshape_init_r): Change first_initializer_p from bool to tree.
1213 (reshape_init): Pass init to it.
1214
1215 PR c++/14179
1216 * parser.c (cp_parser_initializer_list): Suppress location wrappers
1217 after 256 elements.
1218
1219 2020-01-29 Jason Merrill <jason@redhat.com>
1220
1221 PR c++/82521
1222 * pt.c (tsubst_copy_and_build) [EQ_EXPR]: Only suppress warnings if
1223 the expression was dependent before substitution.
1224
1225 2020-01-30 Bin Cheng <bin.cheng@linux.alibaba.com>
1226
1227 * coroutines.cc (act_des_fn): New.
1228 (morph_fn_to_coro): Call act_des_fn to build actor/destroy decls.
1229 Access promise via actor function's frame pointer argument.
1230 (build_actor_fn, build_destroy_fn): Use frame pointer argument.
1231
1232 2020-01-30 Bin Cheng <bin.cheng@linux.alibaba.com>
1233
1234 * coroutines.cc (co_await_expander): Handle type conversion case.
1235
1236 2020-01-29 Jason Merrill <jason@redhat.com>
1237
1238 PR c++/90333
1239 PR c++/89640
1240 PR c++/60503
1241 * parser.c (cp_parser_type_specifier_seq): Don't parse attributes in
1242 a trailing return type.
1243 (cp_parser_lambda_declarator_opt): Parse C++11 attributes before
1244 parens.
1245
1246 2020-01-29 Marek Polacek <polacek@redhat.com>
1247
1248 PR c++/91754 - Fix template arguments comparison with class NTTP.
1249 * pt.c (class_nttp_const_wrapper_p): New.
1250 (template_args_equal): See through class_nttp_const_wrapper_p
1251 arguments.
1252
1253 2020-01-29 Marek Polacek <polacek@redhat.com>
1254
1255 PR c++/92948 - Fix class NTTP with template arguments.
1256 * pt.c (convert_nontype_argument): Use IMPLICIT_CONV_EXPR when
1257 converting a value-dependent expression to a class type.
1258 (tsubst_copy) <case VIEW_CONVERT_EXPR>: Allow IMPLICIT_CONV_EXPR
1259 as the result of the tsubst_copy call.
1260
1261 2020-01-29 Jakub Jelinek <jakub@redhat.com>
1262
1263 PR c++/91118
1264 * cp-gimplify.c (cxx_omp_predetermined_sharing): Return
1265 OMP_CLAUSE_DEFAULT_SHARED for typeinfo decls.
1266
1267 2020-01-28 Jason Merrill <jason@redhat.com>
1268
1269 PR c++/93442
1270 * parser.c (cp_parser_lambda_expression): Clear in_discarded_stmt.
1271
1272 PR c++/93477
1273 PR c++/91476
1274 * decl2.c (copy_linkage): Do copy DECL_ONE_ONLY and DECL_WEAK.
1275
1276 PR c++/90546
1277 * call.c (build_user_type_conversion_1): Allow a template conversion
1278 returning an rvalue reference to bind directly to an lvalue.
1279
1280 PR c++/90731
1281 * decl.c (grokdeclarator): Propagate eh spec from typedef.
1282
1283 2020-01-28 Martin Liska <mliska@suse.cz>
1284
1285 PR c++/92440
1286 * pt.c (redeclare_class_template): Group couple of
1287 errors and inform messages with auto_diagnostic_group.
1288
1289 2020-01-28 Martin Liska <mliska@suse.cz>
1290
1291 PR c++/92440
1292 * pt.c (redeclare_class_template): Use inform
1293 for the second location.
1294
1295 2020-01-27 Jason Merrill <jason@redhat.com>
1296
1297 PR c++/90966
1298 * pt.c (tsubst_copy) [STRING_CST]: Don't use fold_convert.
1299
1300 2020-01-27 Iain Sandoe <iain@sandoe.co.uk>
1301
1302 PR c++/93443
1303 * coroutines.cc (morph_fn_to_coro): Check the ramp return
1304 value when it is constructed from the 'get return object'.
1305
1306 2020-01-27 Nathan Sidwell <nathan@acm.org>
1307
1308 PR c++/91826
1309 * name-lookup.c (is_ancestor): Allow CHILD to be a namespace alias.
1310
1311 2020-01-26 Jason Merrill <jason@redhat.com>
1312
1313 PR c++/90992
1314 * except.c (maybe_noexcept_warning): Check DECL_IN_SYSTEM_HEADER and
1315 temporarily enable -Wsystem-headers. Change second warning to
1316 conditional inform.
1317
1318 PR c++/90997
1319 * semantics.c (finish_call_expr): Don't call
1320 instantiate_non_dependent_expr before warn_for_memset.
1321
1322 2020-01-25 Marek Polacek <polacek@redhat.com>
1323
1324 PR c++/93414 - poor diagnostic for dynamic_cast in constexpr context.
1325 * constexpr.c (cxx_eval_dynamic_cast_fn): Add a reference
1326 dynamic_cast diagnostic.
1327
1328 2020-01-24 Jason Merrill <jason@redhat.com>
1329
1330 PR c++/93400 - ICE with constrained friend.
1331 * constraint.cc (maybe_substitute_reqs_for): New.
1332 * decl.c (function_requirements_equivalent_p): Call it.
1333 * pt.c (tsubst_friend_function): Only substitute
1334 TEMPLATE_PARMS_CONSTRAINTS.
1335 (tsubst_template_parms): Copy constraints.
1336
1337 2020-01-24 Jason Merrill <jason@redhat.com>
1338
1339 PR c++/93279 - ICE with lambda in member operator.
1340 * name-lookup.c (maybe_save_operator_binding): Don't remember
1341 class-scope bindings.
1342
1343 2020-01-24 Jason Merrill <jason@redhat.com>
1344
1345 PR c++/93377 - ICE with member alias in constraint.
1346 * pt.c (any_template_parm_r): Look at template arguments for all
1347 aliases, not only alias templates.
1348
1349 2020-01-24 Marek Polacek <polacek@redhat.com>
1350
1351 PR c++/93299 - ICE in tsubst_copy with parenthesized expression.
1352 * pt.c (tsubst_copy): Handle a REF_PARENTHESIZED_P VIEW_CONVERT_EXPR.
1353
1354 2020-01-24 Jason Merrill <jason@redhat.com>
1355
1356 PR c++/92852 - ICE with generic lambda and reference var.
1357 * constexpr.c (maybe_constant_value): Likewise.
1358
1359 2020-01-23 Paolo Carlini <paolo.carlini@oracle.com>
1360
1361 PR c++/92804
1362 * parser.c (cp_parser_nested_name_specifier_opt): Properly
1363 diagnose concept-ids.
1364
1365 2020-01-23 Jason Merrill <jason@redhat.com>
1366
1367 PR c++/93331 - ICE with __builtin_strchr.
1368 * constexpr.c (cxx_eval_builtin_function_call): Use the original
1369 argument if we didn't manage to extract a STRING_CST.
1370
1371 PR c++/93345 - ICE with defaulted dtor and template.
1372 PR c++/33799
1373 * decl.c (cxx_maybe_build_cleanup): Don't try to set
1374 throwing_cleanup in a template.
1375
1376 2020-01-22 Marek Polacek <polacek@redhat.com>
1377
1378 PR c++/92907 - noexcept does not consider "const" in member functions.
1379 * g++.dg/cpp0x/noexcept56.C: New test.
1380
1381 2020-01-22 Marek Polacek <polacek@redhat.com>
1382
1383 PR c++/93324 - ICE with -Wall on constexpr if.
1384 * semantics.c (is_std_constant_evaluated_p): Check fndecl.
1385
1386 2020-01-22 Patrick Palka <ppalka@redhat.com>
1387
1388 * constraint.cc (get_mapped_args): Avoid using auto_vec
1389 as a vector element. Release the vectors inside the lists
1390 vector.
1391 * parser.c (cp_literal_operator_id): Free the buffer.
1392
1393 2020-01-22 Jun Ma <JunMa@linux.alibaba.com>
1394
1395 * coroutines.cc (finish_co_await_expr): Add error check on return
1396 value of build_co_await.
1397 (finish_co_yield_expr,): Ditto.
1398
1399 2020-01-22 Jun Ma <JunMa@linux.alibaba.com>
1400
1401 * coroutines.cc (lookup_awaitable_member): Lookup an awaitable member.
1402 (lookup_promise_method): Emit diagnostic when get NULL_TREE back only.
1403 (build_co_await): Use lookup_awaitable_member instead of lookup_member.
1404
1405 2020-01-21 Jason Merrill <jason@redhat.com>
1406
1407 PR c++/60855 - ICE with sizeof VLA capture.
1408 * lambda.c (is_lambda_ignored_entity): Don't look past VLA capture.
1409
1410 PR c++/90732 - ICE with VLA capture and generic lambda.
1411 * pt.c (tsubst_lambda_expr): Repeat add_capture for VLAs.
1412
1413 2020-01-21 Iain Sandoe <iain@sandoe.co.uk>
1414 Bin Cheng <bin.cheng@linux.alibaba.com>
1415
1416 * coroutines.cc (coro_promise_type_found_p): Check for NULL return
1417 from complete_type_or_else.
1418 (register_param_uses): Likewise.
1419 (build_co_await): Do not try to use complete_type_or_else for void
1420 types, otherwise for incomplete types, check for NULL return from
1421 complete_type_or_else.
1422
1423 2020-01-21 Jason Merrill <jason@redhat.com>
1424
1425 PR c++/91476 - anon-namespace reference temp clash between TUs.
1426 * decl2.c (copy_linkage): Factor out of get_guard.
1427 * call.c (make_temporary_var_for_ref_to_temp): Use it.
1428 * decl.c (cp_finish_decomp): Use it.
1429 (cp_finish_decl): determine_visibility sooner.
1430
1431 2020-01-21 Bin Cheng <bin.cheng@linux.alibaba.com>
1432
1433 * coroutines.cc (finish_co_await_expr): Set return value flag.
1434 (finish_co_yield_expr, morph_fn_to_coro): Ditto.
1435
1436 2020-01-19 Jason Merrill <jason@redhat.com>
1437
1438 PR c++/33799 - destroy return value, take 2.
1439 * cp-tree.h (current_retval_sentinel): New macro.
1440 (struct language_function): Add throwing_cleanup bitfield.
1441 * decl.c (cxx_maybe_build_cleanup): Set it.
1442 * except.c (maybe_set_retval_sentinel)
1443 (maybe_splice_retval_cleanup): New functions.
1444 * parser.c (cp_parser_compound_statement): Call
1445 maybe_splice_retval_cleanup.
1446 * typeck.c (check_return_expr): Call maybe_set_retval_sentinel.
1447
1448 * parser.c (cp_parser_lambda_body): Use cp_parser_function_body.
1449
1450 2020-01-18 Jakub Jelinek <jakub@redhat.com>
1451
1452 * coroutines.cc (get_fn_local_identifier): Fix NO_DOT_IN_LABEL
1453 but non-NO_DOLLAR_IN_LABEL case build.
1454
1455 2020-01-18 Iain Sandoe <iain@sandoe.co.uk>
1456
1457 * Make-lang.in: Add coroutines.o.
1458 * cp-tree.h (lang_decl-fn): coroutine_p, new bit.
1459 (DECL_COROUTINE_P): New.
1460 * lex.c (init_reswords): Enable keywords when the coroutine flag
1461 is set,
1462 * operators.def (co_await): New operator.
1463 * call.c (add_builtin_candidates): Handle CO_AWAIT_EXPR.
1464 (op_error): Likewise.
1465 (build_new_op_1): Likewise.
1466 (build_new_function_call): Validate coroutine builtin arguments.
1467 * constexpr.c (potential_constant_expression_1): Handle
1468 CO_AWAIT_EXPR, CO_YIELD_EXPR, CO_RETURN_EXPR.
1469 * coroutines.cc: New file.
1470 * cp-objcp-common.c (cp_common_init_ts): Add CO_AWAIT_EXPR,
1471 CO_YIELD_EXPR, CO_RETRN_EXPR as TS expressions.
1472 * cp-tree.def (CO_AWAIT_EXPR, CO_YIELD_EXPR, (CO_RETURN_EXPR): New.
1473 * cp-tree.h (coro_validate_builtin_call): New.
1474 * decl.c (emit_coro_helper): New.
1475 (finish_function): Handle the case when a function is found to
1476 be a coroutine, perform the outlining and emit the outlined
1477 functions. Set a bit to signal that this is a coroutine component.
1478 * parser.c (enum required_token): New enumeration RT_CO_YIELD.
1479 (cp_parser_unary_expression): Handle co_await.
1480 (cp_parser_assignment_expression): Handle co_yield.
1481 (cp_parser_statement): Handle RID_CO_RETURN.
1482 (cp_parser_jump_statement): Handle co_return.
1483 (cp_parser_operator): Handle co_await operator.
1484 (cp_parser_yield_expression): New.
1485 (cp_parser_required_error): Handle RT_CO_YIELD.
1486 * pt.c (tsubst_copy): Handle CO_AWAIT_EXPR.
1487 (tsubst_expr): Handle CO_AWAIT_EXPR, CO_YIELD_EXPR and
1488 CO_RETURN_EXPRs.
1489 * tree.c (cp_walk_subtrees): Likewise.
1490
1491 2020-01-17 Jason Merrill <jason@redhat.com>
1492
1493 PR c++/92531 - ICE with noexcept(lambda).
1494 * pt.c (uses_template_parms): Don't try to enumerate all the
1495 expression cases.
1496
1497 2020-01-17 Jakub Jelinek <jakub@redhat.com>
1498
1499 PR c++/93228
1500 * parser.c (cp_parser_template_name): Look up deprecated attribute
1501 in DECL_TEMPLATE_RESULT or its type's attributes.
1502
1503 2020-01-16 Jason Merrill <jason@redhat.com>
1504
1505 PR c++/93286 - ICE with __is_constructible and variadic template.
1506 * pt.c (tsubst) [TREE_LIST]: Handle pack expansion.
1507 (tsubst_copy_and_build) [TRAIT_EXPR]: Always use tsubst for type2.
1508
1509 PR c++/93280 - ICE with aggregate assignment and DMI.
1510 * init.c (get_nsdmi): Set TARGET_EXPR_DIRECT_INIT_P here.
1511 * typeck2.c (digest_nsdmi_init): Not here.
1512
1513 2020-01-15 Paolo Carlini <paolo.carlini@oracle.com>
1514
1515 PR c++/91073
1516 * cp-tree.h (is_constrained_auto): New.
1517 * parser.c (cp_parser_maybe_commit_to_declaration): Correctly
1518 handle concept-check expressions; take a cp_decl_specifier_seq*
1519 instead of a bool.
1520 (cp_parser_condition): Update call.
1521 (cp_parser_simple_declaration): Likewise.
1522 (cp_parser_placeholder_type_specifier): Correctly handle
1523 concept-check expressions.
1524
1525 2020-01-15 Jason Merrill <jason@redhat.com>
1526
1527 Revert
1528 PR c++/33799 - destroy return value if local cleanup throws.
1529 * cp-tree.h (current_retval_sentinel): New macro.
1530 * decl.c (start_preparsed_function): Set up cleanup for retval.
1531 * typeck.c (check_return_expr): Set current_retval_sentinel.
1532
1533 PR c++/93257 - consteval void function.
1534 * constexpr.c (verify_constant): Allow void_node.
1535
1536 PR c++/92871 - bad code with xvalue and GNU ?: extension.
1537 * call.c (prevent_lifetime_extension): New.
1538 (build_conditional_expr_1): Use it.
1539
1540 2020-01-14 Nathan Sidwell <nathan@acm.org>
1541
1542 PR c++/90916
1543 * pt.c (retrieve_specialization): Use get_template_info, not open
1544 coding access.
1545
1546 PR c++/90916
1547 * pt.c (retrieve_specialization): Get the TI from the decl or the
1548 classtype as appropriate.
1549
1550 2020-01-14 David Malcolm <dmalcolm@redhat.com>
1551
1552 * cp-gimplify.c (source_location_table_entry_hash::empty_zero_p):
1553 New static constant.
1554 * cp-tree.h (named_decl_hash::empty_zero_p): Likewise.
1555 (struct named_label_hash::empty_zero_p): Likewise.
1556 * decl2.c (mangled_decl_hash::empty_zero_p): Likewise.
1557
1558 2020-01-14 Jason Merrill <jason@redhat.com>
1559
1560 PR c++/92590 - wrong handling of inherited default ctor.
1561 * class.c (add_method): A constrained inherited ctor doesn't hide an
1562 implicit derived ctor.
1563 Revert:
1564 PR c++/92552 - ICE with inherited constrained default ctor.
1565 * pt.c (instantiate_class_template_1): Copy
1566 TYPE_HAS_USER_CONSTRUCTOR.
1567 PR c++/91930 - ICE with constrained inherited default ctor.
1568 * name-lookup.c (do_class_using_decl): Set TYPE_HAS_USER_CONSTRUCTOR
1569 for inherited constructor.
1570 PR c++/92594 - ICE with inherited trivial default ctor.
1571 * method.c (trivial_fn_p): Treat an inherited default constructor
1572 like a normal default constructor.
1573
1574 PR c++/92594 - ICE with inherited trivial default ctor.
1575 * method.c (trivial_fn_p): Treat an inherited default constructor
1576 like a normal default constructor.
1577
1578 PR c++/92009 - ICE with punning of typeid.
1579 * rtti.c (get_tinfo_desc): Call xref_basetypes.
1580 * constexpr.c (cxx_fold_indirect_ref): Don't strip
1581 REINTERPRET_CAST_P.
1582
1583 2020-01-13 Jason Merrill <jason@redhat.com>
1584
1585 PR c++/92746 - ICE with noexcept of function concept check.
1586 * except.c (check_noexcept_r): Handle concept-check.
1587
1588 PR c++/92582 - ICE with member template as requirement.
1589 * pt.c (struct find_template_parameter_info): Add ctx_parms.
1590 (any_template_parm_r): Handle TEMPLATE_DECL.
1591 (find_template_parameters): Take parms instead of their depth.
1592 * constraint.cc (build_parameter_mapping): Pass them.
1593
1594 PR c++/33799 - destroy return value if local cleanup throws.
1595 * cp-tree.h (current_retval_sentinel): New macro.
1596 * decl.c (start_preparsed_function): Set up cleanup for retval.
1597 * typeck.c (check_return_expr): Set current_retval_sentinel.
1598
1599 PR c++/93238 - short right-shift with enum.
1600 * typeck.c (cp_build_binary_op): Use folded op1 for short_shift.
1601
1602 2020-01-10 Jason Merrill <jason@redhat.com>
1603
1604 * typeck.c (cp_build_binary_op): Restore short_shift code.
1605
1606 PR c++/93143 - incorrect tree sharing with constexpr.
1607 * constexpr.c (cxx_eval_outermost_constant_expr): Don't assume
1608 CONSTRUCTORs are already unshared.
1609
1610 PR c++/93173 - incorrect tree sharing.
1611 PR c++/93033
1612 * cp-gimplify.c (cp_gimplify_init_expr, cp_gimplify_expr): Use
1613 copy_if_shared after cp_genericize_tree.
1614 * typeck2.c (split_nonconstant_init): Don't unshare here.
1615
1616 2020-01-08 Jason Merrill <jason@redhat.com>
1617
1618 * cp-gimplify.c (cp_gimplify_expr) [TARGET_EXPR]: Check
1619 TARGET_EXPR_DIRECT_INIT_P.
1620 * constexpr.c (cxx_eval_constant_expression): Likewise.
1621
1622 2020-01-08 Jason Merrill <jason@redhat.com>
1623
1624 PR c++/91369 - constexpr destructor and member initializer.
1625 * constexpr.c (cxx_eval_store_expression): Look through TARGET_EXPR
1626 when not preevaluating.
1627
1628 2020-01-08 Jason Merrill <jason@redhat.com>
1629
1630 * constexpr.c (cxx_eval_call_expression): Remove DECL_BY_REFERENCE
1631 support.
1632
1633 2020-01-07 Paolo Carlini <paolo.carlini@oracle.com>
1634
1635 * init.c (build_new): Add location_t parameter and use it throughout.
1636 (build_raw_new_expr): Likewise.
1637 * parser.c (cp_parser_new_expression): Pass the combined_loc.
1638 * pt.c (tsubst_copy_and_build): Adjust call.
1639 * cp-tree.h: Update declarations.
1640
1641 2020-01-07 Jason Merrill <jason@redhat.com>
1642
1643 PR c++/47877 - -fvisibility-inlines-hidden and member templates.
1644 * decl2.c (determine_visibility): -fvisibility-inlines-hidden beats
1645 explicit class visibility for a template.
1646
1647 2020-01-07 Richard Sandiford <richard.sandiford@arm.com>
1648
1649 * mangle.c (mangle_type_attribute_p): New function, split out from...
1650 (write_CV_qualifiers_for_type): ...here. Don't mangle attributes
1651 that contain a space.
1652
1653 2020-01-07 Jakub Jelinek <jakub@redhat.com>
1654
1655 PR c++/91369
1656 * constexpr.c (struct constexpr_global_ctx): Add heap_alloc_count
1657 member, initialize it to zero in ctor.
1658 (cxx_eval_call_expression): Bump heap_dealloc_count when deleting
1659 a heap object. Don't cache calls to functions which allocate some
1660 heap objects and don't deallocate them or deallocate some heap
1661 objects they didn't allocate.
1662
1663 2020-01-06 Jason Merrill <jason@redhat.com>
1664
1665 PR c++/92552 - ICE with inherited constrained default ctor.
1666 * pt.c (instantiate_class_template_1): Copy
1667 TYPE_HAS_USER_CONSTRUCTOR.
1668 * class.c (one_inherited_ctor): Don't set it here.
1669
1670 2020-01-06 Andrew Sutton <asutton@lock3software.com>
1671
1672 PR c++/92739 - parsing requires clause with attributes.
1673 * parser.c (cp_parser_constraint_requires_parens): Exclude
1674 attributes as postfix expressions.
1675
1676 2020-01-05 Jakub Jelinek <jakub@redhat.com>
1677
1678 PR c++/93138
1679 * parser.c (cp_parser_check_class_key): Disable access checks for the
1680 simple name lookup.
1681 (cp_parser_maybe_warn_enum_key): Likewise. Return early if
1682 !warn_redundant_tags.
1683
1684 2010-01-05 Jakub Jelinek <jakub@redhat.com>
1685
1686 PR c++/93046
1687 * cp-gimplify.c (cp_gimplify_init_expr): Don't look through
1688 TARGET_EXPR if it has been gimplified already.
1689
1690 2020-01-03 Jason Merrill <jason@redhat.com>
1691
1692 PR c++/93033 - incorrect tree node sharing with array init.
1693 * typeck2.c (split_nonconstant_init): Unshare non-decl.
1694 * cp-gimplify.c (cp_gimplify_init_expr): Only split if -fexceptions.
1695
1696 2020-01-02 Jason Merrill <jason@redhat.com>
1697
1698 * pt.c (invalid_nontype_parm_type_p): Reject class placeholder in
1699 C++17.
1700
1701 2020-01-02 Jakub Jelinek <jakub@redhat.com>
1702
1703 PR c/90677
1704 * cp-objcp-common.c (identifier_global_tag): Return NULL_TREE if name
1705 has not been found, rather than error_mark_node.
1706
1707 2020-01-01 Jakub Jelinek <jakub@redhat.com>
1708
1709 Update copyright years.
1710 \f
1711 Copyright (C) 2020 Free Software Foundation, Inc.
1712
1713 Copying and distribution of this file, with or without modification,
1714 are permitted in any medium without royalty provided the copyright
1715 notice and this notice are preserved.