]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/cp/ChangeLog
Daily bump.
[thirdparty/gcc.git] / gcc / cp / ChangeLog
1 2021-10-04 Marek Polacek <polacek@redhat.com>
2
3 PR c++/97573
4 * typeck.c (cp_build_binary_op): Call do_warn_array_compare.
5
6 2021-10-03 Iain Sandoe <iain@sandoe.co.uk>
7
8 PR c++/101765
9 * coroutines.cc (register_local_var_uses): Emit a sorry if
10 we encounter a VLA in the coroutine local variables.
11
12 2021-10-03 Iain Sandoe <iain@sandoe.co.uk>
13
14 PR c++/99710
15 * coroutines.cc (await_statement_walker): Report an error if
16 an await expression is found in a handler body.
17
18 2021-10-03 John Eivind Helset <jehelset@gmail.com>
19
20 PR c++/100673
21 * coroutines.cc (build_co_await): Guard against NULL
22 await_suspend types.
23
24 2021-10-03 Iain Sandoe <iain@sandoe.co.uk>
25
26 PR c++/101133
27 * coroutines.cc (build_co_await): Mark co_await_expr trees
28 with TREE_SIDE_EFFECTS, also mark any containing expression.
29 (finish_co_await_expr): Mark type-dependent co_await_expr
30 trees with TREE_SIDE_EFFECTS.
31
32 2021-10-03 Iain Sandoe <iain@sandoe.co.uk>
33
34 PR c++/99575
35 * coroutines.cc (build_co_await): Strip NOPs from
36 candidate awaiter expressions before testing to see
37 if they need a temporary.
38
39 2021-10-01 Martin Sebor <msebor@redhat.com>
40
41 PR c/102103
42 * typeck.c (warn_for_null_address): Enhance.
43 (cp_build_binary_op): Call it also for member pointers.
44
45 2021-10-01 qingzhe huang <nickhuang99@hotmail.com>
46
47 PR c++/101783
48 * tree.c (cp_build_qualified_type_real): Exclude typedef from
49 error.
50
51 2021-10-01 Jakub Jelinek <jakub@redhat.com>
52 Richard Biener <rguenther@suse.de>
53
54 PR sanitizer/102515
55 * typeck.c (cp_build_binary_op): Call ubsan_instrument_division
56 for division even for SANITIZE_SI_OVERFLOW.
57
58 2021-10-01 Jakub Jelinek <jakub@redhat.com>
59
60 * parser.c (cp_parser_omp_clause_order): Set
61 OMP_CLAUSE_ORDER_REPRODUCIBLE for explicit reproducible: modifier.
62
63 2021-10-01 Jakub Jelinek <jakub@redhat.com>
64
65 PR c++/102496
66 * name-lookup.c (push_local_extern_decl_alias): Return early even for
67 tls vars with non-dependent type when processing_template_decl. For
68 CP_DECL_THREAD_LOCAL_P vars call set_decl_tls_model on alias.
69
70 2021-09-30 Patrick Palka <ppalka@redhat.com>
71
72 PR c++/102535
73 * method.c (is_xible_helper): Don't exit early for multi-arg
74 ctors in C++20.
75
76 2021-09-30 Patrick Palka <ppalka@redhat.com>
77
78 * parser.c (cp_parser_trait_expr): Call nreverse on the reversed
79 list of trailing arguments.
80
81 2021-09-30 Patrick Palka <ppalka@redhat.com>
82
83 PR c++/95567
84 * method.c (build_comparison_op): Skip DECL_VIRTUAL_P fields.
85
86 2021-09-28 Patrick Palka <ppalka@redhat.com>
87
88 PR c++/99909
89 * pt.c (coerce_template_template_parms): Keep
90 processing_template_decl set around the call to unify as well.
91
92 2021-09-28 Iain Sandoe <iain@sandoe.co.uk>
93
94 PR c++/102454
95 * coroutines.cc (analyze_fn_parms): Clean up synthetic names for
96 unnamed function params.
97 (morph_fn_to_coro): Do not try to set a guard variable for param
98 DTORs in the ramp, unless we have exceptions active.
99
100 2021-09-27 Patrick Palka <ppalka@redhat.com>
101
102 PR c++/102479
103 * pt.c (rewrite_template_parm): Handle single-level tsubst_args.
104 Avoid a tree cycle when assigning the DECL_TEMPLATE_PARMS for a
105 rewritten ttp.
106 (alias_ctad_tweaks): Set current_template_parms accordingly.
107
108 2021-09-23 Michel Morin <mimomorin@gmail.com>
109
110 * parser.c (cp_keyword_starts_decl_specifier_p): Do not
111 handle RID_ATTRIBUTE.
112 (cp_parser_constructor_declarator_p): Remove now-redundant
113 checks.
114 (cp_parser_lambda_declarator_opt): Likewise.
115
116 2021-09-23 Michel Morin <mimomorin@gmail.com>
117
118 PR c++/77565
119 * parser.c (cp_keyword_starts_decl_specifier_p): Handle more
120 decl-specifiers (typedef/inline/cv/explicit/virtual/friend).
121
122 2021-09-23 Patrick Palka <ppalka@redhat.com>
123
124 * ptree.c (cxx_print_decl): Dump the DECL_TEMPLATE_RESULT of
125 a TEMPLATE_DECL. Dump the DECL_TEMPLATE_INFO rather than just
126 printing its pointer value.
127
128 2021-09-23 Jakub Jelinek <jakub@redhat.com>
129
130 PR c++/102413
131 * parser.c (cp_parser_omp_directive_args): Diagnose if omp::directive
132 is not followed by a balanced token sequence starting with open paren.
133
134 2021-09-22 Patrick Palka <ppalka@redhat.com>
135
136 DR 2446
137 PR c++/102412
138 * constexpr.c (cxx_eval_constant_expression)
139 <case TEMPLATE_ID_EXPR>: Check value_dependent_expression_p
140 instead of processing_template_decl.
141 * pt.c (value_dependent_expression_p) <case TEMPLATE_ID_EXPR>:
142 Return true only if any_dependent_template_arguments_p.
143 (instantiation_dependent_r) <case CALL_EXPR>: Remove this case.
144 <case TEMPLATE_ID_EXPR>: Likewise.
145
146 2021-09-22 Jakub Jelinek <jakub@redhat.com>
147
148 * parser.c (cp_parser_omp_clause_allocate): Parse allocate clause
149 modifiers.
150 * semantics.c (finish_omp_clauses) <OMP_CLAUSE_ALLOCATE>: Perform
151 semantic analysis of OMP_CLAUSE_ALLOCATE_ALIGN.
152 * pt.c (tsubst_omp_clauses) <case OMP_CLAUSE_ALLOCATE>: Handle
153 also OMP_CLAUSE_ALLOCATE_ALIGN.
154
155 2021-09-22 Barrett Adair <barrettellisadair@gmail.com>
156
157 * pt.c (find_parm_usage_r): New walk_tree callback to find func
158 parms.
159 (any_template_arguments_need_structural_equality_p): New special
160 case.
161
162 2021-09-21 wangpc <pc.wang@linux.alibaba.com>
163
164 * decl.c (start_decl_1): Move verify_type_context to ...
165 (cp_finish_decl): ... to here.
166
167 2021-09-18 Jakub Jelinek <jakub@redhat.com>
168
169 * parser.c (cp_parser_omp_clause_order): Parse unconstrained
170 and reproducible modifiers.
171 (OMP_DISTRIBUTE_CLAUSE_MASK): Add order clause.
172
173 2021-09-18 Jakub Jelinek <jakub@redhat.com>
174
175 * parser.c (cp_parser_omp_clause_default): Handle private and
176 firstprivate arguments, adjust diagnostics on unknown argument.
177 * cp-gimplify.c (cxx_omp_finish_clause): Handle OMP_CLAUSE_PRIVATE.
178
179 2021-09-18 Jason Merrill <jason@redhat.com>
180
181 * cp-tree.h (dependentish_scope_p): Declare.
182 * pt.c (dependentish_scope_p): New.
183 * parser.c (cp_parser_lookup_name): Return a TYPENAME_TYPE
184 for lookup of a type in a dependent object.
185 (cp_parser_template_id): Handle TYPENAME_TYPE.
186 (cp_parser_template_name): If we're looking for a type,
187 a name followed by < names a template.
188
189 2021-09-18 Jason Merrill <jason@redhat.com>
190
191 * cp-tree.h: Fix typo in LANG_FLAG list.
192
193 2021-09-17 Jakub Jelinek <jakub@redhat.com>
194
195 * cp-tree.h (finish_omp_atomic): Add r and weak arguments.
196 * parser.c (cp_parser_omp_atomic): Update function comment for
197 OpenMP 5.1 atomics, parse OpenMP 5.1 atomics and fail, compare and
198 weak clauses.
199 * semantics.c (finish_omp_atomic): Add r and weak arguments, handle
200 them, handle COND_EXPRs.
201 * pt.c (tsubst_expr): Adjust for COND_EXPR forms that
202 finish_omp_atomic can now produce.
203
204 2021-09-16 Patrick Palka <ppalka@redhat.com>
205
206 PR c++/98486
207 * constraint.cc (get_normalized_constraints_from_decl): Always
208 look up constraints using the most general template.
209 * decl.c (grokdeclarator): Set constraints on a static data
210 member template.
211 * pt.c (determine_specialization): Check constraints on a
212 variable template.
213
214 2021-09-16 Iain Sandoe <iain@sandoe.co.uk>
215
216 * coroutines.cc (await_statement_walker): Code cleanups.
217
218 2021-09-16 Jason Merrill <jason@redhat.com>
219
220 * constexpr.c (cxx_eval_outermost_constant_expr): Use
221 protected_set_expr_location.
222
223 2021-09-15 Patrick Palka <ppalka@redhat.com>
224
225 PR c++/101904
226 * call.c (build_user_type_conversion_1): Add tf_conv to complain.
227 (add_candidates): When in a SFINAE context, instead of adding a
228 candidate to bad_fns just mark it unviable.
229
230 2021-09-15 Jason Merrill <jason@redhat.com>
231
232 * cp-tree.h (parsing_function_declarator): Declare.
233 * name-lookup.c (set_decl_context_in_fn): Use it.
234 * parser.c (cp_parser_direct_declarator): Use it.
235 (parsing_function_declarator): New.
236
237 2021-09-15 Jakub Jelinek <jakub@redhat.com>
238
239 PR c++/88578
240 PR c++/102295
241 * typeck2.c (split_nonconstant_init_1): Don't throw away empty
242 initializers of flexible array members if they have non-zero type
243 size.
244
245 2021-09-15 Patrick Palka <ppalka@redhat.com>
246
247 PR c++/102050
248 * decl.c (grok_special_member_properties): Set
249 TYPE_HAS_COPY_CTOR, TYPE_HAS_DEFAULT_CONSTRUCTOR
250 and TYPE_HAS_LIST_CTOR independently from each other.
251
252 2021-09-15 Jason Merrill <jason@redhat.com>
253
254 * decl.c (cxx_init_decl_processing): Only warn about odd
255 interference sizes if they were specified with --param.
256
257 2021-09-15 Jason Merrill <jason@redhat.com>
258
259 PR c++/48396
260 * cp-tree.h (enum cp_tree_index): Remove CPTI_TYPE_INFO_PTR_TYPE.
261 (type_info_ptr_type): Remove.
262 * rtti.c (init_rtti_processing): Don't predeclare std::type_info.
263 (typeid_ok_p): Check for null const_type_info_type_node.
264 (type_info_ptr_type, get_void_tinfo_ptr): New fns.
265 (get_tinfo_decl_dynamic, get_tinfo_ptr): Use them.
266 (ptr_initializer, ptm_initializer, get_pseudo_ti_init): Use them.
267 (get_tinfo_desc): Use const_ptr_type_node.
268
269 2021-09-15 Jason Merrill <jason@redhat.com>
270
271 * parser.c (cp_parser_template_name): Move object type.
272 (cp_parser_pre_parsed_nested_name_specifier): Likewise.
273
274 2021-09-15 Jason Merrill <jason@redhat.com>
275
276 * parser.c (cp_parser_unqualified_id): Only complain about ~A<T> in
277 a declarator.
278
279 2021-09-14 Iain Sandoe <iain@sandoe.co.uk>
280
281 * coroutines.cc (struct param_info): Add copy_var.
282 (build_actor_fn): Use simplified param references.
283 (register_param_uses): Likewise.
284 (rewrite_param_uses): Likewise.
285 (analyze_fn_parms): New function.
286 (coro_rewrite_function_body): Add proxies for the fn
287 parameters to the outer bind scope of the rewritten code.
288 (morph_fn_to_coro): Use simplified version of param ref.
289
290 2021-09-14 Iain Sandoe <iain@sandoe.co.uk>
291
292 * coroutines.cc (coro_resume_fn_id, coro_destroy_fn_id,
293 coro_promise_id, coro_frame_needs_free_id, coro_resume_index_id,
294 coro_self_handle_id, coro_actor_continue_id,
295 coro_frame_i_a_r_c_id): New.
296 (coro_init_identifiers): Initialize new name identifiers.
297 (coro_promise_type_found_p): Use pre-built identifiers.
298 (struct await_xform_data): Remove unused fields.
299 (transform_await_expr): Delete code that is now unused.
300 (build_actor_fn): Simplify interface, use pre-built identifiers and
301 remove transforms that are no longer needed.
302 (build_destroy_fn): Use revised field names.
303 (register_local_var_uses): Use pre-built identifiers.
304 (coro_rewrite_function_body): Simplify interface, use pre-built
305 identifiers. Generate proxy vars in the outer bind expr scope for the
306 implementation state that we wish to expose.
307 (morph_fn_to_coro): Adjust comments for new variable names, use pre-
308 built identifiers. Remove unused code to generate frame entries for
309 the implementation state. Adjust call for build_actor_fn.
310
311 2021-09-14 Patrick Palka <ppalka@redhat.com>
312
313 PR c++/102163
314 * constexpr.c (cxx_eval_call_expression): After evaluating a
315 subobject constructor call for an empty union member, produce a
316 side effect that makes sure the member gets activated.
317
318 2021-09-14 Jakub Jelinek <jakub@redhat.com>
319
320 PR c++/102295
321 * decl.c (layout_var_decl): For aggregates ending with a flexible
322 array member, add the size of the initializer for that member to
323 DECL_SIZE and DECL_SIZE_UNIT.
324
325 2021-09-14 Jakub Jelinek <jakub@redhat.com>
326
327 PR c++/102305
328 * method.c (is_xible_helper): Call complete_type on to.
329
330 2021-09-14 Jason Merrill <jason@redhat.com>
331
332 * decl.c (cxx_init_decl_processing): Don't warn if L1 cache line
333 size is smaller than maxalign.
334
335 2021-09-13 Jason Merrill <jason@redhat.com>
336
337 * constexpr.c (maybe_warn_about_constant_value):
338 Complain about std::hardware_destructive_interference_size.
339 (cxx_eval_constant_expression): Call it.
340 * decl.c (cxx_init_decl_processing): Check
341 --param *-interference-size values.
342
343 2021-09-13 Patrick Palka <ppalka@redhat.com>
344
345 PR c++/101764
346 * cp-tree.h (PACK_EXPANSION_FORCE_EXTRA_ARGS_P): New accessor
347 macro.
348 * pt.c (has_extra_args_mechanism_p): New function.
349 (find_parameter_pack_data::found_extra_args_tree_p): New data
350 member.
351 (find_parameter_packs_r): Set ppd->found_extra_args_tree_p
352 appropriately.
353 (make_pack_expansion): Set PACK_EXPANSION_FORCE_EXTRA_ARGS_P if
354 ppd.found_extra_args_tree_p.
355 (use_pack_expansion_extra_args_p): Return true if there were
356 unsubstituted packs and PACK_EXPANSION_FORCE_EXTRA_ARGS_P.
357 (tsubst_pack_expansion): Pass the pack expansion to
358 use_pack_expansion_extra_args_p.
359
360 2021-09-10 Jakub Jelinek <jakub@redhat.com>
361
362 * parser.c (cp_parser_omp_atomic): Allow acq_rel on atomic read/write
363 and acq_rel/acquire clauses on update.
364 * semantics.c (finish_omp_atomic): Adjust c_finish_omp_atomic caller.
365
366 2021-09-08 Richard Biener <rguenther@suse.de>
367
368 PR c++/102228
369 * cp-tree.h (ANON_AGGR_TYPE_FIELD): New define.
370 * decl.c (fixup_anonymous_aggr): Wipe RTTI info put in
371 place on invalid code.
372 * decl2.c (reset_type_linkage): Guard CLASSTYPE_TYPEINFO_VAR
373 access.
374 * module.cc (trees_in::read_class_def): Likewise. Reconstruct
375 ANON_AGGR_TYPE_FIELD.
376 * semantics.c (finish_member_declaration): Populate
377 ANON_AGGR_TYPE_FIELD for anon aggregate typed members.
378 * typeck.c (lookup_anon_field): Remove DFS search and return
379 ANON_AGGR_TYPE_FIELD directly.
380
381 2021-09-07 Jakub Jelinek <jakub@redhat.com>
382
383 PR c++/100495
384 * constexpr.c (maybe_save_constexpr_fundef): Save body even for
385 constexpr deleting dtors.
386 (cxx_eval_call_expression): Don't use DECL_CLONED_FUNCTION for
387 deleting dtors.
388
389 2021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
390
391 * parser.c (cp_parser_omp_flush): Parse 'seq_cst' clause on 'flush'
392 directive.
393 * semantics.c (finish_omp_flush): Handle MEMMODEL_SEQ_CST.
394
395 2021-09-03 Iain Sandoe <iain@sandoe.co.uk>
396
397 * coroutines.cc (register_local_var_uses): Do not mangle
398 frame entries for the outermost scope. Record the outer
399 scope as nesting depth 0.
400
401 2021-09-03 Iain Sandoe <iain@sandoe.co.uk>
402
403 * coroutines.cc (coro_build_artificial_var): New.
404 (build_actor_fn): Use var builder, rename vars to use
405 implementation namespace.
406 (coro_rewrite_function_body): Likewise.
407 (morph_fn_to_coro): Likewise.
408
409 2021-09-03 Iain Sandoe <iain@sandoe.co.uk>
410
411 * coroutines.cc (transform_local_var_uses): Record
412 frame offset expressions as DECL_VALUE_EXPRs instead of
413 rewriting them.
414
415 2021-09-03 Patrick Palka <ppalka@redhat.com>
416
417 PR c++/101904
418 * call.c (build_this_conversion): New function, split out from
419 add_function_candidate.
420 (add_function_candidate): New parameter shortcut_bad_convs.
421 Document it. Use build_this_conversion. Stop at the first bad
422 argument conversion when shortcut_bad_convs is true.
423 (add_template_candidate_real): New parameter shortcut_bad_convs.
424 Use build_this_conversion to check the 'this' conversion before
425 attempting deduction. When the rejection reason code is
426 rr_bad_arg_conversion, pass -1 instead of 0 as the viable
427 parameter to add_candidate. Pass 'convs' to add_candidate.
428 (add_template_candidate): New parameter shortcut_bad_convs.
429 (add_template_conv_candidate): Pass false as shortcut_bad_convs
430 to add_template_candidate_real.
431 (add_candidates): Prefer to shortcut bad conversions during
432 overload resolution under the assumption that we'll eventually
433 see a strictly viable candidate. If this assumption turns out
434 to be false, re-process the non-strictly viable candidates
435 without shortcutting those bad conversions.
436
437 2021-09-03 Jason Merrill <jason@redhat.com>
438
439 * pt.c (limit_bad_template_recursion): Suppress -Wunused for decls
440 we decide not to instantiate.
441
442 2021-09-03 Jakub Jelinek <jakub@redhat.com>
443
444 PR target/102024
445 * class.c (build_base_field): Use SET_DECL_FIELD_ABI_IGNORED
446 instead of writing to DECL_FIELD_ABI_IGNORED.
447 (layout_class_type): Likewise. In the place where zero-width
448 bitfields used to be removed, use
449 SET_DECL_FIELD_CXX_ZERO_WIDTH_BIT_FIELD on those fields instead.
450
451 2021-09-01 Iain Sandoe <iain@sandoe.co.uk>
452
453 * call.c (build_over_call): Handle unavailable state in addition to
454 deprecation.
455 * class.c (type_build_ctor_call): Likewise.
456 (type_build_dtor_call): Likewise.
457 * cp-tree.h: Rename cp_warn_deprecated_use to
458 cp_handle_deprecated_or_unavailable.
459 * decl.c (duplicate_decls): Merge unavailability.
460 (grokdeclarator): Handle unavailability in addition to deprecation.
461 (type_is_unavailable): New.
462 (grokparms): Handle unavailability in addition to deprecation.
463 * decl.h (enum deprecated_states): Add
464 UNAVAILABLE_DEPRECATED_SUPPRESS.
465 * decl2.c (cplus_decl_attributes): Propagate unavailability to
466 templates.
467 (cp_warn_deprecated_use): Rename to ...
468 (cp_handle_deprecated_or_unavailable): ... this and amend to handle
469 the unavailable case. It remains a warning in the case of deprecation
470 but becomes an error in the case of unavailability.
471 (cp_warn_deprecated_use_scopes): Handle unavailability.
472 (mark_used): Likewise.
473 * parser.c (cp_parser_template_name): Likewise.
474 (cp_parser_template_argument): Likewise.
475 (cp_parser_parameter_declaration_list): Likewise.
476 * typeck.c (build_class_member_access_expr): Likewise.
477 (finish_class_member_access_expr): Likewise.
478 * typeck2.c (build_functional_cast_1): Likewise.
479
480 2021-09-01 Iain Sandoe <iain@sandoe.co.uk>
481
482 * coroutines.cc (build_actor_fn): Add begin/finish clauses
483 to the initial test in the actor function.
484
485 2021-09-01 Iain Sandoe <iain@sandoe.co.uk>
486
487 * coroutines.cc (await_statement_walker): Use build_stmt and
488 add_stmt instead of build1 and finish_expr_stmt.
489
490 2021-08-31 Jason Merrill <jason@redhat.com>
491
492 * coroutines.cc (flatten_await_stmt): Fix copyo.
493 * decl.c (reshape_init_class): Simplify.
494 * module.cc (module_state::read_language): Add null check.
495 * parser.c (build_range_temp): Avoid type_uses_auto.
496 (cp_parser_class_specifier_1): Add null check.
497
498 2021-08-31 Patrick Palka <ppalka@redhat.com>
499
500 PR c++/12672
501 * call.c (rejection_reason::call_varargs_p): Rename this
502 previously unused member to ...
503 (rejection_reason::least_p): ... this.
504 (arity_rejection): Add least_p parameter.
505 (add_template_candidate_real): When there are explicit
506 template arguments, check that the arity of the call agrees with
507 the arity of the function before attempting deduction.
508 (print_arity_information): Add least_p parameter.
509 (print_z_candidate): Adjust call to print_arity_information.
510
511 2021-08-31 Martin Sebor <msebor@redhat.com>
512
513 * parser.c (cp_parser_selection_statement): Use direct initialization
514 instead of copy.
515
516 2021-08-31 Jason Merrill <jason@redhat.com>
517
518 * constexpr.c (explain_invalid_constexpr_fn): Use iloc_sentinel.
519
520 2021-08-31 Jason Merrill <jason@redhat.com>
521
522 PR c++/92193
523 * cp-tree.h (FNDECL_MANIFESTLY_CONST_EVALUATED): New.
524 * constexpr.c (cxx_eval_call_expression): Set it.
525 * pt.c (neglectable_inst_p): Check it.
526
527 2021-08-31 Marcel Vollweiler <marcel@codesourcery.com>
528
529 * parser.c (cp_parser_omp_clause_device): Parse device-modifiers 'device_num'
530 and 'ancestor' in 'target device' clauses.
531 * semantics.c (finish_omp_clauses): Error handling. Constant device ids must
532 evaluate to '1' if 'ancestor' is used.
533
534 2021-08-30 Jason Merrill <jason@redhat.com>
535
536 PR c++/96286
537 * cp-tree.h (struct lang_type): Add erroneous bit-field.
538 (CLASSTYPE_ERRONEOUS): New.
539 * pt.c (limit_bad_template_recursion): Check it.
540 (instantiate_class_template_1): Set it.
541
542 2021-08-30 Jason Merrill <jason@redhat.com>
543
544 * constexpr.c (cxx_eval_outermost_constant_expr): Copy
545 expr location to result.
546
547 2021-08-30 Jason Merrill <jason@redhat.com>
548
549 PR c++/101460
550 * cp-tree.h (cxx_constant_value_sfinae): Declare.
551 * constexpr.c (cxx_constant_value_sfinae): New.
552 * pt.c (fold_targs_r, maybe_fold_fn_template_args): New.
553 (tsubst_copy_and_build) [CALL_EXPR]: Call
554 maybe_fold_fn_template_args.
555
556 2021-08-30 Jason Merrill <jason@redhat.com>
557
558 * parser.c (cp_parser_simple_requirement): Warn about missing
559 requires.
560
561 2021-08-27 Jason Merrill <jason@redhat.com>
562
563 * typeck2.c (build_x_arrow): Do set TREE_TYPE when operand is
564 a dependent pointer.
565
566 2021-08-25 Andrew Pinski <apinski@marvell.com>
567
568 PR c++/66590
569 * cp-objcp-common.c (cxx_block_may_fallthru): Handle
570 CLEANUP_STMT for the case which will be try/finally.
571
572 2021-08-25 Jakub Jelinek <jakub@redhat.com>
573
574 PR c++/102019
575 * init.c (build_value_init_noctor): Ignore unnamed zero-width
576 bitfields.
577
578 2021-08-23 Jakub Jelinek <jakub@redhat.com>
579
580 * parser.c (cp_parser_omp_clause_num_tasks,
581 cp_parser_omp_clause_grainsize): Parse the optional strict: modifier.
582
583 2021-08-20 Jakub Jelinek <jakub@redhat.com>
584
585 * parser.c (cp_parser_handle_statement_omp_attributes): Determine if
586 PRAGMA_OMP_ERROR directive is C_OMP_DIR_STANDALONE.
587 (cp_parser_omp_error): New function.
588 (cp_parser_pragma): Handle PRAGMA_OMP_ERROR.
589
590 2021-08-20 Jakub Jelinek <jakub@redhat.com>
591
592 * parser.c (cp_parser_omp_clause_depend_sink): Reject spurious
593 comma at the end of list. Don't parse closing paren here...
594 (cp_parser_omp_clause_depend): ... but here instead.
595
596 2021-08-19 Patrick Palka <ppalka@redhat.com>
597
598 PR c++/101803
599 * cp-tree.h (CONSTRUCTOR_IS_PAREN_INIT): Clarify comment.
600
601 2021-08-19 Jakub Jelinek <jakub@redhat.com>
602
603 * parser.c (cp_parser_omp_requires): Don't call cp_lexer_nth_token_is
604 and optionally consume token if current token is CPP_EOF,
605 CPP_PRAGMA_EOL or CPP_CLOSE_PAREN.
606
607 2021-08-19 Jakub Jelinek <jakub@redhat.com>
608
609 * parser.c (cp_parser_omp_nothing): Use cp_parser_require_pragma_eol
610 instead of cp_parser_skip_to_pragma_eol.
611
612 2021-08-18 Patrick Palka <ppalka@redhat.com>
613
614 PR c++/101344
615 PR c++/101803
616 * cp-tree.h (CONSTRUCTOR_BRACES_ELIDED_P): Define.
617 * decl.c (reshape_init_r): Set it.
618 * pt.c (collect_ctor_idx_types): Recurse into a sub-CONSTRUCTOR
619 iff CONSTRUCTOR_BRACES_ELIDED_P.
620
621 2021-08-18 Patrick Palka <ppalka@redhat.com>
622
623 PR c++/101883
624 * pt.c (convert_template_argument): Pass LOOKUP_IMPLICIT to
625 do_auto_deduction.
626
627 2021-08-18 Jakub Jelinek <jakub@redhat.com>
628
629 * parser.c (cp_parser_omp_nothing): New function.
630 (cp_parser_pragma): Handle PRAGMA_OMP_NOTHING.
631
632 2021-08-18 Jakub Jelinek <jakub@redhat.com>
633
634 * parser.c (cp_parser_omp_ordered): Return true instead of
635 false after emitting errors that the directive is not allowed in
636 pragma_stmt context.
637 (cp_parser_omp_target_update): Likewise.
638 (cp_parser_omp_cancellation_point): Change return type from void to
639 bool, return false if the directive should be ignored in pragma_stmt
640 contexts.
641 (cp_parser_omp_target_enter_data, cp_parser_omp_target_exit_data):
642 Change return type from tree to bool, return false if the
643 directive should be ignored in pragma_stmt contexts.
644 (cp_parser_omp_target): Adjust callers of cp_parser_omp_target_*_data,
645 return their result directly.
646 (cp_parser_pragma): For PRAGMA_OMP_CANCELLATION_POINT return what
647 cp_parser_omp_cancellation_point returned. Return true instead of
648 false after emitting errors that the directive is not allowed in
649 pragma_stmt context.
650
651 2021-08-17 Jakub Jelinek <jakub@redhat.com>
652
653 PR c++/101539
654 * cp-tree.h (enum cp_trait_kind): Add CPTK_IS_LAYOUT_COMPATIBLE.
655 (enum cp_built_in_function): Add CP_BUILT_IN_IS_CORRESPONDING_MEMBER.
656 (fold_builtin_is_corresponding_member, next_common_initial_seqence,
657 layout_compatible_type_p): Declare.
658 * parser.c (cp_parser_primary_expression): Handle
659 RID_IS_LAYOUT_COMPATIBLE.
660 (cp_parser_trait_expr): Likewise.
661 * cp-objcp-common.c (names_builtin_p): Likewise.
662 * constraint.cc (diagnose_trait_expr): Handle
663 CPTK_IS_LAYOUT_COMPATIBLE.
664 * decl.c (cxx_init_decl_processing): Register
665 __builtin_is_corresponding_member builtin.
666 * constexpr.c (cxx_eval_builtin_function_call): Handle
667 CP_BUILT_IN_IS_CORRESPONDING_MEMBER builtin.
668 * semantics.c (is_corresponding_member_union,
669 is_corresponding_member_aggr, fold_builtin_is_corresponding_member):
670 New functions.
671 (trait_expr_value): Handle CPTK_IS_LAYOUT_COMPATIBLE.
672 (finish_trait_expr): Likewise.
673 * typeck.c (next_common_initial_seqence, layout_compatible_type_p):
674 New functions.
675 * cp-gimplify.c (cp_gimplify_expr): Fold
676 CP_BUILT_IN_IS_CORRESPONDING_MEMBER.
677 (cp_fold): Likewise.
678 * tree.c (builtin_valid_in_constant_expr_p): Handle
679 CP_BUILT_IN_IS_CORRESPONDING_MEMBER.
680 * cxx-pretty-print.c (pp_cxx_trait_expression): Handle
681 CPTK_IS_LAYOUT_COMPATIBLE.
682 * class.c (remove_zero_width_bit_fields): Remove.
683 (layout_class_type): Don't call it.
684
685 2021-08-17 Jakub Jelinek <jakub@redhat.com>
686
687 * parser.c (OMP_SCOPE_CLAUSE_MASK): Define.
688 (cp_parser_omp_scope): New function.
689 (cp_parser_omp_construct, cp_parser_pragma): Handle PRAGMA_OMP_SCOPE.
690 * pt.c (tsubst_expr): Handle OMP_SCOPE.
691
692 2021-08-12 Jakub Jelinek <jakub@redhat.com>
693
694 * parser.c (cp_parser_omp_clause_name): Parse filter clause name.
695 (cp_parser_omp_clause_filter): New function.
696 (cp_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_FILTER.
697 (OMP_MASKED_CLAUSE_MASK): Define.
698 (cp_parser_omp_masked): New function.
699 (cp_parser_omp_parallel): Handle parallel masked.
700 (cp_parser_omp_construct, cp_parser_pragma): Handle PRAGMA_OMP_MASKED.
701 * semantics.c (finish_omp_clauses): Handle OMP_CLAUSE_FILTER.
702 * pt.c (tsubst_omp_clauses): Likewise.
703 (tsubst_expr): Handle OMP_MASKED.
704
705 2021-08-12 Sergei Trofimovich <siarheit@google.com>
706
707 PR c++/101219
708 * pt.c (tsubst_copy_and_build): Use build_ptrmemfunc_access_expr
709 to construct ptrmemfunc expression instantiation.
710
711 2021-08-12 Tobias Burnus <tobias@codesourcery.com>
712
713 * parser.c (cp_parser_omp_clause_proc_bind): Accept
714 'primary' as alias for 'master'.
715
716 2021-08-12 Jakub Jelinek <jakub@redhat.com>
717
718 * cp-tree.h (omp_declare_target_attr): New type.
719 (struct saved_scope): Change type of omp_declare_target_attribute
720 from int to vec<omp_declare_target_attr, va_gc> * and move it.
721 * parser.c (cp_parser_omp_declare_target): Instead of
722 incrementing scope_chain->omp_declare_target_attribute, push
723 a struct containing parser->lexer->in_omp_attribute_pragma to
724 the vector.
725 (cp_parser_omp_end_declare_target): Instead of decrementing
726 scope_chain->omp_declare_target_attribute, pop a structure
727 from it. Diagnose mismatching declare target vs.
728 end declare target syntax.
729 * semantics.c (finish_translation_unit): Use vec_safe_length
730 and vec_safe_truncate on scope_chain->omp_declare_target_attributes.
731 * decl2.c (cplus_decl_attributes): Use vec_safe_length
732 on scope_chain->omp_declare_target_attributes.
733
734 2021-08-12 Jakub Jelinek <jakub@redhat.com>
735
736 * parser.c (cp_parser_lambda_body): Add temp overrides
737 for parser->{omp_declare_simd,oacc_routine,omp_attrs_forbidden_p}.
738 (cp_parser_statement): Restore parser->omp_attrs_forbidden_p for
739 cp_parser_declaration_statement.
740 (cp_parser_default_argument): Add temp override for
741 parser->omp_attrs_forbidden_p.
742 (cp_parser_late_parsing_omp_declare_simd): Diagnose declare simd
743 or declare variant in attribute syntax on a declaration immediately
744 following an OpenMP construct in pragma syntax.
745
746 2021-08-12 Jakub Jelinek <jakub@redhat.com>
747
748 PR c++/94162
749 * method.c (cat_tag_for): Return cc_last for !CLASS_TYPE_P
750 or for classes not in std namespace.
751
752 2021-08-12 Jakub Jelinek <jakub@redhat.com>
753
754 * name-lookup.c (finish_using_directive): Diagnose omp::directive
755 or omp::sequence attributes on using-directive.
756
757 2021-08-12 Jakub Jelinek <jakub@redhat.com>
758
759 * parser.c (cp_parser_block_declaration): Call
760 cp_parser_using_directive for C++11 attributes followed by
761 using namespace tokens.
762 (cp_parser_using_directive): Parse C++11 attributes at the start
763 of the directive rather than at the end, only parse GNU attributes
764 at the end.
765
766 2021-08-12 Patrick Palka <ppalka@redhat.com>
767
768 PR c++/101663
769 * constexpr.c (cxx_eval_store_expression): Handle the lval=true
770 case in the early exit code path for empty stores with mismatched
771 types.
772
773 2021-08-11 Patrick Palka <ppalka@redhat.com>
774
775 PR c++/101725
776 DR 2082
777 * cp-tree.h (unevaluated_p): Return true for REQUIRES_EXPR.
778 * decl.c (local_variable_p_walkfn): Don't walk into unevaluated
779 operands.
780 * parser.c (cp_parser_primary_expression) <case CPP_NAME>: Never
781 reject uses of local variables in unevaluated contexts.
782 * tree.c (cp_walk_subtrees) <case REQUIRES_EXPR>: Increment
783 cp_unevaluated_operand. Use cp_walk_tree directly instead of
784 WALK_SUBTREE to avoid the goto. Use REQUIRES_EXPR_REQS instead
785 of TREE_OPERAND directly.
786
787 2021-08-11 Jakub Jelinek <jakub@redhat.com>
788
789 PR c++/101786
790 * decl2.c (var_defined_without_dynamic_init): Return true for
791 DECL_DECLARED_CONSTINIT_P with complete type and trivial destructor.
792
793 2021-08-11 Patrick Palka <ppalka@redhat.com>
794
795 PR c++/79501
796 * parser.c (maybe_adjust_declarator_for_dguide): New, split
797 out from ...
798 (cp_parser_init_declarator): ... here.
799 (cp_parser_member_declaration): Use it.
800
801 2021-08-11 Patrick Palka <ppalka@redhat.com>
802
803 PR c++/89062
804 * parser.c (cp_parser_parameter_declaration_list): Don't call
805 grokdeclarator if cp_parser_error_occurred.
806 (cp_parser_parameter_declaration): Simulate an error if we see
807 the beginning of a CTAD form, i.e. if we see an opening brace
808 after the decl-specifier-seq and the type is a CTAD placeholder.
809
810 2021-08-10 Jakub Jelinek <jakub@redhat.com>
811
812 * parser.c (cp_parser_member_declaration): Move odsd declaration
813 before cp_parser_using_declaration call to avoid errors with
814 GCC 4.8 to 6.
815
816 2021-08-10 Jakub Jelinek <jakub@redhat.com>
817
818 * parser.h (struct cp_omp_declare_simd_data): Remove
819 in_omp_attribute_pragma and clauses members, add loc and attribs.
820 (struct cp_oacc_routine_data): Remove loc member, add clauses
821 member.
822 * parser.c (cp_finalize_omp_declare_simd): New function.
823 (cp_parser_handle_statement_omp_attributes): Mention in
824 function comment the function is used also for
825 attribute-declaration.
826 (cp_parser_handle_directive_omp_attributes): New function.
827 (cp_parser_statement): Don't call
828 cp_parser_handle_statement_omp_attributes if statement doesn't
829 have attribute-specifier-seq at the beginning at all or if
830 if those attributes don't appertain to the statement.
831 (cp_parser_simple_declaration): Call
832 cp_parser_handle_directive_omp_attributes and
833 cp_finalize_omp_declare_simd.
834 (cp_parser_explicit_instantiation): Likewise.
835 (cp_parser_init_declarator): Initialize prefix_attributes
836 only after parsing declarators.
837 (cp_parser_direct_declarator): Call
838 cp_parser_handle_directive_omp_attributes and
839 cp_finalize_omp_declare_simd.
840 (cp_parser_member_declaration): Likewise.
841 (cp_parser_single_declaration): Likewise.
842 (cp_parser_omp_declare_simd): Don't initialize
843 data.in_omp_attribute_pragma, instead initialize
844 data.attribs[0] and data.attribs[1].
845 (cp_finish_omp_declare_variant): Remove
846 in_omp_attribute_pragma argument, instead use
847 parser->lexer->in_omp_attribute_pragma.
848 (cp_parser_late_parsing_omp_declare_simd): Adjust
849 cp_finish_omp_declare_variant caller. Handle attribute-syntax
850 declare simd/variant.
851
852 2021-08-06 Tamar Christina <tamar.christina@arm.com>
853
854 * cp-objcp-common.h (cxx_simulate_enum_decl): Pass vec<> by pointer.
855 * decl.c (cxx_simulate_enum_decl): Likewise.
856
857 2021-08-04 Jakub Jelinek <jakub@redhat.com>
858
859 PR c++/101759
860 * parser.c (cp_parser_default_argument): Temporarily override
861 parser->omp_declare_simd and parser->oacc_routine to NULL.
862
863 2021-08-02 Patrick Palka <ppalka@redhat.com>
864
865 PR c++/100828
866 * logic.cc (formula::formula): Use emplace_back instead of
867 push_back.
868 (formula::branch): Insert a copy of m_current directly after
869 m_current instead of at the end of the list.
870 (formula::erase): Define.
871 (decompose_formula): Remove.
872 (decompose_antecedents): Remove.
873 (decompose_consequents): Remove.
874 (derive_proofs): Remove.
875 (max_problem_size): Remove.
876 (diagnose_constraint_size): Remove.
877 (subsumes_constraints_nonnull): Rewrite directly in terms of
878 decompose_clause and derive_proof, interleaving decomposition
879 with implication checking. Remove limit on constraint complexity.
880 Use formula::erase to free the current clause before moving on to
881 the next one.
882
883 2021-07-31 Jason Merrill <jason@redhat.com>
884
885 PR c++/96636
886 * decl.c (fixup_anonymous_aggr): Clear TYPE_NEEDS_CONSTRUCTING
887 after error.
888
889 2021-07-31 Jason Merrill <jason@redhat.com>
890
891 * ptree.c (cxx_print_type) [TYPE_PACK_EXPANSION]: Also print
892 PACK_EXPANSION_PATTERN.
893
894 2021-07-31 Jakub Jelinek <jakub@redhat.com>
895
896 * parser.c (cp_parser_declaration): Handle OpenMP directives
897 in attribute-declaration.
898
899 2021-07-30 Jakub Jelinek <jakub@redhat.com>
900
901 PR c++/101539
902 * cp-tree.h (enum cp_trait_kind): Add
903 CPTK_IS_POINTER_INTERCONVERTIBLE_BASE_OF.
904 (enum cp_built_in_function): Add
905 CP_BUILT_IN_IS_POINTER_INTERCONVERTIBLE_WITH_CLASS.
906 (fold_builtin_is_pointer_inverconvertible_with_class): Declare.
907 * parser.c (cp_parser_primary_expression): Handle
908 RID_IS_POINTER_INTERCONVERTIBLE_BASE_OF.
909 (cp_parser_trait_expr): Likewise.
910 * cp-objcp-common.c (names_builtin_p): Likewise.
911 * constraint.cc (diagnose_trait_expr): Handle
912 CPTK_IS_POINTER_INTERCONVERTIBLE_BASE_OF.
913 * decl.c (cxx_init_decl_processing): Register
914 __builtin_is_pointer_interconvertible_with_class builtin.
915 * constexpr.c (cxx_eval_builtin_function_call): Handle
916 CP_BUILT_IN_IS_POINTER_INTERCONVERTIBLE_WITH_CLASS builtin.
917 * semantics.c (pointer_interconvertible_base_of_p,
918 first_nonstatic_data_member_p,
919 fold_builtin_is_pointer_inverconvertible_with_class): New functions.
920 (trait_expr_value): Handle CPTK_IS_POINTER_INTERCONVERTIBLE_BASE_OF.
921 (finish_trait_expr): Likewise. Formatting fix.
922 * cp-gimplify.c (cp_gimplify_expr): Fold
923 CP_BUILT_IN_IS_POINTER_INTERCONVERTIBLE_WITH_CLASS. Call
924 fndecl_built_in_p just once.
925 (cp_fold): Likewise.
926 * tree.c (builtin_valid_in_constant_expr_p): Handle
927 CP_BUILT_IN_IS_POINTER_INTERCONVERTIBLE_WITH_CLASS. Call
928 fndecl_built_in_p just once.
929 * cxx-pretty-print.c (pp_cxx_trait_expression): Handle
930 CPTK_IS_POINTER_INTERCONVERTIBLE_BASE_OF.
931
932 2021-07-30 Jason Merrill <jason@redhat.com>
933
934 * class.c (finish_struct_anon): Improve comment.
935 * decl.c (fixup_anonymous_aggr): Reject anonymous struct
936 with bases.
937
938 2021-07-30 Jakub Jelinek <jakub@redhat.com>
939
940 * parser.c (cp_parser_statement): Rollback attributes not just
941 when std_attrs is non-NULL, but whenever
942 cp_parser_std_attribute_spec_seq parsed any tokens.
943
944 2021-07-30 Jakub Jelinek <jakub@redhat.com>
945
946 PR c++/101582
947 * parser.c (cp_parser_skip_std_attribute_spec_seq): Add a forward
948 declaration.
949 (cp_parser_declaration): Parse empty-declaration and
950 attribute-declaration.
951 (cp_parser_toplevel_declaration): Don't parse empty-declaration here.
952
953 2021-07-28 Martin Sebor <msebor@redhat.com>
954
955 * init.c: Include new header.
956
957 2021-07-27 Marek Polacek <polacek@redhat.com>
958
959 DR 1512
960 PR c++/99701
961 * cp-gimplify.c (cp_fold): Remove {LE,LT,GE,GT_EXPR} from
962 a switch.
963 * typeck.c (cp_build_binary_op): Reject ordered comparison
964 of two null pointers.
965
966 2021-07-26 Jakub Jelinek <jakub@redhat.com>
967
968 * parser.h (struct cp_lexer): Add orphan_p member.
969 * parser.c (cp_parser_statement): Don't change in_omp_attribute_pragma
970 upon restart from CPP_PRAGMA handling. Fix up condition when a lexer
971 should be destroyed and adjust saved_tokens if it records tokens from
972 the to be destroyed lexer.
973 (cp_parser_omp_section_scan): New function.
974 (cp_parser_omp_scan_loop_body): Use it. If
975 parser->lexer->in_omp_attribute_pragma, allow optional comma
976 after scan.
977 (cp_parser_omp_sections_scope): Use cp_parser_omp_section_scan.
978
979 2021-07-23 Jakub Jelinek <jakub@redhat.com>
980
981 * parser.h (struct cp_parser): Add omp_attrs_forbidden_p member.
982 * parser.c (cp_parser_handle_statement_omp_attributes): Diagnose
983 mixing of attribute and pragma syntax directives when seeing
984 omp::directive if parser->omp_attrs_forbidden_p or if attribute syntax
985 directives are followed by OpenMP pragma.
986 (cp_parser_statement): Clear parser->omp_attrs_forbidden_p after
987 the cp_parser_handle_statement_omp_attributes call.
988 (cp_parser_omp_structured_block): Add disallow_omp_attrs argument,
989 if true, set parser->omp_attrs_forbidden_p.
990 (cp_parser_omp_scan_loop_body, cp_parser_omp_sections_scope): Pass
991 false as disallow_omp_attrs to cp_parser_omp_structured_block.
992 (cp_parser_omp_parallel, cp_parser_omp_task): Set
993 parser->omp_attrs_forbidden_p.
994
995 2021-07-21 Thomas Schwinge <thomas@codesourcery.com>
996 Joseph Myers <joseph@codesourcery.com>
997 Cesar Philippidis <cesar@codesourcery.com>
998
999 * parser.c (cp_parser_omp_clause_name): Handle 'nohost'.
1000 (cp_parser_oacc_all_clauses): Handle 'PRAGMA_OACC_CLAUSE_NOHOST'.
1001 (OACC_ROUTINE_CLAUSE_MASK): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
1002 * pt.c (tsubst_omp_clauses): Handle 'OMP_CLAUSE_NOHOST'.
1003 * semantics.c (finish_omp_clauses): Likewise.
1004
1005 2021-07-21 Jakub Jelinek <jakub@redhat.com>
1006
1007 PR c++/101516
1008 * semantics.c (finish_omp_reduction_clause): Also call
1009 complete_type_or_else and return true if it fails.
1010
1011 2021-07-19 Iain Sandoe <iain@sandoe.co.uk>
1012
1013 PR c++/95520
1014 * coroutines.cc (struct coroutine_info): Add fields for
1015 actor and destroy function decls.
1016 (to_ramp): New.
1017 (coro_get_ramp_function): New.
1018 (coro_get_actor_function): New.
1019 (coro_get_destroy_function): New.
1020 (act_des_fn): Set up mapping between ramp, actor and
1021 destroy functions.
1022 (morph_fn_to_coro): Adjust interface to the builder for
1023 helper function decls.
1024 * cp-tree.h (DECL_ACTOR_FN, DECL_DESTROY_FN, DECL_RAMP_FN,
1025 JOIN_STR): New.
1026 * mangle.c (write_encoding): Handle coroutine helpers.
1027 (write_unqualified_name): Handle lambda coroutine helpers.
1028
1029 2021-07-16 Patrick Palka <ppalka@redhat.com>
1030
1031 PR c++/101233
1032 * pt.c (alias_ctad_tweaks): Clear cp_unevaluated_operand for
1033 substituting DECL_ARGUMENTS.
1034
1035 2021-07-16 Patrick Palka <ppalka@redhat.com>
1036
1037 DR 960
1038 PR c++/99664
1039 * search.c (check_final_overrider): Compare TYPE_REF_IS_RVALUE
1040 when the return types are references.
1041
1042 2021-07-16 Marek Polacek <polacek@redhat.com>
1043
1044 * typeck2.c (check_narrowing): Don't suppress the pedantic error
1045 in system headers.
1046
1047 2021-07-15 Jakub Jelinek <jakub@redhat.com>
1048
1049 PR c++/101443
1050 * cp-gimplify.c (cp_fold): For comparisons with NULLPTR_TYPE
1051 operands, fold them right away to true or false.
1052
1053 2021-07-15 Jason Merrill <jason@redhat.com>
1054
1055 PR c++/101095
1056 * cp-objcp-common.c (cp_common_init_ts): Mark types as types.
1057 (cp_tree_size): Remove redundant entries.
1058
1059 2021-07-14 Patrick Palka <ppalka@redhat.com>
1060
1061 PR c++/88252
1062 * cp-tree.h (TEMPLATE_TYPE_PARM_FOR_CLASS): Remove.
1063 * pt.c (push_template_decl): Remove TEMPLATE_TYPE_PARM_FOR_CLASS
1064 handling.
1065 (redeclare_class_template): Likewise.
1066 (forwarding_reference_p): Define.
1067 (maybe_adjust_types_for_deduction): Use it instead. Add 'tparms'
1068 parameter.
1069 (unify_one_argument): Pass tparms to
1070 maybe_adjust_types_for_deduction.
1071 (try_one_overload): Likewise.
1072 (unify): Likewise.
1073 (rewrite_template_parm): Remove TEMPLATE_TYPE_PARM_FOR_CLASS
1074 handling.
1075
1076 2021-07-14 Jason Merrill <jason@redhat.com>
1077
1078 * class.c (struct find_final_overrider_data): Use auto_vec.
1079 (find_final_overrider): Remove explicit release.
1080 * coroutines.cc (process_conditional): Use auto_vec.
1081 * cp-gimplify.c (struct cp_genericize_data): Use auto_vec.
1082 (cp_genericize_tree): Remove explicit release.
1083 * parser.c (cp_parser_objc_at_property_declaration): Use
1084 auto_delete_vec.
1085 * semantics.c (omp_reduction_lookup): Use auto_vec.
1086
1087 2021-07-14 Marek Polacek <polacek@redhat.com>
1088
1089 PR c++/101371
1090 * constexpr.c (cxx_eval_array_reference): Create a new .object
1091 and .ctor for the non-aggregate non-scalar case too when
1092 value-initializing.
1093
1094 2021-07-12 Patrick Palka <ppalka@redhat.com>
1095
1096 PR c++/79501
1097 PR c++/100983
1098 * decl.c (grokfndecl): Don't require that deduction guides are
1099 declared at namespace scope. Check that class-scope deduction
1100 guides have the same access as the member class template.
1101 (grokdeclarator): Pretend class-scope deduction guides are static.
1102 * search.c (lookup_member): Don't use a BASELINK for (class-scope)
1103 deduction guides.
1104
1105 2021-07-10 Patrick Palka <ppalka@redhat.com>
1106
1107 PR c++/82110
1108 * init.c (build_aggr_init): Return error_mark_node if
1109 expand_aggr_init_1 returns false.
1110 (expand_default_init): Change return type to bool. Return false
1111 on error, true on success.
1112 (expand_aggr_init_1): Likewise.
1113
1114 2021-07-09 Jason Merrill <jason@redhat.com>
1115
1116 PR c++/101098
1117 * decl.c (function_requirements_equivalent_p): Only compare
1118 trailing requirements on a specialization.
1119
1120 2021-07-09 Iain Sandoe <iain@sandoe.co.uk>
1121
1122 * coroutines.cc (build_actor_fn): Move common code to
1123 act_des_fn.
1124 (build_destroy_fn): Likewise.
1125 (act_des_fn): Build the void return here. Ensure that the
1126 source location matches the original function.
1127
1128 2021-07-09 Iain Sandoe <iain@sandoe.co.uk>
1129
1130 * coroutines.cc
1131 (coro_rewrite_function_body): Connect the replacement
1132 function block to the block nest correctly.
1133
1134 2021-07-09 Patrick Palka <ppalka@redhat.com>
1135
1136 PR c++/101181
1137 * constraint.cc (tsubst_requires_expr): Pass complain/in_decl to
1138 add_extra_args.
1139 * cp-tree.h (add_extra_args): Add complain/in_decl parameters.
1140 * pt.c (build_extra_args): Make a copy of args.
1141 (add_extra_args): Add complain/in_decl parameters. Enable the
1142 code for handling the case where the extra arguments are
1143 dependent.
1144 (tsubst_pack_expansion): Pass complain/in_decl to
1145 add_extra_args.
1146 (tsubst_template_args): Handle missing template arguments.
1147 (tsubst_expr) <case IF_STMT>: Pass complain/in_decl to
1148 add_extra_args.
1149
1150 2021-07-09 Patrick Palka <ppalka@redhat.com>
1151
1152 PR c++/101247
1153 * pt.c (any_template_parm_r) <case TEMPLATE_DECL>: Just walk the
1154 DECL_CONTEXT.
1155
1156 2021-07-08 Martin Sebor <msebor@redhat.com>
1157
1158 PR bootstrap/101372
1159 * module.cc (identifier): Suppress warning.
1160 (module_state::read_macro_maps): Remove warning suppression.
1161 (module_state::install_macros): Ditto.
1162
1163 2021-07-08 Marek Polacek <polacek@redhat.com>
1164
1165 PR c++/101087
1166 * cp-tree.h (unevaluated_p): New.
1167 * except.c (check_noexcept_r): Use it. Don't walk into
1168 unevaluated operands.
1169
1170 2021-07-08 Martin Sebor <msebor@redhat.com>
1171
1172 PR bootstrap/101374
1173 * module.cc (module_state::read_macro_maps): Temporarily disable
1174 -Warray-bounds.
1175 (module_state::install_macros): Same.
1176
1177 2021-07-06 Martin Sebor <msebor@redhat.com>
1178
1179 * error.c (cp_printer): Remove support for %G and %K.
1180
1181 2021-07-02 Jakub Jelinek <jakub@redhat.com>
1182
1183 * parser.h (struct cp_lexer): Add in_omp_attribute_pragma member.
1184 (struct cp_omp_declare_simd_data): Likewise.
1185 * cp-tree.h (enum cp_tree_index): Add CPTI_OMP_IDENTIFIER.
1186 (omp_identifier): Define.
1187 * parser.c (cp_parser_skip_to_pragma_eol): Handle
1188 in_omp_attribute_pragma CPP_PRAGMA_EOL followed by CPP_EOF.
1189 (cp_parser_require_pragma_eol): Likewise.
1190 (struct cp_omp_attribute_data): New type.
1191 (cp_parser_handle_statement_omp_attributes): New function.
1192 (cp_parser_statement): Handle OpenMP directives in statement's
1193 attribute-specifier-seq.
1194 (cp_parser_omp_directive_args, cp_parser_omp_sequence_args): New
1195 functions.
1196 (cp_parser_std_attribute): Handle omp::directive and omp::sequence
1197 attributes.
1198 (cp_parser_omp_all_clauses): If in_omp_attribute_pragma, allow
1199 a comma also before the first clause.
1200 (cp_parser_omp_allocate): Likewise.
1201 (cp_parser_omp_atomic): Likewise.
1202 (cp_parser_omp_depobj): Likewise.
1203 (cp_parser_omp_flush): Likewise.
1204 (cp_parser_omp_ordered): Likewise.
1205 (cp_parser_omp_declare_simd): Save in_omp_attribute_pragma
1206 into struct cp_omp_declare_simd_data.
1207 (cp_finish_omp_declare_variant): Add in_omp_attribute_pragma
1208 argument. If set, allow a comma also before match clause.
1209 (cp_parser_late_parsing_omp_declare_simd): If in_omp_attribute_pragma,
1210 allow a comma also before the first clause. Adjust
1211 cp_finish_omp_declare_variant caller.
1212 (cp_parser_omp_declare_target): If in_omp_attribute_pragma, allow
1213 a comma also before the first clause.
1214 (cp_parser_omp_declare_reduction_exprs): Likewise.
1215 (cp_parser_omp_requires): Likewise.
1216 * decl.c (initialize_predefined_identifiers): Initialize
1217 omp_identifier.
1218 * decl2.c (cplus_decl_attributes): Reject omp::directive and
1219 omp::sequence attributes.
1220
1221 2021-07-02 Jakub Jelinek <jakub@redhat.com>
1222
1223 PR c/101297
1224 * parser.c (cp_parser_omp_atomic): Consume comma only if it
1225 appears before a CPP_NAME.
1226
1227 2021-07-02 Patrick Palka <ppalka@redhat.com>
1228
1229 PR c++/101247
1230 * pt.c (any_template_parm_r) <case TEMPLATE_DECL>: Rewrite to
1231 use common_enclosing_class and to not depend on the TREE_TYPE
1232 of outer levels pointing to the corresponding primary template.
1233
1234 2021-07-01 Patrick Palka <ppalka@redhat.com>
1235
1236 PR c++/101194
1237 * constexpr.c (cxx_eval_array_reference): When the element type
1238 is an empty type and the corresponding element is omitted, just
1239 return an empty CONSTRUCTOR instead of attempting value
1240 initialization.
1241
1242 2021-07-01 Patrick Palka <ppalka@redhat.com>
1243
1244 PR c++/96204
1245 * pt.c (finish_template_variable): Pass the partially
1246 instantiated template and its args to instantiate_template.
1247 (instantiate_class_template_1): No need to call
1248 push_nested_class and pop_nested_class around the call to
1249 most_specialized_partial_spec.
1250 (instantiate_template_1): Pass the partially instantiated
1251 template to lookup_template_variable.
1252 (most_specialized_partial_spec): Use push_access_scope_guard
1253 to set the access scope appropriately. Use
1254 deferring_access_check_sentinel to force access to get checked
1255 immediately.
1256 (instantiate_decl): Just pass the VAR_DECL to
1257 most_specialized_partial_spec.
1258
1259 2021-06-30 Patrick Palka <ppalka@redhat.com>
1260
1261 * constraint.cc (get_normalized_constraints_from_decl): Use
1262 push_access_scope_guard instead of push_nested_class_guard.
1263 * cp-tree.h (struct push_nested_class_guard): Replace with ...
1264 (struct push_access_scope_guard): ... this.
1265 * pt.c (push_access_scope): When the argument corresponds to
1266 a class type, push the class instead of its context.
1267 (pop_access_scope): Adjust accordingly.
1268
1269 2021-06-30 Marek Polacek <polacek@redhat.com>
1270
1271 PR c++/100975
1272 DR 2397
1273 * decl.c (create_array_type_for_decl): Allow array of auto.
1274
1275 2021-06-29 Jason Merrill <jason@redhat.com>
1276
1277 * pt.c (instantiate_decl): Only consider partial specializations of
1278 actual variable templates.
1279
1280 2021-06-26 Patrick Palka <ppalka@redhat.com>
1281
1282 PR c++/96204
1283 * pt.c (instantiate_class_template_1): Enter the scope of the
1284 type when calling most_specialized_partial_spec.
1285
1286 2021-06-26 Jason Merrill <jason@redhat.com>
1287
1288 PR c++/101040
1289 PR c++/97566
1290 * class.c (is_empty_field): Handle null argument.
1291 * constexpr.c (cxx_eval_bare_aggregate): Discard initializer
1292 for empty field.
1293
1294 2021-06-26 Marek Polacek <polacek@redhat.com>
1295
1296 PR c++/100752
1297 * parser.c (cp_parser_declarator): Pass flags down to
1298 cp_parser_declarator. Also pass static_p/member_p.
1299
1300 2021-06-25 Martin Sebor <msebor@redhat.com>
1301
1302 * call.c (build_over_call): Replace direct uses of TREE_NO_WARNING
1303 with warning_suppressed_p, suppress_warning, and copy_no_warning, or
1304 nothing if not necessary.
1305 (set_up_extended_ref_temp): Same.
1306 * class.c (layout_class_type): Same.
1307 * constraint.cc (constraint_satisfaction_value): Same.
1308 * coroutines.cc (finish_co_await_expr): Same.
1309 (finish_co_yield_expr): Same.
1310 (finish_co_return_stmt): Same.
1311 (build_actor_fn): Same.
1312 (coro_rewrite_function_body): Same.
1313 (morph_fn_to_coro): Same.
1314 * cp-gimplify.c (genericize_eh_spec_block): Same.
1315 (gimplify_expr_stmt): Same.
1316 (cp_genericize_r): Same.
1317 (cp_fold): Same.
1318 * cp-ubsan.c (cp_ubsan_instrument_vptr): Same.
1319 * cvt.c (cp_fold_convert): Same.
1320 (convert_to_void): Same.
1321 * decl.c (wrapup_namespace_globals): Same.
1322 (grokdeclarator): Same.
1323 (finish_function): Same.
1324 (require_deduced_type): Same.
1325 * decl2.c (no_linkage_error): Same.
1326 (c_parse_final_cleanups): Same.
1327 * except.c (expand_end_catch_block): Same.
1328 * init.c (build_new_1): Same.
1329 (build_new): Same.
1330 (build_vec_delete_1): Same.
1331 (build_vec_init): Same.
1332 (build_delete): Same.
1333 * method.c (defaultable_fn_check): Same.
1334 * parser.c (cp_parser_fold_expression): Same.
1335 (cp_parser_primary_expression): Same.
1336 * pt.c (push_tinst_level_loc): Same.
1337 (tsubst_copy): Same.
1338 (tsubst_omp_udr): Same.
1339 (tsubst_copy_and_build): Same.
1340 * rtti.c (build_if_nonnull): Same.
1341 * semantics.c (maybe_convert_cond): Same.
1342 (finish_return_stmt): Same.
1343 (finish_parenthesized_expr): Same.
1344 (cp_check_omp_declare_reduction): Same.
1345 * tree.c (build_cplus_array_type): Same.
1346 * typeck.c (build_ptrmemfunc_access_expr): Same.
1347 (cp_build_indirect_ref_1): Same.
1348 (cp_build_function_call_vec): Same.
1349 (warn_for_null_address): Same.
1350 (cp_build_binary_op): Same.
1351 (unary_complex_lvalue): Same.
1352 (cp_build_modify_expr): Same.
1353 (build_x_modify_expr): Same.
1354 (convert_for_assignment): Same.
1355
1356 2021-06-24 Patrick Palka <ppalka@redhat.com>
1357
1358 PR c++/98832
1359 * pt.c (maybe_aggr_guide): Handle alias templates appropriately.
1360
1361 2021-06-24 Patrick Palka <ppalka@redhat.com>
1362
1363 PR c++/101182
1364 * constraint.cc (evaluate_requires_expr): Adjust function comment.
1365 * cp-gimplify.c (cp_genericize_r) <case REQUIRES_EXPR>: Move to ...
1366 (cp_fold) <case REQUIRES_EXPR>: ... here.
1367
1368 2021-06-24 Jakub Jelinek <jakub@redhat.com>
1369
1370 * parser.c (cp_omp_split_clauses): Pass C_ORT_OMP_TARGET instead of
1371 C_ORT_OMP for clauses on target construct.
1372 (OMP_TARGET_CLAUSE_MASK): Add in_reduction clause.
1373 (cp_parser_omp_target): For non-combined target add
1374 map (always, tofrom:) clauses for OMP_CLAUSE_IN_REDUCTION. Pass
1375 C_ORT_OMP_TARGET to finish_omp_clauses.
1376 * semantics.c (handle_omp_array_sections_1): Adjust ort handling
1377 for addition of C_ORT_OMP_TARGET and simplify, mapping clauses are
1378 never present on C_ORT_*DECLARE_SIMD.
1379 (handle_omp_array_sections): Likewise.
1380 (finish_omp_clauses): Likewise. Handle OMP_CLAUSE_IN_REDUCTION
1381 on C_ORT_OMP_TARGET, set OMP_CLAUSE_MAP_IN_REDUCTION on
1382 corresponding map clauses.
1383 * pt.c (tsubst_expr): Pass C_ORT_OMP_TARGET instead of C_ORT_OMP for
1384 clauses on target construct.
1385
1386 2021-06-23 Patrick Palka <ppalka@redhat.com>
1387
1388 PR c++/101174
1389 * pt.c (push_access_scope): For artificial deduction guides,
1390 set the access scope to that of the constructor.
1391 (pop_access_scope): Likewise.
1392 (build_deduction_guide): Don't set DECL_CONTEXT on the guide.
1393
1394 2021-06-23 Patrick Palka <ppalka@redhat.com>
1395
1396 PR c++/86439
1397 * call.c (print_error_for_call_failure): Constify 'args' parameter.
1398 (perform_dguide_overload_resolution): Define.
1399 * cp-tree.h: (perform_dguide_overload_resolution): Declare.
1400 * pt.c (do_class_deduction): Use perform_dguide_overload_resolution
1401 instead of build_new_function_call. Don't use tf_decltype or
1402 set cp_unevaluated_operand. Remove unnecessary NULL_TREE tests.
1403
1404 2021-06-21 Patrick Palka <ppalka@redhat.com>
1405
1406 PR c++/67302
1407 * typeck.c (check_return_expr): Call maybe_undo_parenthesized_ref
1408 sooner, before the NRVO handling.
1409
1410 2021-06-21 Patrick Palka <ppalka@redhat.com>
1411
1412 PR c++/80431
1413 * tree.c (bot_replace): Use convert_to_base to build the
1414 conversion to the (morally) virtual base.
1415
1416 2021-06-21 Jakub Jelinek <jakub@redhat.com>
1417
1418 PR inline-asm/100785
1419 * typeck.c (cxx_mark_addressable): Diagnose trying to make
1420 bit-fields addressable.
1421
1422 2021-06-17 Jason Merrill <jason@redhat.com>
1423
1424 PR c++/101106
1425 * decl.c (duplicate_decls): Make 'deleted after first declaration'
1426 pedwarn on by default.
1427
1428 2021-06-17 Jason Merrill <jason@redhat.com>
1429
1430 PR c++/101029
1431 * init.c (build_vec_init): Preserve the type of base.
1432
1433 2021-06-16 Jason Merrill <jason@redhat.com>
1434
1435 PR c++/101078
1436 PR c++/91706
1437 * pt.c (tsubst_baselink): Update binfos in non-dependent case.
1438
1439 2021-06-15 Robin Dapp <rdapp@linux.ibm.com>
1440
1441 * decl.c (duplicate_decls): Likewise.
1442
1443 2021-06-14 Tobias Burnus <tobias@codesourcery.com>
1444
1445 PR c/100913
1446 * parser.c (cp_parser_omp_clause_affinity): No need to set iterator
1447 var in the error case.
1448
1449 2021-06-13 Trevor Saunders <tbsaunde@tbsaunde.org>
1450
1451 * constexpr.c (cxx_eval_call_expression): Iterate over vec<>
1452 with range based for.
1453 (cxx_eval_store_expression): Likewise.
1454 (cxx_eval_loop_expr): Likewise.
1455 * decl.c (wrapup_namespace_globals): Likewise.
1456 (cp_finish_decl): Likewise.
1457 (cxx_simulate_enum_decl): Likewise.
1458 * parser.c (cp_parser_postfix_expression): Likewise.
1459
1460 2021-06-12 Jason Merrill <jason@redhat.com>
1461
1462 PR c++/101029
1463 * init.c (build_vec_init): Shortcut [0] case.
1464
1465 2021-06-12 Jason Merrill <jason@redhat.com>
1466
1467 * pt.c (lookup_template_class_1): Shortcut current_class_type.
1468
1469 2021-06-11 Patrick Palka <ppalka@redhat.com>
1470
1471 DR 1227
1472 PR c++/96560
1473 * pt.c (tsubst_arg_types): Rearrange so that we substitute into
1474 TYPE_ARG_TYPES in forward order while short circuiting
1475 appropriately. Adjust formatting.
1476
1477 2021-06-11 Jakub Jelinek <jakub@redhat.com>
1478
1479 PR c++/100974
1480 * cp-tree.h (struct saved_scope): Add consteval_if_p
1481 member. Formatting fix for the discarded_stmt comment.
1482 (in_consteval_if_p, IF_STMT_CONSTEVAL_P): Define.
1483 * parser.c (cp_parser_lambda_expression): Temporarily disable
1484 in_consteval_if_p when parsing lambda body.
1485 (cp_parser_selection_statement): Parse consteval if.
1486 * decl.c (struct named_label_entry): Add in_consteval_if member.
1487 (level_for_consteval_if): New function.
1488 (poplevel_named_label_1, check_previous_goto_1, check_goto): Handle
1489 consteval if.
1490 * constexpr.c (cxx_eval_builtin_function_call): Clarify in comment
1491 why CP_BUILT_IN_IS_CONSTANT_EVALUATED needs to *non_constant_p
1492 for !ctx->manifestly_const_eval.
1493 (cxx_eval_conditional_expression): For IF_STMT_CONSTEVAL_P evaluate
1494 condition as if it was __builtin_is_constant_evaluated call.
1495 (potential_constant_expression_1): For IF_STMT_CONSTEVAL_P always
1496 recurse on both branches.
1497 * cp-gimplify.c (genericize_if_stmt): Genericize IF_STMT_CONSTEVAL_P
1498 as the else branch.
1499 * pt.c (tsubst_expr) <case IF_STMT>: Copy IF_STMT_CONSTEVAL_P.
1500 Temporarily set in_consteval_if_p when recursing on
1501 IF_STMT_CONSTEVAL_P then branch.
1502 (tsubst_lambda_expr): Temporarily disable
1503 in_consteval_if_p when instantiating lambda body.
1504 * call.c (immediate_invocation_p): Return false when
1505 in_consteval_if_p.
1506
1507 2021-06-11 Marek Polacek <polacek@redhat.com>
1508
1509 PR c++/100995
1510 * constexpr.c (maybe_constexpr_fn): New.
1511 * cp-tree.h (maybe_constexpr_fn): Declare.
1512 * semantics.c (find_std_constant_evaluated_r): New.
1513 (maybe_warn_for_constant_evaluated): New.
1514 (finish_if_stmt_cond): Call it.
1515
1516 2021-06-10 Patrick Palka <ppalka@redhat.com>
1517
1518 PR c++/67829
1519 * pt.c (unify) <case BOUND_TEMPLATE_TEMPLATE_PARM>: When
1520 the TEMPLATE_DECL of a BOUND_TEMPLATE_TEMPLATE_PARM argument is
1521 a template template parameter, adjust to the
1522 TEMPLATE_TEMPLATE_PARAMETER before falling through.
1523
1524 2021-06-10 Patrick Palka <ppalka@redhat.com>
1525
1526 PR c++/100946
1527 * constraint.cc (normalize_placeholder_type_constraints): When
1528 normalizing a non-templated return-type-requirement, add a dummy
1529 level to initial_parms.
1530
1531 2021-06-08 Marek Polacek <polacek@redhat.com>
1532
1533 PR c++/100065
1534 * decl.c (grokdeclarator): Store a value-dependent
1535 explicit-specifier even for deduction guides.
1536
1537 2021-06-08 Jason Merrill <jason@redhat.com>
1538
1539 * parser.c (cp_parser_string_literal): Adjust diagnostic.
1540
1541 2021-06-08 Jason Merrill <jason@redhat.com>
1542
1543 PR c++/100963
1544 * call.c (perfect_conversion_p): Check check_narrowing.
1545
1546 2021-06-08 Jason Merrill <jason@redhat.com>
1547
1548 PR c++/91706
1549 * name-lookup.c (get_class_binding): Keep a BASELINK.
1550 (set_inherited_value_binding_p): Adjust.
1551 * lambda.c (is_lambda_ignored_entity): Adjust.
1552 * pt.c (lookup_template_function): Copy a BASELINK before
1553 modifying it.
1554
1555 2021-06-08 Jason Merrill <jason@redhat.com>
1556
1557 PR c++/91706
1558 * semantics.c (baselink_for_fns): Fix BASELINK_BINFO.
1559
1560 2021-06-08 Jason Merrill <jason@redhat.com>
1561
1562 * module.cc (duplicate_hash::hash): Comment out.
1563 (trees_in::tree_value): Adjust loop counter.
1564
1565 2021-06-08 Jason Merrill <jason@redhat.com>
1566
1567 PR c++/100102
1568 * init.c (build_offset_ref): Return the BASELINK for a static
1569 member function.
1570
1571 2021-06-07 Patrick Palka <ppalka@redhat.com>
1572
1573 PR c++/100918
1574 * parser.c (cp_parser_lookup_name): Check access of the lookup
1575 result before we potentially adjust an injected-class-name to
1576 its TEMPLATE_DECL.
1577
1578 2021-06-06 Jakub Jelinek <jakub@redhat.com>
1579
1580 PR c/100902
1581 * parser.c (cp_parser_omp_target): Call c_omp_adjust_map_clauses
1582 even when target is combined with other constructs.
1583
1584 2021-06-04 Patrick Palka <ppalka@redhat.com>
1585
1586 PR c++/100893
1587 * pt.c (convert_template_argument): Strip top-level cv-quals
1588 on the substituted type of a non-type template parameter.
1589
1590 2021-06-04 Patrick Palka <ppalka@redhat.com>
1591
1592 PR c++/100102
1593 * pt.c (tsubst_function_decl): Remove old code for reducing
1594 args when it has excess levels.
1595
1596 2021-06-04 Jakub Jelinek <jakub@redhat.com>
1597
1598 PR c++/100872
1599 * name-lookup.c (maybe_save_operator_binding): Add op_attr after all
1600 ATTR_IS_DEPENDENT attributes in the DECL_ATTRIBUTES list rather than
1601 to the start.
1602
1603 2021-06-03 Patrick Palka <ppalka@redhat.com>
1604
1605 PR c++/100592
1606 * decl.c (make_typename_type): After calling
1607 lookup_template_class, adjust the result to its TYPE_NAME and
1608 then consider the tf_keep_type_decl flag.
1609
1610 2021-06-03 Patrick Palka <ppalka@redhat.com>
1611
1612 PR c++/100862
1613 * pt.c (set_current_access_from_decl): Move to ...
1614 * class.c (set_current_access_from_decl): ... here.
1615 (handle_using_decl): Use it to propagate the access of the
1616 using-enum decl to the copy of the imported enumerator.
1617 * cp-tree.h (set_current_access_from_decl): Declare.
1618 * decl.c (build_enumerator): Simplify using make_temp_override
1619 and set_current_access_from_decl.
1620
1621 2021-06-03 Jakub Jelinek <jakub@redhat.com>
1622
1623 PR c++/100859
1624 * semantics.c (handle_omp_array_sections_1): For
1625 OMP_CLAUSE_{AFFINITY,DEPEND} handle FIELD_DECL base using
1626 finish_non_static_data_member and allow this as base.
1627 (finish_omp_clauses): Move OMP_CLAUSE_AFFINITY
1628 after depend only cases. Let this be diagnosed by !lvalue_p
1629 case for OMP_CLAUSE_{AFFINITY,DEPEND} and remove useless
1630 assert.
1631 * pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_AFFINITY.
1632
1633 2021-06-02 Jason Merrill <jason@redhat.com>
1634
1635 PR c++/100838
1636 * call.c (convert_like_internal): Clear tf_no_cleanup when
1637 recursing.
1638 (build_user_type_conversion_1): Only add ck_rvalue if
1639 LOOKUP_ONLYCONVERTING.
1640
1641 2021-06-01 Patrick Palka <ppalka@redhat.com>
1642
1643 PR c++/65816
1644 * init.c (expand_aggr_init_1): Check
1645 type_has_non_user_provided_default_constructor instead of
1646 type_has_user_provided_constructor.
1647
1648 2021-06-01 Jason Merrill <jason@redhat.com>
1649
1650 PR c++/91859
1651 * call.c (build_op_delete_call): Don't set CALL_FROM_NEW_OR_DELETE_P
1652 for destroying delete.
1653 * init.c (build_delete): Don't clobber before destroying delete.
1654
1655 2021-06-01 Jason Merrill <jason@redhat.com>
1656
1657 PR c++/94492
1658 * decl2.c (cp_warn_deprecated_use): Check warning_enabled_at.
1659
1660 2021-05-31 Richard Biener <rguenther@suse.de>
1661
1662 PR c++/88601
1663 * cp-objcp-common.c (names_builtin_p): Handle
1664 RID_BUILTIN_SHUFFLEVECTOR.
1665 * cp-tree.h (build_x_shufflevector): Declare.
1666 * parser.c (cp_parser_postfix_expression): Handle
1667 RID_BUILTIN_SHUFFLEVECTOR.
1668 * pt.c (tsubst_copy_and_build): Handle IFN_SHUFFLEVECTOR.
1669 * typeck.c (build_x_shufflevector): Build either a lowered
1670 VEC_PERM_EXPR or an unlowered shufflevector via a temporary
1671 internal function IFN_SHUFFLEVECTOR.
1672
1673 2021-05-28 Jason Merrill <jason@redhat.com>
1674
1675 * constexpr.c (build_data_member_initialization): Use tsi_range.
1676 (build_constexpr_constructor_member_initializers): Likewise.
1677 (constexpr_fn_retval, cxx_eval_statement_list): Likewise.
1678 (potential_constant_expression_1): Likewise.
1679 * coroutines.cc (await_statement_expander): Likewise.
1680 (await_statement_walker): Likewise.
1681 * module.cc (trees_out::core_vals): Likewise.
1682 * pt.c (tsubst_expr): Likewise.
1683 * semantics.c (set_cleanup_locs): Likewise.
1684
1685 2021-05-28 Jason Merrill <jason@redhat.com>
1686
1687 PR c++/100797
1688 PR c++/95719
1689 * call.c (build_over_call): Adjust base_binfo in
1690 resolves_to_fixed_type_p case.
1691
1692 2021-05-28 Jakub Jelinek <jakub@redhat.com>
1693
1694 PR middle-end/99928
1695 * semantics.c (handle_omp_array_sections): Copy
1696 OMP_CLAUSE_MAP_IMPLICIT.
1697 (finish_omp_clauses): Move not just OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
1698 marked clauses last, but also OMP_CLAUSE_MAP_IMPLICIT. Add
1699 map_firstprivate_head bitmap, set it for GOMP_MAP_FIRSTPRIVATE_POINTER
1700 maps and silently remove OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT if it is
1701 present too. For OMP_CLAUSE_MAP_IMPLICIT silently remove the clause
1702 if present in map_head, map_field_head or map_firstprivate_head
1703 bitmaps.
1704
1705 2021-05-28 Tobias Burnus <tobias@codesourcery.com>
1706
1707 * parser.c (cp_parser_omp_clause_affinity): New.
1708 (cp_parser_omp_clause_name, cp_parser_omp_var_list_no_open,
1709 cp_parser_omp_all_clauses, OMP_TASK_CLAUSE_MASK): Handle affinity
1710 clause.
1711 * semantics.c (handle_omp_array_sections_1, handle_omp_array_sections,
1712 finish_omp_clauses): Likewise.
1713
1714 2021-05-27 Matthias Kretz <kretz@kde.org>
1715
1716 PR c++/100716
1717 * error.c (dump_template_bindings): Include code to print
1718 "[with" and ']', conditional on whether anything is printed at
1719 all. This is tied to whether a semicolon is needed to separate
1720 multiple template parameters. If the template argument repeats
1721 the template parameter (T = T), then skip the parameter.
1722 (dump_substitution): Moved code to print "[with" and ']' to
1723 dump_template_bindings.
1724 (dump_function_decl): Partial revert of PR50828, which masked
1725 TFF_TEMPLATE_NAME for all of dump_function_decl. Now
1726 TFF_TEMPLATE_NAME is masked for the scope of the function and
1727 only carries through to dump_function_name.
1728 (dump_function_name): Avoid calling dump_template_parms if
1729 TFF_TEMPLATE_NAME is set.
1730
1731 2021-05-27 Matthias Kretz <kretz@kde.org>
1732
1733 PR c++/100763
1734 * error.c: Call dump_scope when printing a typedef.
1735
1736 2021-05-27 Patrick Palka <ppalka@redhat.com>
1737
1738 PR c++/99893
1739 * tree.c (cp_walk_subtrees) <case STATIC_ASSERT>: New case.
1740
1741 2021-05-27 Jason Merrill <jason@redhat.com>
1742
1743 PR c++/86355
1744 * pt.c (use_pack_expansion_extra_args_p): Don't compare
1745 args from the same argument pack.
1746
1747 2021-05-27 Patrick Palka <ppalka@redhat.com>
1748
1749 DR 1315
1750 PR c++/67593
1751 PR c++/96555
1752 * pt.c (process_partial_specialization): Don't error on a
1753 non-simple non-type template argument that involves template
1754 parameters.
1755 (for_each_template_parm_r): Don't walk TRAIT_EXPR, PLUS_EXPR,
1756 MULT_EXPR, or SCOPE_REF when include_nondeduced_p is false.
1757
1758 2021-05-26 Patrick Palka <ppalka@redhat.com>
1759
1760 PR c++/100502
1761 * typeck.c (finish_class_member_access_expr): Disable ahead
1762 of time access checking during the member lookup.
1763
1764 2021-05-26 Patrick Palka <ppalka@redhat.com>
1765
1766 PR c++/100368
1767 * tree.c (build_target_expr_with_type): Don't call force_rvalue
1768 on CALL_EXPR initializer. Simplify now that bot_manip is no
1769 longer a caller.
1770 (bot_manip): Use force_target_expr instead of
1771 build_target_expr_with_type.
1772
1773 2021-05-26 Patrick Palka <ppalka@redhat.com>
1774
1775 PR c++/97420
1776 * cvt.c (noexcept_conv_p): Remove redundant checks and simplify.
1777 (fnptr_conv_p): Don't call non_reference. Use INDIRECT_TYPE_P
1778 instead of TYPE_PTR_P.
1779 * pt.c (convert_nontype_argument_function): Look through
1780 implicit INDIRECT_REFs before calling strip_fnptr_conv.
1781
1782 2021-05-25 Jakub Jelinek <jakub@redhat.com>
1783
1784 PR c++/100666
1785 * call.c (convert_arg_to_ellipsis): For expressions with NULLPTR_TYPE
1786 and side-effects, temporarily disable -Wunused-result warning when
1787 building COMPOUND_EXPR.
1788
1789 2021-05-21 Jakub Jelinek <jakub@redhat.com>
1790
1791 PR middle-end/99928
1792 * semantics.c (finish_omp_clauses): Move firstprivate clauses with
1793 OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT to the end of the chain. Don't error
1794 if a decl is mentioned both in map clause and in such firstprivate
1795 clause unless OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET is also set.
1796
1797 2021-05-20 Jason Merrill <jason@redhat.com>
1798
1799 * call.c (reference_binding): Check for designator.
1800 (implicit_conversion_1, build_special_member_call): Likewise.
1801 * decl.c (reshape_init_r): Likewise.
1802 * pt.c (do_class_deduction): Likewise.
1803 * typeck2.c (digest_init_r): Likewise.
1804
1805 2021-05-20 Jason Merrill <jason@redhat.com>
1806
1807 PR c++/100489
1808 * decl.c (reshape_init_class): Handle designator for
1809 member of anonymous aggregate here.
1810 * typeck2.c (process_init_constructor_record): Not here.
1811
1812 2021-05-20 Jonathan Wakely <jwakely@redhat.com>
1813
1814 * call.c (maybe_warn_array_conv): Use new warning option.
1815 * decl.c (mark_inline_variable, grokdeclarator): Likewise.
1816 * error.c (maybe_warn_cpp0x): Likewise.
1817 * parser.c (cp_parser_primary_expression)
1818 (cp_parser_unqualified_id)
1819 (cp_parser_pseudo_destructor_name)
1820 (cp_parser_lambda_introducer)
1821 (cp_parser_lambda_declarator_opt)
1822 (cp_parser_selection_statement)
1823 (cp_parser_init_statement)
1824 (cp_parser_decomposition_declaration)
1825 (cp_parser_function_specifier_opt)
1826 (cp_parser_static_assert)
1827 (cp_parser_namespace_definition)
1828 (cp_parser_using_declaration)
1829 (cp_parser_asm_definition)
1830 (cp_parser_ctor_initializer_opt_and_function_body)
1831 (cp_parser_initializer_list)
1832 (cp_parser_type_parameter_key)
1833 (cp_parser_member_declaration)
1834 (cp_parser_try_block)
1835 (cp_parser_std_attribute_spec): Likewise.
1836 * pt.c (check_template_variable): Likewise.
1837
1838 2021-05-20 Jason Merrill <jason@redhat.com>
1839
1840 PR c++/100634
1841 * pt.c (invalid_nontype_parm_type_p): Return true for COMPLEX_TYPE.
1842
1843 2021-05-20 Jason Merrill <jason@redhat.com>
1844
1845 PR c++/100659
1846 * cp-tree.h (CONST_DECL_USING_P): Check for null TREE_TYPE.
1847
1848 2021-05-19 Jason Merrill <jason@redhat.com>
1849
1850 PR c++/100367
1851 PR c++/96299
1852 * method.c (genericize_spaceship): Use fold_build2 for scalar
1853 operands.
1854
1855 2021-05-19 Jason Merrill <jason@redhat.com>
1856
1857 * pt.c (build_deduction_guide): Treat the implicit deduction guide
1858 as a member of the class.
1859
1860 2021-05-19 Marek Polacek <polacek@redhat.com>
1861
1862 PR c++/100596
1863 * cp-tree.h (any_non_type_attribute_p): Remove.
1864 * decl.c (grokdeclarator): Turn an error into a warning and only
1865 warn for standard attributes.
1866 * decl2.c (any_non_type_attribute_p): Remove.
1867 * parser.c (cp_parser_elaborated_type_specifier): Turn an error
1868 into a warning and only warn for standard attributes.
1869 (cp_parser_member_declaration): Likewise.
1870
1871 2021-05-19 Martin Liska <mliska@suse.cz>
1872
1873 PR testsuite/100658
1874 * mangle.c (write_encoding): Fix typos.
1875
1876 2021-05-19 Jakub Jelinek <jakub@redhat.com>
1877
1878 PR middle-end/99928
1879 * parser.c (cp_parser_omp_master): Set OMP_MASTER_COMBINED on
1880 master when combined with taskloop.
1881 (cp_parser_omp_parallel): Don't set OMP_PARALLEL_COMBINED on
1882 parallel master when not combined with taskloop.
1883
1884 2021-05-19 Jason Merrill <jason@redhat.com>
1885
1886 PR c++/100261
1887 * rtti.c (get_tinfo_decl_direct): Check TYPE_TRANSPARENT_AGGR.
1888
1889 2021-05-19 Jason Merrill <jason@redhat.com>
1890
1891 PR c++/100372
1892 * tree.c (strip_typedefs): Only look at the pattern of a
1893 TYPE_PACK_EXPANSION if it's a type.
1894
1895 2021-05-18 Marek Polacek <polacek@redhat.com>
1896
1897 * class.c (classtype_has_non_deleted_copy_ctor): Remove.
1898 * constraint.cc (contains_wildcard_p): Likewise.
1899 (get_template_head_requirements): Likewise.
1900 (check_constrained_friend): Likewise.
1901 (subsumes_constraints): Likewise.
1902 * cp-tree.h (classtype_has_non_deleted_copy_ctor): Likewise.
1903 (push_void_library_fn): Likewise.
1904 (get_pattern_parm): Likewise.
1905 (get_template_parms_at_level): Likewise.
1906 (lambda_return_type): Likewise.
1907 (get_template_head_requirements): Likewise.
1908 (check_constrained_friend): Likewise.
1909 (subsumes_constraints): Likewise.
1910 * decl.c (push_void_library_fn): Likewise.
1911 * lambda.c (lambda_return_type): Likewise.
1912 * pt.c (get_template_parms_at_level): Likewise.
1913 (get_pattern_parm): Likewise.
1914
1915 2021-05-18 Jason Merrill <jason@redhat.com>
1916
1917 PR c++/100644
1918 * call.c (perfect_candidate_p): An implicitly deleted move
1919 is not perfect.
1920
1921 2021-05-18 Andreas Krebbel <krebbel@linux.ibm.com>
1922
1923 PR c++/100281
1924 * cvt.c (cp_convert_to_pointer): Use the size of the target
1925 pointer type.
1926 * tree.c (cp_build_reference_type): Call
1927 cp_build_reference_type_for_mode with VOIDmode.
1928 (cp_build_reference_type_for_mode): Rename from
1929 cp_build_reference_type. Add MODE argument and invoke
1930 build_reference_type_for_mode.
1931 (strip_typedefs): Use build_pointer_type_for_mode and
1932 cp_build_reference_type_for_mode for pointers and references.
1933
1934 2021-05-17 Jonathan Wakely <jwakely@redhat.com>
1935
1936 PR c++/100635
1937 * call.c (convert_like_internal): Print different diagnostic if
1938 the lvalue reference is const.
1939
1940 2021-05-14 Jason Merrill <jason@redhat.com>
1941
1942 PR c++/95870
1943 * pt.c (enclosing_instantiation_of): Just compare
1944 DECL_SOURCE_LOCATION.
1945 (regenerate_decl_from_template): Copy DECL_SOURCE_LOCATION.
1946
1947 2021-05-14 Marek Polacek <polacek@redhat.com>
1948 Jason Merrill <jason@redhat.com>
1949
1950 PR c++/99032
1951 * cp-tree.h (any_non_type_attribute_p): Declare.
1952 * decl.c (grokdeclarator): Diagnose when an attribute appertains to
1953 a friend declaration that is not a definition.
1954 * decl2.c (any_non_type_attribute_p): New.
1955 * parser.c (cp_parser_decl_specifier_seq): Diagnose standard attributes
1956 in the middle of decl-specifiers.
1957 (cp_parser_elaborated_type_specifier): Diagnose when an attribute
1958 appertains to a friend declaration that is not a definition.
1959 (cp_parser_member_declaration): Likewise.
1960
1961 2021-05-12 Marek Polacek <polacek@redhat.com>
1962
1963 * pt.c (tsubst_copy_and_build): Add warn_int_in_bool_context
1964 sentinel.
1965
1966 2021-05-12 Marcel Vollweiler <marcel@codesourcery.com>
1967
1968 * parser.c (cp_parser_omp_clause_map): Support map-type-modifier
1969 'close'.
1970
1971 2021-05-11 Jason Merrill <jason@redhat.com>
1972
1973 PR c++/100517
1974 * typeck.c (build_reinterpret_cast_1): Check intype on
1975 cast to vector.
1976
1977 2021-05-11 Patrick Palka <ppalka@redhat.com>
1978
1979 PR c++/51577
1980 * name-lookup.c (maybe_save_operator_binding): Unconditionally
1981 enable for all function templates, not just generic lambdas.
1982 Handle compound-assignment operator expressions.
1983 * typeck.c (build_x_compound_expr): Call maybe_save_operator_binding
1984 in the type-dependent case.
1985 (build_x_modify_expr): Likewise. Move declaration of 'op' closer
1986 to its first use.
1987
1988 2021-05-11 Patrick Palka <ppalka@redhat.com>
1989
1990 PR c++/100138
1991 * constraint.cc (tsubst_constraint): Set up cp_unevaluated.
1992 (satisfy_atom): Set up iloc_sentinel before calling
1993 cxx_constant_value.
1994 * pt.c (tsubst_pack_expansion): When returning a rebuilt pack
1995 expansion, carry over PACK_EXPANSION_LOCAL_P and
1996 PACK_EXPANSION_SIZEOF_P from the original pack expansion.
1997
1998 2021-05-10 Richard Biener <rguenther@suse.de>
1999
2000 PR middle-end/100464
2001 PR c++/100468
2002 * call.c (set_up_extended_ref_temp): Mark the temporary
2003 addressable if the TARGET_EXPR was.
2004
2005 2021-05-10 Martin Liska <mliska@suse.cz>
2006
2007 * decl.c (duplicate_decls): Use startswith
2008 function instead of strncmp.
2009 (cxx_builtin_function): Likewise.
2010 (omp_declare_variant_finalize_one): Likewise.
2011 (grokfndecl): Likewise.
2012 * error.c (dump_decl_name): Likewise.
2013 * mangle.c (find_decomp_unqualified_name): Likewise.
2014 (write_guarded_var_name): Likewise.
2015 (decl_tls_wrapper_p): Likewise.
2016 * parser.c (cp_parser_simple_type_specifier): Likewise.
2017 (cp_parser_tx_qualifier_opt): Likewise.
2018 * pt.c (template_parm_object_p): Likewise.
2019 (dguide_name_p): Likewise.
2020
2021 2021-05-10 Martin Liska <mliska@suse.cz>
2022
2023 PR c++/99616
2024 * decl.c (grokdeclarator): Remove redundant NULL check.
2025
2026 2021-05-07 Jason Merrill <jason@redhat.com>
2027
2028 * tree.c (rvalue): Assert expr is not a class lvalue.
2029
2030 2021-05-07 Jason Merrill <jason@redhat.com>
2031
2032 * cp-tree.h (build_stub_object): Declare.
2033 * method.c (build_stub_object): No longer static.
2034 * call.c (can_convert): Use it.
2035 * tree.c (build_dummy_object): Adjust comment.
2036 * typeck.c (cp_build_binary_op): Wrap SPACESHIP_EXPR in a
2037 TARGET_EXPR.
2038
2039 2021-05-07 Jason Merrill <jason@redhat.com>
2040
2041 * coroutines.cc (build_co_await): Don't call 'rvalue'.
2042 (flatten_await_stmt): Simplify initialization.
2043 (morph_fn_to_coro): Change 'rvalue' to 'move'. Simplify.
2044
2045 2021-05-04 Tobias Burnus <tobias@codesourcery.com>
2046
2047 * semantics.c (finish_omp_reduction_clause): Accept float + complex
2048 for || and && reductions.
2049
2050 2021-05-03 Patrick Palka <ppalka@redhat.com>
2051
2052 PR c++/100362
2053 * parser.c (cp_parser_class_head): Reinstate calls to pushclass
2054 and popclass when parsing the base-clause that were removed in
2055 r11-6815.
2056
2057 2021-05-03 Patrick Palka <ppalka@redhat.com>
2058
2059 PR c++/68942
2060 PR c++/100344
2061 * pt.c (tsubst_copy_and_build) <case CALL_EXPR>: Set tf_conv
2062 only when the callee is a FUNCTION_DECL.
2063
2064 2021-05-03 Marek Polacek <polacek@redhat.com>
2065
2066 PR c++/100055
2067 * decl.c (grokfndecl): Check current_template_parms.
2068
2069 2021-05-03 Marek Polacek <polacek@redhat.com>
2070
2071 DR 1312
2072 * constexpr.c (cxx_eval_constant_expression): Don't check
2073 integer_zerop.
2074
2075 2021-05-01 Jason Merrill <jason@redhat.com>
2076
2077 * cp-tree.h (class ovl_iterator): Allow copying. Add op==.
2078 (class ovl_range, class lkp_range): New.
2079 * call.c (build_op_call_1, add_candidates): Use them.
2080 (build_op_delete_call, has_trivial_copy_assign_p): Likewise.
2081 (has_trivial_copy_p): Likewise.
2082 * class.c (handle_using_decl, get_basefndecls): Likewise.
2083 (maybe_warn_about_overly_private_class): Likewise.
2084 (warn_hidden, add_implicitly_declared_members): Likewise.
2085 (check_methods, clone_constructors_and_destructors): Likewise.
2086 (type_has_user_nondefault_constructor): Likewise.
2087
2088 2021-04-29 Jason Merrill <jason@redhat.com>
2089
2090 * constexpr.c (cxx_fold_indirect_ref_1): Only set *empty_base if we
2091 don't find a field.
2092
2093 2021-04-29 Jason Merrill <jason@redhat.com>
2094
2095 PR c++/51344
2096 * decl2.c (grokfield): Call cplus_decl_attributes for friend.
2097 (save_template_attributes): Use chainon.
2098 * friend.c (do_friend): Remove attrlist parm.
2099 * cp-tree.h (do_friend): Adjust.
2100 * class.c (add_implicitly_declared_members): Adjust.
2101 * decl.c (grokdeclarator): Adjust.
2102 * pt.c (apply_late_template_attributes): Optimize.
2103
2104 2021-04-29 Jason Merrill <jason@redhat.com>
2105
2106 PR c++/97974
2107 * class.c (finish_struct_anon_r): Drop complain parm.
2108 Remove non-field diagnostic.
2109 (finish_struct_anon): Adjust.
2110 * decl.c (fixup_anonymous_aggr): Move non-field diagnostic here.
2111
2112 2021-04-29 Jason Merrill <jason@redhat.com>
2113
2114 * cp-tree.h (cp_evaluated): Add reset parm to constructor.
2115 * parser.c (cp_parser_constant_expression): Change
2116 allow_non_constant_p to int. Use cp_evaluated.
2117 (cp_parser_initializer_clause): Pass 2 to allow_non_constant_p.
2118 * semantics.c (finish_id_expression_1): Don't mess with
2119 cp_unevaluated_operand here.
2120
2121 2021-04-29 Jason Merrill <jason@redhat.com>
2122
2123 * cp-tree.h: Clarify comments.
2124 * pt.c (get_template_parm_object): Add assert.
2125 * semantics.c (finish_compound_literal): Clear TREE_HAS_CONSTRUCTOR.
2126 * tree.c (zero_init_expr_p): Check TREE_HAS_CONSTRUCTOR.
2127 * typeck2.c (store_init_value): Likewise.
2128
2129 2021-04-29 Patrick Palka <ppalka@redhat.com>
2130
2131 PR c++/68942
2132 * pt.c (tsubst_copy_and_build) <case CALL_EXPR>: When KOENIG_P,
2133 set tf_conv during the initial substitution into the function.
2134
2135 2021-04-29 Jakub Jelinek <jakub@redhat.com>
2136
2137 PR c++/100319
2138 * semantics.c (finish_omp_clauses): Fix up check that variable
2139 mentioned in detach clause doesn't appear in data-sharing clauses.
2140
2141 2021-04-28 Jakub Jelinek <jakub@redhat.com>
2142
2143 * module.cc: Remove #error that triggers if DEV-PHASE is empty.
2144
2145 2021-04-27 Jason Merrill <jason@redhat.com>
2146
2147 PR c++/92145
2148 * class.c (classtype_has_depr_implicit_copy): Check DECL_CONTEXT
2149 of operator=.
2150
2151 2021-04-27 Patrick Palka <ppalka@redhat.com>
2152
2153 PR c++/88580
2154 * pt.c (tsubst_initializer_list): Correctly handle the case
2155 where an argument inside a base initializer pack expansion is
2156 itself a pack expansion.
2157
2158 2021-04-26 Patrick Palka <ppalka@redhat.com>
2159
2160 PR c++/100209
2161 * constexpr.c (cxx_fold_indirect_ref): Try to canonicalize the
2162 object/offset pair for a POINTER_PLUS_EXPR of a COMPONENT_REF
2163 with a negative offset into one whose offset is nonnegative
2164 before calling cxx_fold_indirect_ref_1.
2165
2166 2021-04-24 Patrick Palka <ppalka@redhat.com>
2167
2168 PR c++/89565
2169 PR c++/93383
2170 PR c++/95291
2171 PR c++/99200
2172 PR c++/99683
2173 * pt.c (do_class_deduction): Punt if the initializer is
2174 type-dependent.
2175
2176 2021-04-24 Patrick Palka <ppalka@redhat.com>
2177
2178 PR c++/87709
2179 * parser.c (cp_parser_type_id_1): If we see a template
2180 placeholder, first try simulating an error before issuing
2181 a real error.
2182
2183 2021-04-23 Patrick Palka <ppalka@redhat.com>
2184
2185 PR c++/98767
2186 * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause):
2187 Adjust parameter list loop to iterate over 'types' instead of
2188 'args'. Output the trailing '...' for a variadic function.
2189 Remove PARM_DECL support.
2190 (pp_cxx_requires_expr): Pretty print the parameter list directly
2191 instead of going through pp_cxx_parameter_declaration_clause.
2192
2193 2021-04-23 Patrick Palka <ppalka@redhat.com>
2194
2195 DR 2374
2196 * decl.c (is_direct_enum_init): Check the implicit
2197 convertibility requirement added by CWG 2374.
2198
2199 2021-04-23 Martin Liska <mliska@suse.cz>
2200
2201 * cp-tree.h (STATIC_ASSERT): Prefer static assert.
2202 * lex.c (init_operators): Remove run-time check.
2203
2204 2021-04-22 Marek Polacek <polacek@redhat.com>
2205
2206 PR c++/100161
2207 * pt.c (tsubst_copy_and_build) <case PLUS_EXPR>: Test op0 and
2208 op1 separately for value- or type-dependence.
2209
2210 2021-04-21 Marek Polacek <polacek@redhat.com>
2211
2212 PR c++/96380
2213 * parser.c (cp_parser_enum_specifier): Don't allow defining
2214 types in enum-base.
2215
2216 2021-04-21 Martin Liska <mliska@suse.cz>
2217
2218 Revert:
2219 2021-04-21 Martin Liska <mliska@suse.cz>
2220
2221 * error.c (dump_decl): Use flags in dump_generic_node call.
2222
2223 2021-04-21 Martin Liska <mliska@suse.cz>
2224
2225 * error.c (dump_decl): Use flags in dump_generic_node call.
2226
2227 2021-04-21 Martin Liska <mliska@suse.cz>
2228
2229 * error.c (dump_decl): Support anonymous labels.
2230
2231 2021-04-20 Jason Merrill <jason@redhat.com>
2232
2233 PR c++/100109
2234 * pt.c (find_parameter_packs_r): Look into enum initializers.
2235
2236 2021-04-19 Marek Polacek <polacek@redhat.com>
2237
2238 PR c++/97536
2239 * decl.c (grokvardecl): Given an error when a concept is not defined
2240 at namespace scope.
2241
2242 2021-04-16 Jakub Jelinek <jakub@redhat.com>
2243
2244 PR c++/100111
2245 * constexpr.c (cxx_eval_store_expression): Don't add CONSTRUCTORs
2246 for empty classes into *valp when types don't match even when *valp
2247 is NULL.
2248
2249 2021-04-16 Marek Polacek <polacek@redhat.com>
2250
2251 PR c++/99803
2252 * decl.c (make_typename_type): Give an error and return when
2253 name is is_overloaded_fn.
2254 * parser.c (cp_parser_class_name): Don't check is_overloaded_fn
2255 before calling make_typename_type.
2256
2257 2021-04-16 Patrick Palka <ppalka@redhat.com>
2258
2259 PR c++/99700
2260 * constexpr.c (reduced_constant_expression_p): For array
2261 CONSTRUCTORs, use a dedicated loop that additionally verifies
2262 the CONSTRUCTOR spans the entire array.
2263
2264 2021-04-16 Jakub Jelinek <jakub@redhat.com>
2265
2266 PR c++/99850
2267 * parser.c (cp_parser_constraint_requires_parens) <case CPP_DEREF>:
2268 If lambda_p, return pce_ok instead of pce_maybe_postfix.
2269
2270 2021-04-16 Jakub Jelinek <jakub@redhat.com>
2271
2272 PR c++/99833
2273 * pt.c (extract_locals_r): When handling DECL_EXPR of a structured
2274 binding, add to data.internal also all corresponding structured
2275 binding decls.
2276
2277 2021-04-16 Jason Merrill <jason@redhat.com>
2278
2279 PR c++/100079
2280 * cp-tree.h (first_field): Declare.
2281 * mangle.c (range_expr_nelts): New.
2282 (write_expression): Improve class NTTP mangling.
2283 * pt.c (get_template_parm_object): Clear TREE_HAS_CONSTRUCTOR.
2284 * tree.c (zero_init_expr_p): Improve class NTTP handling.
2285 * decl.c: Adjust comment.
2286
2287 2021-04-15 Jason Merrill <jason@redhat.com>
2288
2289 PR c++/80456
2290 * call.c (build_new_method_call_1): Check again for side-effects
2291 with a volatile object.
2292
2293 2021-04-15 Jason Merrill <jason@redhat.com>
2294
2295 PR c++/100101
2296 PR c++/99583
2297 * pt.c (find_parameter_packs_r) [FUNCTION_TYPE]: Walk into
2298 TYPE_RAISES_EXCEPTIONS here.
2299 * tree.c (cp_walk_subtrees): Not here.
2300
2301 2021-04-15 Jason Merrill <jason@redhat.com>
2302
2303 PR c++/100091
2304 PR c++/99478
2305 * parser.c (cp_parser_default_type_template_argument): Set
2306 parser->local_variables_forbidden_p.
2307
2308 2021-04-15 Richard Sandiford <richard.sandiford@arm.com>
2309
2310 PR c++/98852
2311 * typeck.c (merge_type_attributes_from): New function.
2312 (cp_common_type): Use it for vector types.
2313
2314 2021-04-14 Jason Merrill <jason@redhat.com>
2315
2316 PR c++/100078
2317 PR c++/93085
2318 * pt.c (uses_outer_template_parms): Also look at default
2319 template argument.
2320
2321 2021-04-14 Jason Merrill <jason@redhat.com>
2322
2323 PR c++/93314
2324 * semantics.c (finish_id_expression_1): Clear cp_unevaluated_operand
2325 for a non-static data member in a constant-expression.
2326
2327 2021-04-14 Patrick Palka <ppalka@redhat.com>
2328
2329 PR c++/83476
2330 PR c++/99885
2331 * pt.c (deducible_expression): Look through implicit
2332 INDIRECT_REFs as well.
2333
2334 2021-04-14 Jason Merrill <jason@redhat.com>
2335
2336 PR c++/99478
2337 * parser.c (cp_parser_lambda_expression): Reject lambda
2338 in template parameter type.
2339
2340 2021-04-14 Jason Merrill <jason@redhat.com>
2341
2342 PR c++/90674
2343 * decl.c (duplicate_decls): Don't propagate
2344 DECL_INITIALIZED_IN_CLASS_P to a specialization.
2345
2346 2021-04-14 Jason Merrill <jason@redhat.com>
2347
2348 PR c++/88742
2349 PR c++/49951
2350 PR c++/58123
2351 * semantics.c (set_cleanup_locs): New.
2352 (do_poplevel): Call it.
2353 * parser.c (cp_parser_compound_statement): Consume the }
2354 before finish_compound_stmt.
2355
2356 2021-04-13 Jason Merrill <jason@redhat.com>
2357
2358 PR c++/100032
2359 * pt.c (get_underlying_template): Compare TYPE_QUALS.
2360
2361 2021-04-13 Jason Merrill <jason@redhat.com>
2362
2363 PR c++/100054
2364 PR c++/90479
2365 * init.c (get_nsdmi): Do more context adjustment for local classes.
2366
2367 2021-04-13 Patrick Palka <ppalka@redhat.com>
2368
2369 PR c++/99008
2370 * pt.c (do_class_deduction): Reject alias CTAD in C++17 mode
2371 rather than issuing a pedwarn.
2372 * typeck2.c (build_functional_cast_1): Handle CTAD uniformly
2373 for consistent diagnostics.
2374
2375 2021-04-13 Jason Merrill <jason@redhat.com>
2376
2377 PR c++/91933
2378 * class.c (build_base_path): Shortcut simple non-pointer case.
2379
2380 2021-04-13 Eric Botcazou <ebotcazou@adacore.com>
2381
2382 * module.cc (ordinary_loc_of): Test LINEMAPS_MACRO_LOWEST_LOCATION
2383 of the linemap.
2384 (module_state::write_location): Likewise.
2385
2386 2021-04-13 Patrick Palka <ppalka@redhat.com>
2387
2388 PR c++/97134
2389 * pt.c (do_class_deduction): Look through EXPR_PACK_EXPANSION
2390 when checking if the initializer is an equivalent class
2391 placeholder template parameter.
2392
2393 2021-04-13 Patrick Palka <ppalka@redhat.com>
2394
2395 PR c++/99961
2396 PR c++/99994
2397 * constraint.cc (satisfy_normalized_constraints): Set
2398 cp_unevaluated.
2399 * parser.c (cp_parser_concept_definition): Likewise.
2400 (cp_parser_requires_clause_opt): Likewise.
2401
2402 2021-04-12 Jason Merrill <jason@redhat.com>
2403
2404 PR c++/93085
2405 * pt.c (uses_outer_template_parms): Handle non-type and template
2406 template parameters specifically.
2407
2408 2021-04-11 Jason Merrill <jason@redhat.com>
2409
2410 PR c++/97974
2411 * decl.c (fixup_anonymous_aggr): Prune all functions from
2412 CLASSTYPE_MEMBER_VEC.
2413
2414 2021-04-10 Jason Merrill <jason@redhat.com>
2415
2416 PR c++/98800
2417 PR c++/97399
2418 * parser.c (cp_parser_direct_declarator): Don't
2419 inject_this_parameter if static_p.
2420 (cp_parser_omp_var_list_no_open): Parse 'this' even if
2421 current_class_ptr isn't set for a better diagnostic.
2422
2423 2021-04-10 Jason Merrill <jason@redhat.com>
2424
2425 PR c++/99180
2426 PR c++/93295
2427 PR c++/93867
2428 PR c++/99118
2429 PR c++/96873
2430 * pt.c (alias_ctad_tweaks): Handle failure better.
2431
2432 2021-04-10 Jason Merrill <jason@redhat.com>
2433
2434 PR c++/100006
2435 * pt.c (find_parameter_packs_r) [TAG_DEFN]: Look into bases.
2436
2437 2021-04-09 Patrick Palka <ppalka@redhat.com>
2438
2439 * cp-tree.h (LAMBDA_EXPR_REGENERATED_FROM)
2440 (LAMBDA_EXPR_REGENERATING_TARGS): Replace these with ...
2441 (LAMBDA_EXPR_REGEN_INFO): ... this.
2442 (tree_lambda_expr::regenerated_from)
2443 (tree_lambda_expr::regenerating_targs): Replace these with ...
2444 (tree_lambda_expr::regen_info): ... this.
2445 * constraint.cc (satisfy_declaration_constraints): Adjust
2446 accordingly.
2447 * lambda.c (build_lambda_expr): Likewise.
2448 * pt.c (regenerated_lambda_fn_p): Likewise.
2449 (most_general_lambda): Likewise.
2450 (tsubst_lambda_expr): Likewise.
2451
2452 2021-04-09 Marek Polacek <polacek@redhat.com>
2453
2454 PR c++/99806
2455 * parser.c (cp_parser_member_declaration): Call
2456 cp_parser_save_default_args even for function templates. Use
2457 STRIP_TEMPLATE on the declaration we're passing.
2458
2459 2021-04-08 Patrick Palka <ppalka@redhat.com>
2460
2461 PR c++/99874
2462 * constraint.cc (get_normalized_constraints_from_decl): Handle
2463 regenerated lambdas.
2464 (satisfy_declaration_constraints): Likewise. Check for
2465 dependent args later.
2466 * cp-tree.h (LAMBDA_EXPR_INSTANTIATED): Replace with ...
2467 (LAMBDA_EXPR_REGENERATED_FROM): ... this.
2468 (LAMBDA_EXPR_REGENERATING_TARGS): New.
2469 (tree_lambda_expr::regenerated_from): New data member.
2470 (tree_lambda_expr::regenerating_targs): New data member.
2471 (add_to_template_args): Declare.
2472 (regenerated_lambda_fn_p): Likewise.
2473 (most_general_lambda): Likewise.
2474 * lambda.c (build_lambda_expr): Set LAMBDA_EXPR_REGENERATED_FROM
2475 and LAMBDA_EXPR_REGENERATING_TARGS.
2476 * pt.c (add_to_template_args): No longer static.
2477 (tsubst_function_decl): Unconditionally propagate constraints on
2478 the substituted function decl.
2479 (instantiated_lambda_fn_p): Rename to ...
2480 (regenerated_lambda_fn_p): ... this. Check
2481 LAMBDA_EXPR_REGENERATED_FROM instead of
2482 LAMBDA_EXPR_INSTANTIATED.
2483 (most_general_lambda): Define.
2484 (enclosing_instantiation_of): Adjust after renaming
2485 instantiated_lambda_fn_p.
2486 (tsubst_lambda_expr): Don't set LAMBDA_EXPR_INSTANTIATED. Set
2487 LAMBDA_EXPR_REGENERATED_FROM and LAMBDA_EXPR_REGENERATING_TARGS.
2488 Don't substitute or set constraints on the regenerated lambda.
2489
2490 2021-04-08 Patrick Palka <ppalka@redhat.com>
2491
2492 PR c++/97679
2493 * pt.c (build_deduction_guide): Document OUTER_ARGS. Substitute
2494 them into the propagated constraints.
2495
2496 2021-04-08 Jason Merrill <jason@redhat.com>
2497
2498 PR c++/91849
2499 * call.c (convert_like_internal): Improve reference diagnostic.
2500
2501 2021-04-08 Jakub Jelinek <jakub@redhat.com>
2502
2503 PR c++/99859
2504 * constexpr.c (addr_of_non_const_var): New function.
2505 (cxx_bind_parameters_in_call): Set *non_constant_args to true
2506 even if cp_walk_tree on arg with addr_of_non_const_var callback
2507 returns true.
2508
2509 2021-04-08 Jason Merrill <jason@redhat.com>
2510
2511 PR c++/94529
2512 * pt.c (determine_specialization): Improve diagnostic.
2513
2514 2021-04-08 Marek Polacek <polacek@redhat.com>
2515
2516 PR c++/99844
2517 * decl.c (build_explicit_specifier): Call
2518 check_for_bare_parameter_packs.
2519 * except.c (build_noexcept_spec): Likewise.
2520
2521 2021-04-07 Jason Merrill <jason@redhat.com>
2522
2523 PR c++/41723
2524 * parser.c (cp_parser_class_name): Check dependent_scope_p.
2525
2526 2021-04-07 Jason Merrill <jason@redhat.com>
2527
2528 PR c++/52625
2529 * pt.c (maybe_process_partial_specialization): Check
2530 DECL_SELF_REFERENCE_P.
2531
2532 2021-04-07 Jason Merrill <jason@redhat.com>
2533
2534 PR c++/92918
2535 * name-lookup.c (push_class_level_binding_1): Do overload a new
2536 function with a previous using-declaration.
2537
2538 2021-04-06 Jason Merrill <jason@redhat.com>
2539
2540 PR c++/96673
2541 * init.c (get_nsdmi): Don't defer access checking.
2542
2543 2021-04-06 Jason Merrill <jason@redhat.com>
2544
2545 PR c++/99901
2546 * decl.c (cp_finish_decl): mark_needed an implicitly inline
2547 static data member with an out-of-class redeclaration.
2548
2549 2021-04-06 Jason Merrill <jason@redhat.com>
2550
2551 PR c++/91241
2552 * mangle.c (write_compact_number): Add sanity check.
2553 (write_local_name): Use list_length for parm number.
2554
2555 2021-04-06 Patrick Palka <ppalka@redhat.com>
2556
2557 PR c++/99899
2558 * pt.c (do_auto_deduction): Don't exit early when deducing the
2559 array type of a structured binding. Also handle adc_decomp_type
2560 during constraint checking.
2561
2562 2021-04-05 Jason Merrill <jason@redhat.com>
2563
2564 PR c++/96311
2565 * typeck.c (check_return_expr): Call mark_exp_read in dependent
2566 case.
2567
2568 2021-04-05 Jason Merrill <jason@redhat.com>
2569
2570 PR c++/98440
2571 * typeck.c (build_reinterpret_cast_1): Don't perform
2572 temporary materialization.
2573
2574 2021-04-05 Jason Merrill <jason@redhat.com>
2575
2576 PR c++/95317
2577 * pt.c (lookup_template_class_1): Do tsubst_enum when
2578 tsubsting a generic lambda.
2579
2580 2021-04-05 Jason Merrill <jason@redhat.com>
2581
2582 PR c++/95870
2583 * pt.c (enclosing_instantiation_of): Compare DECL_SOURCE_LOCATION if
2584 there is no enclosing non-lambda function.
2585
2586 2021-04-05 Nathan Sidwell <nathan@acm.org>
2587
2588 PR c++/99380
2589 * module.cc (name_pending_imports): Drop 'atend' parm. Don't
2590 query export when not needed.
2591 (preprocess_module, preprocessed_module): Adjust.
2592
2593 2021-04-05 Jason Merrill <jason@redhat.com>
2594
2595 PR c++/99066
2596 * pt.c (mark_decl_instantiated): Set DECL_EXTERNAL.
2597
2598 2021-04-05 Jason Merrill <jason@redhat.com>
2599
2600 PR c++/99201
2601 * pt.c (class el_data): Add visited field.
2602 (extract_local_specs): Pass it to cp_walk_tree.
2603 (extract_locals_r): Walk into the body of a lambda.
2604
2605 2021-04-05 Jason Merrill <jason@redhat.com>
2606
2607 * ptree.c (cxx_print_decl): Check DECL_MODULE_IMPORT_P on
2608 template result.
2609
2610 2021-04-04 Jason Merrill <jason@redhat.com>
2611
2612 PR c++/99643
2613 * typeck2.c (massage_init_elt): Don't strip TARGET_EXPR.
2614
2615 2021-04-03 Marek Polacek <polacek@redhat.com>
2616
2617 PR c++/91416
2618 * parser.c: Create a GC root for attributes in a decl specifier.
2619 (cp_parser_type_specifier): Push/pop ->attributes onto/from it.
2620
2621 2021-04-03 Jason Merrill <jason@redhat.com>
2622
2623 PR c++/91217
2624 * pt.c (tsubst_lambda_expr): Skip the body block from
2625 DECL_SAVED_TREE.
2626
2627 2021-04-03 Jason Merrill <jason@redhat.com>
2628
2629 PR c++/90664
2630 * cvt.c (can_convert_qual): Check fnptr_conv_p.
2631
2632 2021-04-03 Jason Merrill <jason@redhat.com>
2633
2634 PR c++/97900
2635 * pt.c (regenerate_decl_from_template): tsubst_decl
2636 the parms.
2637
2638 2021-04-02 Patrick Palka <ppalka@redhat.com>
2639
2640 PR c++/99869
2641 * parser.c (do_range_for_auto_deduction): Pass adc_variable_type
2642 to do_auto_deduction.
2643
2644 2021-04-02 Patrick Palka <ppalka@redhat.com>
2645
2646 PR c++/99586
2647 * semantics.c (finish_compound_literal): Check
2648 template_placeholder_p instead of type_uses_auto.
2649
2650 2021-04-02 Jason Merrill <jason@redhat.com>
2651
2652 PR c++/97938
2653 * cp-tree.h (PACK_EXPANSION_AUTO_P): New.
2654 * lambda.c (add_capture): Set it.
2655 * pt.c (tsubst_pack_expansion): Handle it.
2656
2657 2021-04-02 Nathan Sidwell <nathan@acm.org>
2658
2659 * cp-tree.h (lang_decl_base): Correct module flag comment.
2660 * module.cc (trees_in::assert_definition): Break out
2661 not_tmpl var.
2662 (trees_out::lang_decl_bools): Do not write purview for header units.
2663
2664 2021-04-01 Marek Polacek <polacek@redhat.com>
2665
2666 PR c++/99831
2667 * method.c (defaulted_late_check): ++ and -- function_depth around
2668 the call to synthesize_method.
2669 * pt.c: Remove the saved_trees global.
2670
2671 2021-04-01 Jason Merrill <jason@redhat.com>
2672
2673 PR c++/99583
2674 PR c++/99584
2675 * tree.c (cp_walk_subtrees) [FUNCTION_TYPE]: Walk into
2676 TYPE_RAISES_EXCEPTIONS.
2677
2678 2021-04-01 Iain Sandoe <iain@sandoe.co.uk>
2679
2680 * mapper-client.cc (INCLUDE_MAP): New; require map to be
2681 included from system.h.
2682 * mapper-resolver.cc (INCLUDE_MAP): Likewise.
2683
2684 2021-04-01 Jason Merrill <jason@redhat.com>
2685
2686 PR c++/98481
2687 * mangle.c (write_expression): Adjust.
2688 * class.c (find_abi_tags_r): Disable PR98481 fix for ABI v14.
2689 (mark_abi_tags_r): Likewise.
2690
2691 2021-04-01 Nathan Sidwell <nathan@acm.org>
2692
2693 PR c++/99283
2694 * module.cc (trees_out::decl_node): Adjust importedness reference
2695 assert.
2696 (module_state::intercluster_seed): New. Seed both imports and
2697 inter-cluster references. Broken out of ...
2698 (module_state::write_cluster): ... here. Call it.
2699
2700 2021-03-31 Jason Merrill <jason@redhat.com>
2701
2702 PR c++/99445
2703 * tree.c (strip_typedefs): Handle TYPE_PACK_EXPANSION.
2704
2705 2021-03-31 Patrick Palka <ppalka@redhat.com>
2706
2707 PR c++/88115
2708 * mangle.c (write_expression): Adjust the mangling of
2709 __alignof__.
2710
2711 2021-03-31 Patrick Palka <ppalka@redhat.com>
2712
2713 PR c++/99815
2714 * pt.c (placeholder_type_constraint_dependent_p): Expand
2715 argument packs to separate the first non-pack argument
2716 from the rest.
2717
2718 2021-03-30 Nathan Sidwell <nathan@acm.org>
2719
2720 PR c++/99283
2721 * module.cc (dumper::operator): Make less brittle.
2722 (trees_out::core_bools): VAR_DECLs always have a context.
2723 (trees_out::key_mergeable): Use same_type_p for asserting.
2724 (trees_in::read_var_def): Propagate
2725 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
2726
2727 2021-03-30 Jakub Jelinek <jakub@redhat.com>
2728
2729 PR c++/99790
2730 * cp-gimplify.c (cp_gimplify_expr): Handle PTRMEM_CST.
2731
2732 2021-03-26 Marek Polacek <polacek@redhat.com>
2733
2734 PR c++/98352
2735 * method.c (implicitly_declare_fn): Pass &raises to
2736 synthesized_method_walk.
2737
2738 2021-03-26 Nathan Sidwell <nathan@acm.org>
2739
2740 PR c++/99283
2741 * cp-tree.h (DECL_MODULE_CHECK): Ban TEMPLATE_DECL.
2742 (SET_TYPE_TEMPLATE_INFO): Restore Alias template setting.
2743 * decl.c (duplicate_decls): Remove template_decl module flag
2744 propagation.
2745 * module.cc (merge_kind_name): Add alias tmpl spec as a thing.
2746 (dumper::impl::nested_name): Adjust for template-decl module flag
2747 change.
2748 (trees_in::assert_definition): Likewise.
2749 (trees_in::install_entity): Likewise.
2750 (trees_out::decl_value): Likewise. Remove alias template
2751 separation of template and type_decl.
2752 (trees_in::decl_value): Likewise.
2753 (trees_out::key_mergeable): Likewise,
2754 (trees_in::key_mergeable): Likewise.
2755 (trees_out::decl_node): Adjust for template-decl module flag
2756 change.
2757 (depset::hash::make_dependency): Likewise.
2758 (get_originating_module, module_may_redeclare): Likewise.
2759 (set_instantiating_module, set_defining_module): Likewise.
2760 * name-lookup.c (name_lookup::search_adl): Likewise.
2761 (do_pushdecl): Likewise.
2762 * pt.c (build_template_decl): Likewise.
2763 (lookup_template_class_1): Remove special alias_template handling
2764 of DECL_TI_TEMPLATE.
2765 (tsubst_template_decl): Likewise.
2766
2767 2021-03-26 Jakub Jelinek <jakub@redhat.com>
2768
2769 PR c++/99705
2770 * tree.c (bot_manip): Remap artificial automatic temporaries mentioned
2771 in DECL_EXPR or in BIND_EXPR_VARS.
2772
2773 2021-03-25 Jakub Jelinek <jakub@redhat.com>
2774
2775 PR c++/99672
2776 * parser.c (cp_parser_postfix_expression): For calls, create
2777 combined_loc and temporarily set input_location to it before
2778 calling finish_call_expr.
2779
2780 2021-03-25 Marek Polacek <polacek@redhat.com>
2781
2782 PR c++/94751
2783 * call.c (build_over_call): Maybe call mark_used in case
2784 deduce_inheriting_ctor fails and return error_mark_node.
2785 * cp-tree.h (deduce_inheriting_ctor): Adjust declaration.
2786 * method.c (deduce_inheriting_ctor): Return bool if the deduction
2787 fails.
2788 (implicitly_declare_fn): If raises is error_mark_node, call
2789 synthesized_method_walk with diag being true.
2790
2791 2021-03-25 Jakub Jelinek <jakub@redhat.com>
2792
2793 PR c++/99745
2794 * decl2.c (grokbitfield): Diagnose bitfields containing bare parameter
2795 packs and don't set DECL_BIT_FIELD_REPRESENTATIVE in that case.
2796
2797 2021-03-25 Marek Polacek <polacek@redhat.com>
2798
2799 PR c++/99331
2800 * call.c (build_converted_constant_expr_internal): Don't emit
2801 -Wconversion warnings.
2802
2803 2021-03-25 Jakub Jelinek <jakub@redhat.com>
2804
2805 PR c++/99565
2806 * call.c (build_conditional_expr_1): Pass OEP_ADDRESS_OF_SAME_FIELD
2807 to operand_equal_p.
2808 * cvt.c (convert_to_void): Preserve location_t on COND_EXPR or
2809 or COMPOUND_EXPR.
2810
2811 2021-03-23 Nathan Sidwell <nathan@acm.org>
2812
2813 PR c++/99283
2814 * name-lookup.c (check_module_override): Set global or partition
2815 DUP on the binding vector.
2816
2817 2021-03-23 Marek Polacek <polacek@redhat.com>
2818
2819 PR c++/99318
2820 * decl2.c (cp_warn_deprecated_use_scopes): Only call
2821 cp_warn_deprecated_use when decl is a namespace, class, or enum.
2822
2823 2021-03-23 Nathan Sidwell <nathan@acm.org>
2824
2825 PR c++/99239
2826 * decl.c (duplicate_decls): Remove assert about maybe-imported
2827 artificial decls.
2828
2829 2021-03-23 Jakub Jelinek <jakub@redhat.com>
2830
2831 PR c++/99650
2832 * decl.c (cp_finish_decomp): Diagnose void initializers when
2833 using tuple_element and get.
2834
2835 2021-03-22 Nathan Sidwell <nathan@acm.org>
2836
2837 PR c++/99480
2838 * module.cc (depset::hash::make_dependency): Propagate flags for
2839 partial specialization.
2840 (module_may_redeclare): Handle partial specialization.
2841
2842 2021-03-22 Nathan Sidwell <nathan@acm.org>
2843
2844 PR c++/99425
2845 * cp-tree.h (map_context_from, map_context_to): Delete.
2846 (add_mergeable_specialization): Add is_alias parm.
2847 * pt.c (add_mergeable_specialization): Add is_alias parm, add them.
2848 * module.cc (map_context_from, map_context_to): Delete.
2849 (trees_in::decl_value): Add specializations later, adjust call.
2850 Drop useless alias lookup. Set duplicate fn parm context.
2851 (check_mergeable_decl): Drop context mapping.
2852 (trees_in::is_matching_decl): Likewise.
2853 (trees_in::read_function_def): Drop parameter context adjustment
2854 here.
2855
2856 2021-03-22 Martin Liska <mliska@suse.cz>
2857
2858 PR c++/99687
2859 * module.cc (fini_modules): Call vec_free instead of delete.
2860
2861 2021-03-20 Jakub Jelinek <jakub@redhat.com>
2862
2863 PR debug/99230
2864 * cp-gimplify.c (cp_genericize_r) <case STATEMENT_LIST>: Remove
2865 special code, instead call c_genericize_control_stmt.
2866
2867 2021-03-19 Jakub Jelinek <jakub@redhat.com>
2868
2869 PR c++/99456
2870 * constexpr.c (cxx_eval_constant_expression): For CONVERT_EXPR from
2871 INDIRECT_TYPE_P to ARITHMETIC_TYPE_P, when !ctx->manifestly_const_eval
2872 don't diagnose it, set *non_constant_p nor return t.
2873
2874 2021-03-19 Marek Polacek <polacek@redhat.com>
2875
2876 PR c++/99500
2877 * parser.c (cp_parser_requirement_parameter_list): Handle
2878 error_mark_node.
2879
2880 2021-03-18 Marek Polacek <polacek@redhat.com>
2881
2882 * pt.c (tsubst_copy_and_build) <case FLOAT_EXPR>: Remove.
2883
2884 2021-03-18 Marek Polacek <polacek@redhat.com>
2885
2886 * pt.c (tsubst_copy_and_build): Add assert.
2887
2888 2021-03-18 Iain Sandoe <iain@sandoe.co.uk>
2889
2890 PR objc++/49070
2891 * parser.c (cp_debug_parser): Add Objective-C++ message
2892 state flag.
2893 (cp_parser_nested_name_specifier_opt): Allow colon to
2894 terminate an assignment-expression when parsing Objective-
2895 C++ messages.
2896 (cp_parser_objc_message_expression): Set and clear message
2897 parsing state on entry and exit.
2898 * parser.h (struct cp_parser): Add a context flag for
2899 Objective-C++ message state.
2900
2901 2021-03-18 Martin Liska <mliska@suse.cz>
2902
2903 PR c++/99617
2904 * coroutines.cc (struct var_nest_node): Init then_cl and else_cl
2905 to NULL.
2906
2907 2021-03-17 Marek Polacek <polacek@redhat.com>
2908
2909 PR c++/97973
2910 * call.c (conv_unsafe_in_template_p): New.
2911 (convert_like): Use it.
2912
2913 2021-03-17 Anthony Sharp <anthonysharp15@gmail.com>
2914 Jason Merrill <jason@redhat.com>
2915
2916 * semantics.c (get_class_access_diagnostic_decl): New
2917 function that examines special cases when a parent
2918 class causes a private access failure.
2919 (enforce_access): Slightly modified to call function
2920 above.
2921
2922 2021-03-16 Jason Merrill <jason@redhat.com>
2923
2924 * tree.c (cp_tree_equal): Use real_identical.
2925
2926 2021-03-16 Jakub Jelinek <jakub@redhat.com>
2927
2928 PR c++/99613
2929 * decl.c (expand_static_init): For thread guards, call __cxa_atexit
2930 before calling __cxa_guard_release rather than after it. Formatting
2931 fixes.
2932
2933 2021-03-16 Martin Liska <mliska@suse.cz>
2934 Jason Merrill <jason@redhat.com>
2935
2936 PR c++/99108
2937 * call.c (get_function_version_dispatcher): Handle
2938 DECL_LOCAL_DECL_P.
2939 * decl.c (maybe_version_functions): Likewise.
2940 (maybe_mark_function_versioned): New.
2941 * name-lookup.c (push_local_extern_decl_alias): No longer static.
2942 * name-lookup.h (push_local_extern_decl_alias): Adjust.
2943
2944 2021-03-16 Nathan Sidwell <nathan@acm.org>
2945
2946 PR c++/99496
2947 * module.cc (trees_out::decl_value): Adjust typedef streaming,
2948 indicate whether it is a dependent alias.
2949 (trees_in::decl_value): Likewise. Set as dependent alias, if it
2950 is one.
2951
2952 2021-03-15 Iain Sandoe <iain@sandoe.co.uk>
2953
2954 PR c++/99047
2955 * coroutines.cc (expand_one_await_expression): If the
2956 await_ready() expression is not a boolean then convert it
2957 as required.
2958
2959 2021-03-15 Iain Sandoe <iain@sandoe.co.uk>
2960
2961 PR c++/98704
2962 * coroutines.cc (build_actor_fn): Make destroy index 1
2963 correspond to the abnormal unhandled_exception() exit.
2964 Substitute the proxy for the resume index.
2965 (coro_rewrite_function_body): Arrange to reset the resume
2966 index and make done = true for a rethrown exception from
2967 unhandled_exception ().
2968 (morph_fn_to_coro): Adjust calls to build_actor_fn and
2969 coro_rewrite_function_body.
2970
2971 2021-03-15 Iain Sandoe <iain@sandoe.co.uk>
2972
2973 PR c++/98480
2974 * coroutines.cc (replace_continue): Rewrite continue into
2975 'goto label'.
2976 (await_statement_walker): Handle await expressions in the
2977 initializer, condition and iteration expressions of for
2978 loops.
2979
2980 2021-03-15 Iain Sandoe <iain@sandoe.co.uk>
2981
2982 PR c++/96749
2983 * coroutines.cc (flatten_await_stmt): Allow for the case
2984 where a target expression variable only has uses in the
2985 second part of a compound expression.
2986 (maybe_promote_temps): Avoid emiting empty statements.
2987
2988 2021-03-15 Tobias Burnus <tobias@codesourcery.com>
2989
2990 PR c++/99509
2991 * decl.c (cp_finish_decl): For 'omp declare target implicit' vars,
2992 ensure that the varpool node is marked as offloadable.
2993
2994 2021-03-12 Nathan Sidwell <nathan@acm.org>
2995
2996 PR c++/99238
2997 * module.cc (depset::hash::add_binding_entity): Assert not
2998 visited.
2999 (depset::add::add_specializations): Likewise.
3000 * name-lookup.c (name_lookup::dedup): New.
3001 (name_lookup::~name_lookup): Assert not deduping.
3002 (name_lookup::restore_state): Likewise.
3003 (name_lookup::add_overload): Replace outlined code with dedup
3004 call.
3005 (name_lookup::add_value): Likewise.
3006 (name_lookup::search_namespace_only): Likewise.
3007 (name_lookup::adl_namespace_fns): Likewise.
3008 (name_lookup::adl_class_fns): Likewise.
3009 (name_lookup::search_adl): Likewise. Add clearing dedup call.
3010 (name_lookup::search_qualified): Likewise.
3011 (name_lookup::search_unqualified): Likewise.
3012
3013 2021-03-12 Jakub Jelinek <jakub@redhat.com>
3014
3015 PR c++/99507
3016 * call.c (build_over_call): For immediate evaluation of functions
3017 that return references, undo convert_from_reference effects before
3018 calling cxx_constant_value and call convert_from_reference
3019 afterwards.
3020
3021 2021-03-11 Nathan Sidwell <nathan@acm.org>
3022
3023 PR c++/99248
3024 * name-lookup.c (lookup_elaborated_type_1): Access slot not bind
3025 when there's a binding vector.
3026 * ptree.c (cxx_print_xnode): Lazy flags are no longer a thing.
3027
3028 2021-03-11 Nathan Sidwell <nathan@acm.org>
3029
3030 PR c++/99528
3031 * module.cc (enum merge_kind): Delete MK_type_tmpl_spec,
3032 MK_decl_tmpl_spec.
3033 (trees_in::decl_value): Adjust add_mergeable_specialization call.
3034 (trees_out::get_merge_kind): Adjust detecting a partial template
3035 instantiation.
3036 (trees_out::key_mergeable): Adjust handling same.
3037 (trees_in::key_mergeabvle): Likewise.
3038
3039 2021-03-10 Nathan Sidwell <nathan@acm.org>
3040
3041 PR c++/99423
3042 * module.cc (post_load_processing): Assert not gcable.
3043 (laxy_load_pendings): Extend no-gc region around
3044 post_load_processing.
3045
3046 2021-03-10 Nathan Sidwell <nathan@acm.org>
3047
3048 PR c++/99508
3049 * decl.c (make_rtl_for_nonlocal_decl): Propagate local-extern's
3050 assembler name to the ns alias.
3051
3052 2021-03-09 Jakub Jelinek <jakub@redhat.com>
3053
3054 PR c++/99459
3055 * coroutines.cc (build_co_await): Look through NOP_EXPRs in
3056 build_special_member_call return value to find the CALL_EXPR.
3057 Simplify.
3058
3059 2021-03-09 Nathan Sidwell <nathan@acm.org>
3060
3061 PR c++/99472
3062 * parser.c (cp_parser_diagnose_invalid_type_name): Clarify
3063 that C++20 does not yet imply modules.
3064
3065 2021-03-08 Nathan Sidwell <nathan@acm.org>
3066
3067 PR c++/99436
3068 * name-lookup.c (get_cxx_dialect_name): Add cxx23.
3069
3070 2021-03-08 Nathan Sidwell <nathan@acm.org>
3071
3072 * lex.c (module_token_filter::resume): Ignore module-decls inside
3073 header-unit.
3074 * parser.c (cp_parser_module_declaration): Reject in header-unit.
3075
3076 2021-03-08 Nathan Sidwell <nathan@acm.org>
3077
3078 PR c++/99285
3079 * cp-tree.h (match_mergeable_specialization)
3080 (add_mergeable_specialization): Adjust parms.
3081 * module.cc (trees_in::decl_value): Adjust
3082 add_mergeable_specialization calls.
3083 (trees_out::key_mergeable): Adjust match_mergeable_specialization
3084 calls.
3085 (specialization_add): Likewise.
3086 * pt.c (match_mergeable_specialization): Do not insert.
3087 (add_mergeable_specialization): Add to hash table here.
3088
3089 2021-03-06 Patrick Palka <ppalka@redhat.com>
3090 Jakub Jelinek <jakub@redhat.com>
3091
3092 PR c++/99287
3093 * constexpr.c (cxx_eval_increment_expression): Pass lval when
3094 evaluating the MODIFY_EXPR, and update 'mod' with the result of
3095 this evaluation. Check *non_constant_p afterwards. For prefix
3096 ops, just return 'mod'.
3097
3098 2021-03-06 Patrick Palka <ppalka@redhat.com>
3099 Jakub Jelinek <jakub@redhat.com>
3100
3101 PR c++/96330
3102 * pt.c (tsubst_copy) <case TEMPLATE_ID_EXPR>: Rename local
3103 variable 'fn' to 'tmpl'. Handle a variable template-id by
3104 calling lookup_template_variable.
3105
3106 2021-03-06 Patrick Palka <ppalka@redhat.com>
3107
3108 PR c++/99365
3109 * pt.c (unify) <case TEMPLATE_TYPE_PARM>: Pass targs as
3110 outer_targs to do_auto_deduction.
3111 (placeholder_type_constraint_dependent_p): Define.
3112 (do_auto_deduction): When processing_template_decl != 0
3113 and context is adc_unify and we have constraints, pretend the
3114 constraints are satisfied instead of punting. Otherwise don't
3115 punt unless placeholder_type_constraint_dependent_p holds.
3116 Add some clarifying sanity checks. Add a hack to add missing
3117 outermost template levels to outer_args before checking
3118 satisfaction. Don't substitute outer_targs into type if it's
3119 already been done.
3120
3121 2021-03-05 Marek Polacek <polacek@redhat.com>
3122
3123 PR c++/99374
3124 * call.c (standard_conversion): When converting pointers to
3125 member, don't return NULL when the bases are equivalent but
3126 incomplete.
3127
3128 2021-03-05 Marek Polacek <polacek@redhat.com>
3129
3130 PR c++/99120
3131 * name-lookup.c (check_local_shadow): Check if the type of decl
3132 is non-null before checking TYPE_PTR*.
3133
3134 2021-03-05 Nathan Sidwell <nathan@acm.org>
3135
3136 PR c++/99245
3137 * module.cc (module_state::write_cluster): Relax binding assert.
3138
3139 2021-03-05 Nathan Sidwell <nathan@acm.org>
3140
3141 PR c++/99377
3142 * pt.c (instantiate_decl): Call set_instantiating_module.
3143
3144 2021-03-05 Iain Sandoe <iain@sandoe.co.uk>
3145
3146 PR c++/98118
3147 * coroutines.cc (build_co_await): Use type_build_ctor_call()
3148 to determine cases when a CTOR needs to be built.
3149 (flatten_await_stmt): Likewise.
3150 (morph_fn_to_coro): Likewise.
3151
3152 2021-03-05 Iain Sandoe <iain@sandoe.co.uk>
3153
3154 PR c++/95616
3155 * coroutines.cc (coro_diagnose_throwing_fn): New helper.
3156 (coro_diagnose_throwing_final_aw_expr): New helper.
3157 (build_co_await): Diagnose throwing final await expression
3158 components.
3159 (build_init_or_final_await): Diagnose a throwing promise
3160 final_suspend() call.
3161
3162 2021-03-05 Iain Sandoe <iain@sandoe.co.uk>
3163
3164 PR c++/95615
3165 * coroutines.cc (struct param_info): Track parameter copies that need
3166 a DTOR.
3167 (coro_get_frame_dtor): New helper function factored from build_actor().
3168 (build_actor_fn): Use coro_get_frame_dtor().
3169 (morph_fn_to_coro): Track parameters that need DTORs on exception,
3170 likewise the frame promise and the return object. On exception, run the
3171 DTORs for these, destroy the frame and then rethrow the exception.
3172
3173 2021-03-05 Nathan Sidwell <nathan@acm.org>
3174
3175 PR c++/99389
3176 * pt.c (instantiate_class_template_1): Set instantiating module
3177 here.
3178
3179 2021-03-05 Tobias Burnus <tobias@codesourcery.com>
3180
3181 PR c/99137
3182 * parser.c (cp_parser_oacc_clause_async): Reject comma expressions.
3183
3184 2021-03-04 Jakub Jelinek <jakub@redhat.com>
3185
3186 PR c++/88146
3187 PR c++/99362
3188 * cvt.c (convert_to_void): Revert 2019-10-17 changes. Clarify
3189 comment.
3190
3191 2021-03-04 Nathan Sidwell <nathan@acm.org>
3192
3193 PR c++/99170
3194 * module.cc (class uintset): Delete.
3195 (typedef attached_map_t): A hash map.
3196 (attached_table): Use attached_map_t. Adjust uses ...
3197 (trees_out::decl_value, trees_in::decl_value): ... here ...
3198 (trees_out::key_mergeable): ... here ...
3199 (trees_in::key_mergeable): ... here ...
3200 (maybe_attach_decl): ... here ...
3201 (direct_import): ... and here.
3202
3203 2021-03-04 Nathan Sidwell <nathan@acm.org>
3204
3205 PR c++/99170
3206 * cp-tree.h
3207 * lex.c (cxx_dup_lang_specific_decl): Adjust for module_attached_p
3208 rename.
3209 * module.cc (class pending_key): New.
3210 (default_hash_traits<pending_key>): New specialization.
3211 (pending_map_t): New typedef.
3212 (pending_table): Replace old table.
3213 (trees_out::lang_decl_bools): Adjust.
3214 (trees_in::lang_decl_bools): Adjust.
3215 (trees_in::install_entity): Drop pending member and specialization
3216 handling.
3217 (find_pending_key): New.
3218 (depset::hash::fiund_dependencies): Use it.
3219 (pendset_lazy_load): Delete.
3220 (module_state::write_cluster): Don't count pendings here. Bye
3221 Duff's device-like thing.
3222 (module_state::write_pendings): Reimplement.
3223 (module_state::read_pendings): Reimplement.
3224 (lazy_specializations_p): Delete.
3225 (module_state::write): Adjust write_pendings call.
3226 (lazy_load_pendings): New.
3227 (lazy_load_specializations): Delete.
3228 (lazy_load_members): Delete.
3229 (init_modules): Adjust.
3230 * name-lookup.c (maybe_lazily_declare): Call lazy_load_pendings
3231 not lazy_load_members.
3232 (note_pending_specializations): Delete.
3233 (load_pending_specializations): Delete.
3234 * name-lookup.h (BINDING_VECTR_PENDING_SPECIALIZATIONS_P): Delete.
3235 (BINDING_VECTOR_PENDING_MEMBERS_P): Delete.
3236 (BINDING_VECTR_PENDING_MEMBERS_P): Delete.
3237 (note_pending_specializations): Delete.
3238 (load_pending_specializations): Delete.
3239 * pt.c (lookup_template_class_1): Call lazy_load_pendings not
3240 lazy_load_specializations.
3241 (instantiate_template_class_1): Likewise.
3242 (instantiate_decl): Call lazy_load_pendings.
3243 * typeck.c (complete_type): Likewise.
3244
3245 2021-03-03 Nathan Sidwell <nathan@acm.org>
3246
3247 PR c++/99170
3248 * module.cc (post_load_decls): New.
3249 (lazy_snum, recursive_lazy): Move earlier.
3250 (module_state::read_cluster): Push cloning onto post_load_decls.
3251 (post_load_processing): New. Do the cloning here.
3252 (module_state::read_inits): Call post_load_processing.
3253 (module_state::read_language): Likewise.
3254 (lazy_load_binding, lazy_load_specializations): Likewise
3255 (lazy_load_members): Likewise
3256
3257 2021-03-03 Nathan Sidwell <nathan@acm.org>
3258
3259 PR c++/99170
3260 * module.cc (trees_out::decl_value): Stream specialization keys
3261 after decl.
3262 (trees_in::decl_value): Stream them back and insert after
3263 completing the decl.
3264 (trees_out::key_mergeable): Drop some streaming here ...
3265 (trees_in::key_mergeable): ... and here. Don't insert into
3266 specialization tables.
3267
3268 2021-03-03 Patrick Palka <ppalka@redhat.com>
3269
3270 * constraint.cc (struct sat_info): Document the different
3271 meanings of noisy() and diagnose_unsatisfaction_p() during
3272 satisfaction and requires-expression evaluation.
3273 (tsubst_valid_expression_requirement): Take a sat_info instead
3274 of a subst_info. Perform the substitution quietly first. Fold
3275 in error-replaying code from diagnose_valid_expression.
3276 (tsubst_simple_requirement): Take a sat_info instead of a
3277 subst_info.
3278 (tsubst_type_requirement_1): New. Fold in error-replaying code
3279 from diagnose_valid_type.
3280 (tsubst_type_requirement): Use the above. Take a sat_info
3281 instead of a subst_info.
3282 (tsubst_compound_requirement): Likewise. Fold in
3283 error-replaying code from diagnose_compound_requirement.
3284 (tsubst_nested_requirement): Take a sat_info instead of a
3285 subst_info. Fold in error-replaying code from
3286 diagnose_nested_requirement.
3287 (tsubst_requirement): Take a sat_info instead of a subst_info.
3288 (tsubst_requires_expr): Split into two versions, one that takes
3289 a sat_info argument and another that takes a complain and
3290 in_decl argument. Remove outdated documentation. Document the
3291 effects of the sat_info argument. Don't short-circuit
3292 processing of requirements when diagnosing unsatisfaction,
3293 mirroring diagnose_requires_expr.
3294 (satisfy_nondeclaration_constraint) <case REQUIRES_EXPR>: Remove
3295 assert, and se the three-parameter version of tsubst_requires_expr.
3296 (diagnose_trait_expr): Make static. Take a template argument
3297 vector instead of a parameter mapping.
3298 (diagnose_valid_expression): Remove.
3299 (diagnose_valid_type): Remove.
3300 (diagnose_simple_requirement): Remove.
3301 (diagnose_compound_requirement): Remove.
3302 (diagnose_type_requirement): Remove.
3303 (diagnose_nested_requirement): Remove.
3304 (diagnose_requirement): Remove.
3305 (diagnose_requires_expr): Remove.
3306 (diagnose_atomic_constraint): Take a sat_info instead of a
3307 subst_info. Adjust call to diagnose_trait_expr. Call
3308 tsubst_requires_expr instead of diagnose_requires_expr.
3309 (diagnose_constraints): Remove special casing of REQUIRES_EXPR
3310 and just always call constraint_satisfaction_value.
3311
3312 2021-03-03 Patrick Palka <ppalka@redhat.com>
3313
3314 * constexpr.c (cxx_eval_call_expression): Adjust call to
3315 evaluate_concept_check.
3316 (cxx_eval_constant_expression) <case REQUIRES_EXPR>: Use
3317 evaluate_requires_expression instead of
3318 satisfy_constraint_expression.
3319 <case TEMPLATE_ID_EXPR>: Adjust call to evaluate_concept_check.
3320 * constraint.cc (struct sat_info): Adjust comment about which
3321 satisfaction entrypoints use noisy-unsat.
3322 (normalize_template_requirements): Remove (and adjust callers
3323 appropriately).
3324 (normalize_nontemplate_requirements): Likewise.
3325 (tsubst_nested_requirement): Use constraint_satisfaction_value
3326 instead of satisfy_constraint_expression, which'll do the
3327 noisy replaying of ill-formed quiet satisfaction for us.
3328 (decl_satisfied_cache): Adjust comment.
3329 (satisfy_constraint): Rename to ...
3330 (satisfy_normalized_constraints): ... this.
3331 (satisfy_associated_constraints): Remove (and make its
3332 callers check for dependent arguments).
3333 (satisfy_constraint_expression): Rename to ...
3334 (satisfy_nondeclaration_constraints): ... this. Assert that
3335 'args' is empty when 't' is a concept-id. Removing handling
3336 bare constraint-expressions, and handle REQUIRES_EXPRs
3337 specially. Adjust comment accordingly.
3338 (satisfy_declaration_constraints): Assert in the two-parameter
3339 version that 't' is not a TEMPLATE_DECL. Adjust following
3340 removal of normalize_(non)?template_requirements and
3341 satisfy_asociated_constraints.
3342 (constraint_satisfaction_value): Combine the two- and
3343 three-parameter versions in the natural way.
3344 (constraints_satisfied_p): Combine the one- and two-parameter
3345 versions in the natural way. Improve documentation.
3346 (evaluate_requires_expr): Define.
3347 (evaluate_concept_check): Remove 'complain' parameter. Use
3348 constraint_satisfaction_value instead of
3349 satisfy_constraint_expression.
3350 (diagnose_nested_requirement): Adjust following renaming of
3351 satisfy_constraint_expression.
3352 (diagnose_constraints): Handle REQUIRES_EXPR by going through
3353 diagnose_requires_expr directly instead of treating it as a
3354 constraint-expression. Improve documentation.
3355 * cp-gimplify.c (cp_genericize_r) <case CALL_EXPR>: Adjust call
3356 to evaluate_concept_check.
3357 <case REQUIRES_EXPR>: Use evaluate_requires_expr instead of
3358 constraints_satisfied_p.
3359 <case TEMPLATE_ID_EXPR>: Adjust call to evaluate_concept_check.
3360 * cp-tree.h (evaluate_requires_expr): Declare.
3361 (evaluate_concept_check): Remove tsubst_flag_t parameter.
3362 (satisfy_constraint_expression): Remove declaration.
3363 (constraints_satisfied_p): Remove one-parameter declaration.
3364 Add a default argument to the two-parameter declaration.
3365 * cvt.c (convert_to_void): Adjust call to
3366 evaluate_concept_check.
3367
3368 2021-03-03 Jakub Jelinek <jakub@redhat.com>
3369
3370 PR c++/82959
3371 * call.c (op_is_ordered): Handle TRUTH_ANDIF_EXPR, TRUTH_ORIF_EXPR
3372 and COMPOUND_EXPR.
3373
3374 2021-03-03 Marek Polacek <polacek@redhat.com>
3375
3376 PR c++/97034
3377 PR c++/99009
3378 * pt.c (build_deduction_guide): Use INNERMOST_TEMPLATE_ARGS.
3379 (maybe_aggr_guide): Use the original template type where needed. In
3380 a class member template, partially instantiate the result of
3381 collect_ctor_idx_types.
3382 (do_class_deduction): Defer the deduction until the enclosing
3383 scope is non-dependent.
3384
3385 2021-03-03 Jason Merrill <jason@redhat.com>
3386
3387 PR c++/95675
3388 * call.c (build_temp): Wrap a CALL_EXPR in a TARGET_EXPR
3389 if it didn't get one before.
3390
3391 2021-03-03 Nathan Sidwell <nathan@acm.org>
3392
3393 PR c++/99344
3394 * module.cc (trees_out::decl_node): Small refactor.
3395 (depset::hash::add_binding_entity): Return true on meeting an
3396 import. Set namespace's import here.
3397 (module_state:write_namespaces): Inform of purview too.
3398 (module_state:read_namespaces): Adjust.
3399 * name-lookup.c (implicitly_export_namespace): Delete.
3400 (do_pushdecl): Don't call it.
3401 (push_namespace): Likewise, set purview.
3402 (add_imported_namespace): Reorder parms.
3403 * name-lookup.h (add_imported_namespace): Alter param ordering.
3404
3405 2021-03-02 Martin Sebor <msebor@redhat.com>
3406
3407 PR c++/99251
3408 * class.c (build_base_path): Call build_if_nonnull.
3409 * cp-tree.h (build_if_nonnull): Declare.
3410 * rtti.c (ifnonnull): Rename...
3411 (build_if_nonnull): ...to this. Set no-warning bit on COND_EXPR.
3412 (build_dynamic_cast_1): Adjust to name change.
3413
3414 2021-03-02 Patrick Palka <ppalka@redhat.com>
3415
3416 PR c++/96443
3417 PR c++/96960
3418 * constraint.cc (type_deducible_p): Don't substitute into the
3419 constraints, and instead just pass 'args' to do_auto_deduction
3420 as the outer template arguments.
3421 (tsubst_parameter_mapping): Remove confused code for handling
3422 placeholder type arguments.
3423 (normalize_placeholder_type_constraint): Define.
3424 (satisfy_constraint_expression): Use it to handle placeholder
3425 'auto' types.
3426 * cp-tree.h (PLACEHOLDER_TYPE_CONSTRAINTS_INFO): Define.
3427 (PLACEHOLDER_TYPE_CONSTRAINTS): Redefine in terms of the above.
3428 * pt.c (tsubst) <case TEMPLATE_TYPE_PARM>: Use
3429 PLACEHOLDER_TYPE_CONSTRAINTS_INFO instead.
3430 (make_constrained_placeholder_type): Set
3431 PLACEHOLDER_TYPE_CONSTRAINTS_INFO instead.
3432 (do_auto_deduction): Clarify comments about the outer_targs
3433 parameter. Rework satisfaction of a placeholder type constraint
3434 to pass in the complete set of template arguments directly to
3435 constraints_satisfied_p.
3436 (splice_late_return_type): Use PLACEHOLDER_TYPE_CONSTRAINTS_INFO
3437 instead. Also rebuild the the constraint info on the new auto.
3438
3439 2021-03-02 Patrick Palka <ppalka@redhat.com>
3440
3441 * constraint.cc (build_parameter_mapping): Rely on the caller to
3442 determine the in-scope template parameters.
3443 (norm_info::norm_info): Delegate the tsubst_flags_t constructor
3444 to the two-parameter constructor. In the two-parameter
3445 constructor, fold in the definition of make_context, set
3446 initial_parms appropriately, and don't set the now-removed
3447 orig_decl member.
3448 (norm_info::make_context): Remove, now that its only use is
3449 inlined into the caller.
3450 (norm_info::update_context): Adjust call to
3451 build_parameter_mapping to pass in the relevant set of in-scope
3452 template parameters.
3453 (norm_info::ctx_parms): Define this member function.
3454 (norm_info::context): Initialize to NULL_TREE.
3455 (norm_info::orig_decl): Remove this data member.
3456 (norm_info::initial_parms): Define this data member.
3457 (normalize_atom): Adjust call to build_parameter_mapping to pass
3458 in the relevant set of in-scope template parameters. Use
3459 info.initial_parms instead of info.orig_decl.
3460 (normalize_constraint_expression): Take a norm_info object
3461 instead of a bool. Cache the result of normalization.
3462 (tsubst_nested_requirement): Call satisfy_constraint_expression
3463 instead of satisfy_constraint, so that we normalize on demand.
3464 (satisfy_constraint_expression): Handle a NESTED_REQ argument.
3465 Adjust call to normalize_constraint_expression.
3466 (finish_nested_requirement): Set the TREE_TYPE of the NESTED_REQ
3467 to current_template_parms.
3468 (diagnose_nested_requirements): Go through
3469 satisfy_constraint_expression, as with tsubst_nested_requirement.
3470
3471 2021-03-02 Patrick Palka <ppalka@redhat.com>
3472
3473 * constraint.cc (tsubst_parameter_mapping): Canonicalize the
3474 arguments of a substituted TYPE_ARGUMENT_PACK even if we've
3475 started with a TYPE_ARGUMENT_PACK.
3476 (finish_requires_expr): Don't set DECL_CONTEXT and
3477 CONSTRAINT_VAR_P on each of the introduced parameters here.
3478 * parser.c (cp_parser_requirement_parameter_list): Instead set
3479 these fields earlier, here.
3480 * pt.c (do_auto_deduction): Canonicalize the result of
3481 do_auto_deduction. Pass 'complain' to finish_decltype_type.
3482
3483 2021-03-02 Patrick Palka <ppalka@redhat.com>
3484
3485 * constraint.cc (tsubst_simple_requirement): Just return
3486 boolean_true_node on success.
3487 (tsubst_type_requirement): Likewise.
3488 (tsubst_compound_requirement): Likewise.
3489 (tsubst_nested_requirement): Likewise.
3490 (tsubst_requirement_body): Remove.
3491 (check_constaint_variables): Rename to ...
3492 (check_constraint_variables): ... this.
3493 (tsubst_constraint_variables): Adjust.
3494 (tsubst_requires_expr): Fold tsubst_requirement_body into here.
3495
3496 2021-03-01 Nathan Sidwell <nathan@acm.org>
3497
3498 PR c++/99294
3499 * class.c (fixup_type_variants): Propagate mode, precision,
3500 alignment & emptiness.
3501 * module.cc (trees_out::type_node): Use TYPE_ALIGN_RAW.
3502 (trees_in::tree_node): Rematerialize alignment here.
3503
3504 2021-02-27 Jason Merrill <jason@redhat.com>
3505
3506 PR c++/90333
3507 * parser.c (cp_parser_lambda_declarator_opt): Accept GNU attributes
3508 between () and ->.
3509
3510 2021-02-26 Jakub Jelinek <jakub@redhat.com>
3511
3512 * parser.c (cp_parser_lambda_declarator_opt): Implement
3513 P1102R2 - Down with ()! Make ()s optional before lambda specifiers
3514 for -std={c,gnu}++2b or with pedwarn in earlier versions.
3515
3516 2021-02-26 Jakub Jelinek <jakub@redhat.com>
3517
3518 PR c++/95451
3519 * lambda.c (is_lambda_ignored_entity): Before checking for
3520 LAMBDA_FUNCTION_P, use OVL_FIRST. Drop FUNCTION_DECL check.
3521
3522 2021-02-26 Jason Merrill <jason@redhat.com>
3523
3524 PR c++/98810
3525 * pt.c (tsubst_copy) [VIEW_CONVERT_EXPR]: Add const
3526 to a class non-type template argument that needs it.
3527
3528 2021-02-26 Patrick Palka <ppalka@redhat.com>
3529
3530 PR c++/98990
3531 * pt.c (splice_late_return_type): Rebuild the entire return type
3532 if we have to adjust the level of an auto within.
3533 (type_uses_auto): Adjust call to find_type_usage.
3534 * type-utils.h (find_type_usage): Revert r10-6571 change that
3535 made this function return a pointer to the auto node.
3536
3537 2021-02-25 Patrick Palka <ppalka@redhat.com>
3538
3539 PR c++/99213
3540 PR c++/94521
3541 * error.c (dump_scope): Pass TFF_NO_TEMPLATE_BINDINGS instead of
3542 TFF_NO_FUNCTION_ARGUMENTS when dumping a function scope.
3543
3544 2021-02-25 Patrick Palka <ppalka@redhat.com>
3545
3546 PR c++/99103
3547 * pt.c (is_spec_or_derived): Drop cv-qualifiers from 'etype'.
3548 (maybe_aggr_guide): Fix order of arguments to is_spec_or_derived.
3549
3550 2021-02-25 Marek Polacek <polacek@redhat.com>
3551
3552 DR 1312
3553 PR c++/99176
3554 * constexpr.c (is_std_construct_at): New overload.
3555 (is_std_allocator_allocate): New overload.
3556 (cxx_eval_call_expression): Use the new overloads.
3557 (cxx_eval_constant_expression): Reject casting
3558 from void * as per DR 1312. Don't check can_convert.
3559
3560 2021-02-25 Iain Sandoe <iain@sandoe.co.uk>
3561
3562 PR c++/97587
3563 * coroutines.cc (struct param_info): Track rvalue refs.
3564 (morph_fn_to_coro): Track rvalue refs, and call the promise
3565 CTOR with the frame copy of passed parms.
3566
3567 2021-02-25 Iain Sandoe <iain@sandoe.co.uk>
3568
3569 PR c++/95822
3570 * coroutines.cc (morph_fn_to_coro): Unconditionally remove any
3571 set throwing_cleanup marker.
3572
3573 2021-02-25 Nathan Sidwell <nathan@acm.org>
3574
3575 PR c++/99166
3576 * module.cc (module_state::inform_cmi_p): Renamed field.
3577 (module_state::do_import): Adjust.
3578 (init_modules, finish_module_processing): Likewise.
3579 (handle_module_option): Likewise.
3580
3581 2021-02-25 Nathan Sidwell <nathan@acm.org>
3582
3583 PR c++/98318
3584 * mapper-client.cc (module_client::open_module_client): Fix typo
3585 of fd init.
3586
3587 2021-02-24 Nathan Sidwell <nathan@acm.org>
3588
3589 PR c++/98718
3590 * module.cc (ool): New indirection vector.
3591 (loc_spans::maybe_propagate): Location is not optional.
3592 (loc_spans::open): Likewise. Assert monotonically advancing.
3593 (module_for_ordinary_loc): Use ool indirection vector.
3594 (module_state::write_prepare_maps): Do not count empty macro
3595 expansions. Elide empty spans.
3596 (module_state::write_macro_maps): Skip empty expansions.
3597 (ool_cmp): New qsort comparator.
3598 (module_state::write): Create and destroy ool vector.
3599 (name_pending_imports): Fix dump push/pop.
3600 (preprocess_module): Likewise. Add more dumping.
3601 (preprocessed_module): Likewise.
3602
3603 2021-02-24 Iain Sandoe <iain@sandoe.co.uk>
3604
3605 PR c++/96251
3606 * coroutines.cc (coro_common_keyword_context_valid_p): Suppress
3607 error reporting when instantiating for a constexpr.
3608
3609 2021-02-23 Nathan Sidwell <nathan@acm.org>
3610
3611 PR c++/99208
3612 * decl.c (name_unnamed_type): Check DECL identity, not IDENTIFIER
3613 identity.
3614
3615 2021-02-23 Patrick Palka <ppalka@redhat.com>
3616
3617 PR c++/95468
3618 * pt.c (tsubst_copy_and_build) <case BASELINK>: New case, copied
3619 over from tsubst_copy.
3620
3621 2021-02-23 Patrick Palka <ppalka@redhat.com>
3622
3623 * pt.c (instantiation_dependent_expression_p): Check
3624 processing_template_decl before calling
3625 potential_constant_expression.
3626
3627 2021-02-22 Nathan Sidwell <nathan@acm.org>
3628
3629 PR c++/99174
3630 * module.cc (struct module_state): Add visited_p flag.
3631 (name_pending_imports): Use it to avoid duplicate requests.
3632 (preprocess_module): Don't read preprocessor state if we failed to
3633 load a module's config.
3634
3635 2021-02-22 Nathan Sidwell <nathan@acm.org>
3636
3637 PR c++/99153
3638 * decl.c (duplicate_decls): Move DECL_MODULE_IMPORT_P propagation
3639 to common-path.
3640 * module.cc (set_defining_module): Add assert.
3641
3642 2021-02-19 Nathan Sidwell <nathan@acm.org>
3643
3644 PR c++/98741
3645 * module.cc (pending_imports): New.
3646 (declare_module): Adjust test condition.
3647 (name_pending_imports): New.
3648 (preprocess_module): Reimplement using pending_imports.
3649 (preprocessed_module): Move name-getting to name_pending_imports.
3650 * name-lookup.c (append_imported_binding_slot): Assert module
3651 ordering is increasing.
3652
3653 2021-02-19 Nathan Sidwell <nathan@acm.org>
3654
3655 * module.cc (note_cmis): New.
3656 (struct module_state): Add inform_read_p bit.
3657 (module_state::do_import): Inform of CMI location, if enabled.
3658 (init_modules): Canonicalize note_cmis entries.
3659 (handle_module_option): Handle -flang-info-module-read=FOO.
3660
3661 2021-02-19 Jason Merrill <jason@redhat.com>
3662
3663 PR c++/96926
3664 * call.c (perfect_conversion_p): Limit rvalueness
3665 test to reference bindings.
3666
3667 2021-02-19 Jason Merrill <jason@redhat.com>
3668
3669 PR c++/96926
3670 * call.c (perfect_conversion_p): New.
3671 (perfect_candidate_p): New.
3672 (add_candidates): Ignore templates after a perfect non-template.
3673
3674 2021-02-18 Nathan Sidwell <nathan@acm.org>
3675
3676 PR c++/99023
3677 * module.cc (canonicalize_header_name): Use
3678 cpp_probe_header_unit.
3679 (maybe_translate_include): Fix note_includes comparison.
3680 (init_modules): Fix note_includes string termination.
3681
3682 2021-02-18 Jakub Jelinek <jakub@redhat.com>
3683
3684 PR c++/99132
3685 * cp-gimplify.c (cp_genericize_r) <case CALL_EXPR>: Use
3686 cp_get_callee_fndecl_nofold instead of cp_get_callee_fndecl to check
3687 for immediate function calls.
3688
3689 2021-02-17 Nathan Sidwell <nathan@acm.org>
3690
3691 PR c++/99023
3692 * module.cc (struct macro_export): Add GTY markers.
3693 (macro_exports): Likewise, us a va_gc Vector.
3694
3695 2021-02-17 Jakub Jelinek <jakub@redhat.com>
3696
3697 PR sanitizer/99106
3698 * init.c (build_zero_init_1): For flexible array members just return
3699 NULL_TREE instead of returning empty CONSTRUCTOR with non-complete
3700 ARRAY_TYPE.
3701
3702 2021-02-17 Nathan Sidwell <nathan@acm.org>
3703
3704 PR c++/99116
3705 * name-lookup.c (do_pushdecl): Don't peek under template_parm
3706 bindings here ...
3707 (set_identifier_type_value_with_scope): ... or here.
3708 (do_pushtag): Only set_identifier_type_value_with_scope at
3709 non-class template parm scope, and use parent scope.
3710
3711 2021-02-17 Nathan Sidwell <nathan@acm.org>
3712
3713 PR c++/99071
3714 * name-lookup.c (maybe_record_mergeable_decl): Deref the correct
3715 pointer.
3716
3717 2021-02-17 Patrick Palka <ppalka@redhat.com>
3718
3719 PR debug/96997
3720 PR c++/94034
3721 * tree.c (build_aggr_init_expr): Revert r10-7718 change.
3722
3723 2021-02-12 Nathan Sidwell <nathan@acm.org>
3724
3725 * module.cc (module_state::write_cluster): Check bindings for
3726 imported using-decls.
3727
3728 2021-02-12 Nathan Sidwell <nathan@acm.org>
3729
3730 PR c++/99040
3731 * module.cc (trees_in::decl_value): Call add_module_namespace_decl
3732 for new namespace-scope entities.
3733 (module_state::read_cluster): Don't call add_module_decl here.
3734 * name-lookup.h (add_module_decl): Rename to ...
3735 (add_module_namespace_decl): ... this.
3736 * name-lookup.c (newbinding_bookkeeping): Move into ...
3737 (do_pushdecl): ... here. Its only remaining caller.
3738 (add_module_decl): Rename to ...
3739 (add_module_namespace_decl): ... here. Add checking-assert for
3740 circularity. Don't call newbinding_bookkeeping, just extern_c
3741 checking and incomplete var checking.
3742
3743 2021-02-12 Nathan Sidwell <nathan@acm.org>
3744
3745 PR c++/99039
3746 PR c++/99040
3747 * cp-tree.h (CPTI_GLOBAL_TYPE): Delete.
3748 (global_type_node): Delete.
3749 (IDENTIFIER_TYPE_VALUE): Delete.
3750 (IDENTIFIER_HAS_TYPE_VALUE): Delete.
3751 (get_type_value): Delete.
3752 * name-lookup.h (identifier_type_value): Delete.
3753 * name-lookup.c (check_module_override): Don't
3754 SET_IDENTIFIER_TYPE_VALUE here.
3755 (do_pushdecl): Nor here.
3756 (identifier_type_value_1, identifier_type_value): Delete.
3757 (set_identifier_type_value_with_scope): Only
3758 SET_IDENTIFIER_TYPE_VALUE for local and class scopes.
3759 (pushdecl_nanmespace_level): Remove shadow stack nadgering.
3760 (do_pushtag): Use REAL_IDENTIFIER_TYPE_VALUE.
3761 * call.c (check_dtor_name): Use lookup_name.
3762 * decl.c (cxx_init_decl_processing): Drop global_type_node.
3763 * decl2.c (cplus_decl_attributes): Don't SET_IDENTIFIER_TYPE_VALUE
3764 here.
3765 * init.c (get_type_value): Delete.
3766 * pt.c (instantiate_class_template_1): Don't call pushtag or
3767 SET_IDENTIFIER_TYPE_VALUE here.
3768 (tsubst): Assert never an identifier.
3769 (dependent_type_p): Drop global_type_node assert.
3770 * typeck.c (error_args_num): Don't use IDENTIFIER_HAS_TYPE_VALUE
3771 to determine ctorness.
3772
3773 2021-02-12 Jakub Jelinek <jakub@redhat.com>
3774
3775 PR c++/97742
3776 * parser.c (cp_parser_requirement_seq): Stop iterating after reaching
3777 CPP_EOF.
3778
3779 2021-02-12 Jason Merrill <jason@redhat.com>
3780
3781 PR c++/97246
3782 PR c++/94546
3783 * pt.c (extract_fnparm_pack): Check DECL_PACK_P here.
3784 (register_parameter_specializations): Not here.
3785
3786 2021-02-11 Marek Polacek <polacek@redhat.com>
3787
3788 PR c++/95888
3789 * pt.c (lookup_template_class_1): Pass tf_none to tsubst when looking
3790 for the partial instantiation.
3791
3792 2021-02-11 Jakub Jelinek <jakub@redhat.com>
3793
3794 PR c++/99033
3795 * init.c (build_zero_init_1): Handle zero initialiation of
3796 flexible array members like initialization of [0] arrays.
3797 Use integer_minus_onep instead of comparison to integer_minus_one_node
3798 and integer_zerop instead of comparison against size_zero_node.
3799 Formatting fixes.
3800
3801 2021-02-11 Marek Polacek <polacek@redhat.com>
3802
3803 PR c++/99063
3804 * semantics.c (finish_do_stmt): Check for unexpanded parameter packs.
3805
3806 2021-02-11 Patrick Palka <ppalka@redhat.com>
3807
3808 PR c++/97582
3809 * name-lookup.c (op_unqualified_lookup): Handle an ambiguous
3810 lookup result by discarding it if the first element is a
3811 class-scope declaration, otherwise return it.
3812 (push_operator_bindings): Handle an ambiguous lookup result by
3813 doing push_local_binding on each element in the list.
3814
3815 2021-02-11 Marek Polacek <polacek@redhat.com>
3816
3817 * parser.c (cp_parser_selection_statement): Use vec_free.
3818
3819 2021-02-10 Jakub Jelinek <jakub@redhat.com>
3820
3821 PR c++/98988
3822 PR c++/99031
3823 * constexpr.c: Include cgraph.h.
3824 (cxx_eval_call_expression): Call varpool_node::finalize_decl on
3825 heap artificial vars.
3826 (cxx_eval_outermost_constant_expr): Remove varpool nodes for
3827 heap artificial vars.
3828
3829 2021-02-10 Nathan Sidwell <nathan@acm.org>
3830
3831 PR c++/99030
3832 * pt.c (tsubst_copy) [VAR_DECL]: For a DECL_LOCAL_DECL_P T is the
3833 answer if there's no local specialization.
3834
3835 2021-02-09 Nathan Sidwell <nathan@acm.org>
3836
3837 PR c++/98944
3838 * module.cc (module_state::is_rooted): Rename to ...
3839 (module_state::has_location): ... here. Adjust callers.
3840 (module_state::read_partitions): Adjust validity check.
3841 Don't overwrite a known location.
3842
3843 2021-02-09 Jason Merrill <jason@redhat.com>
3844
3845 PR c++/96905
3846 * pt.c (mark_decl_instantiated): Exit early if consteval.
3847
3848 2021-02-09 Jason Merrill <jason@redhat.com>
3849
3850 PR c++/98326
3851 PR c++/20408
3852 * cp-gimplify.c (simple_empty_class_p): Don't touch an invisiref
3853 parm.
3854
3855 2021-02-09 Jason Merrill <jason@redhat.com>
3856
3857 PR c++/98994
3858 PR c++/97566
3859 * constexpr.c (cxx_eval_store_expression): Only skip empty fields in
3860 RECORD_TYPE.
3861
3862 2021-02-08 Nathan Sidwell <nathan@acm.org>
3863
3864 * decl.c (start_cleanup_fn): Push function into
3865 namespace.
3866
3867 2021-02-08 Nathan Sidwell <nathan@acm.org>
3868
3869 PR c++/98531
3870 * cp-tree.h (push_abi_namespace, pop_abi_namespace): Declare.
3871 * decl.c (push_abi_namespace, pop_abi_namespace): Moved
3872 from rtti.c, add default namespace arg.
3873 (check_redeclaration_exception_specification): Allow a lazy
3874 builtin's eh spec to differ from an lready-declared user
3875 declaration.
3876 (declare_global_var): Use push/pop_abi_namespace.
3877 (get_atexit_node): Push the fndecl into a namespace.
3878 * rtti.c (push_abi_namespace, pop_abi_namespace): Moved to
3879 decl.c.
3880
3881 2021-02-08 Marek Polacek <polacek@redhat.com>
3882
3883 * cp-tree.h (CLASSTYPE_TI_TEMPLATE): Fix typo.
3884
3885 2021-02-05 Marek Polacek <polacek@redhat.com>
3886
3887 PR c++/98947
3888 * call.c (build_conditional_expr_1): Don't call mark_lvalue_use
3889 on arg2/arg3.
3890 * expr.c (mark_use) <case MODIFY_EXPR>: Don't check read_p when
3891 issuing the -Wvolatile warning. Only set TREE_THIS_VOLATILE if
3892 a warning was emitted.
3893
3894 2021-02-05 Marek Polacek <polacek@redhat.com>
3895
3896 PR c++/96462
3897 * name-lookup.c (lookup_using_decl): Hoist the destructor check.
3898
3899 2021-02-05 Jakub Jelinek <jakub@redhat.com>
3900
3901 PR c++/97878
3902 * decl.c (check_array_initializer): For structured bindings, require
3903 the array type to be complete.
3904
3905 2021-02-04 Jason Merrill <jason@redhat.com>
3906
3907 PR c++/98717
3908 * constraint.cc (build_concept_check_arguments): Remove assert.
3909 (build_concept_check): Allow empty args.
3910
3911 2021-02-04 Tom Greenslade (thomgree) <thomgree@cisco.com>
3912
3913 PR c++/90926
3914 * call.c (can_convert_array): Extend to handle all valid aggregate
3915 initializers of an array; including by string literals, not just by
3916 brace-init-list.
3917 (build_aggr_conv): Call can_convert_array more often, not just in
3918 brace-init-list case.
3919 * typeck2.c (array_string_literal_compatible_p): New function.
3920 (digest_init_r): call array_string_literal_compatible_p
3921 * cp-tree.h: (array_string_literal_compatible_p): Declare.
3922
3923 2021-02-04 Jason Merrill <jason@redhat.com>
3924
3925 PR c++/98802
3926 * pt.c (do_class_deduction): No aggregate guide if any_dguides_p.
3927
3928 2021-02-04 Jason Merrill <jason@redhat.com>
3929
3930 PR c++/95192
3931 * pt.c (tsubst_attribute): Handle error.
3932 (apply_late_template_attributes): Return false on error.
3933 (tsubst_function_decl): Check its return value.
3934 (tsubst_decl): Likewise.
3935 (push_template_decl): Assert current_template_parms.
3936 (tsubst_template_decl): Set current_template_parms.
3937
3938 2021-02-03 Marek Polacek <polacek@redhat.com>
3939
3940 PR c++/98951
3941 * call.c (struct z_candidate): Mark rewritten and reversed as const.
3942 (struct NonPublicField): Mark operator() as const.
3943 (struct NonTrivialField): Likewise.
3944
3945 2021-02-03 Jason Merrill <jason@redhat.com>
3946
3947 PR c++/98926
3948 PR c++/98570
3949 * pt.c (spec_hasher::equal): Set processing_template_decl.
3950 * Make-lang.in (check-g++-strict-gc): Add --param
3951 hash-table-verification-limit=10000.
3952
3953 2021-02-03 Marek Polacek <polacek@redhat.com>
3954
3955 PR c++/98899
3956 * parser.c (cp_parser_class_specifier_1): Use any possible
3957 DEFPARSE_INSTANTIATIONS to update DEFERRED_NOEXCEPT_PATTERN.
3958 (cp_parser_save_noexcept): Initialize DEFPARSE_INSTANTIATIONS.
3959 * pt.c (tsubst_exception_specification): Stash new_specs into
3960 DEFPARSE_INSTANTIATIONS.
3961 * tree.c (fixup_deferred_exception_variants): Use
3962 UNPARSED_NOEXCEPT_SPEC_P.
3963
3964 2021-02-02 Jason Merrill <jason@redhat.com>
3965
3966 PR c++/98929
3967 PR c++/96199
3968 * error.c (dump_expr): Ignore dummy object.
3969 * pt.c (tsubst_baselink): Handle dependent scope.
3970
3971 2021-02-01 Patrick Palka <ppalka@redhat.com>
3972
3973 PR c++/98295
3974 * constexpr.c (cxx_eval_array_reference): Also set
3975 new_ctx.object when setting new_ctx.ctor.
3976
3977 2021-02-01 Marek Polacek <polacek@redhat.com>
3978
3979 PR c++/98355
3980 * parser.c (cp_parser_has_attribute_expression): Use
3981 uses_template_parms instead of type_dependent_expression_p.
3982
3983 2021-02-01 Jason Merrill <jason@redhat.com>
3984
3985 PR c++/98570
3986 * cp-tree.h: Declare it.
3987 * pt.c (comparing_dependent_aliases): New flag.
3988 (template_args_equal, spec_hasher::equal): Set it.
3989 (dependent_alias_template_spec_p): Assert that we don't
3990 get non-types other than error_mark_node.
3991 (instantiate_alias_template): SET_TYPE_STRUCTURAL_EQUALITY
3992 on complex alias specializations. Set TYPE_DEPENDENT_P here.
3993 (tsubst_decl): Not here.
3994 * module.cc (module_state::read_cluster): Set
3995 comparing_dependent_aliases instead of
3996 comparing_specializations.
3997 * tree.c (cp_tree_equal): Remove comparing_specializations
3998 module handling.
3999 * typeck.c (structural_comptypes): Adjust.
4000 (comptypes): Remove comparing_specializations handling.
4001
4002 2021-01-29 Nathan Sidwell <nathan@acm.org>
4003
4004 PR c++/98843
4005 * module.cc (module_state_config): Add num_entities field.
4006 (module_state::read_entities): The entity_ary span is
4007 already allocated.
4008 (module_state::write_config): Write num_entities.
4009 (module_state::read_config): Read num_entities.
4010 (module_state::write): Set config's num_entities.
4011 (module_state::read_initial): Allocate the entity ary
4012 span here.
4013 (module_state::read_language): Do not set entity_lwm
4014 here.
4015
4016 2021-01-29 Marek Polacek <polacek@redhat.com>
4017
4018 PR c++/96137
4019 * parser.c (cp_parser_class_name): If parser->scope is
4020 error_mark_node, return it, otherwise continue.
4021
4022 2021-01-28 Jakub Jelinek <jakub@redhat.com>
4023
4024 PR c++/98841
4025 * typeck.c (build_x_indirect_ref): For *this, return current_class_ref.
4026
4027 2021-01-28 Jakub Jelinek <jakub@redhat.com>
4028
4029 PR c++/33661
4030 PR c++/98847
4031 * decl.c (cp_finish_decl): For register vars with asmspec in templates
4032 call set_user_assembler_name and set DECL_HARD_REGISTER.
4033 * pt.c (tsubst_expr): When instantiating DECL_HARD_REGISTER vars,
4034 pass asmspec_tree to cp_finish_decl.
4035
4036 2021-01-28 Nathan Sidwell <nathan@acm.org>
4037
4038 PR c++/98770
4039 * module.cc (trees_out::decl_value): Swap is_typedef & TYPE_NAME
4040 check order.
4041 (trees_in::decl_value): Do typedef frobbing only when installing
4042 a new typedef, adjust is_matching_decl call. Swap is_typedef
4043 & TYPE_NAME check.
4044 (trees_in::is_matching_decl): Add is_typedef parm. Adjust variable
4045 names and deal with typedef checking.
4046
4047 2021-01-27 Jason Merrill <jason@redhat.com>
4048
4049 PR c++/97874
4050 * name-lookup.c (lookup_using_decl): Clean up handling
4051 of dependency and inherited constructors.
4052 (finish_nonmember_using_decl): Handle DECL_DEPENDENT_P.
4053 * pt.c (tsubst_expr): Handle DECL_DEPENDENT_P.
4054
4055 2021-01-26 Jason Merrill <jason@redhat.com>
4056
4057 PR c++/97474
4058 * call.c (type_passed_as): Don't mark invisiref restrict.
4059
4060 2021-01-26 Jason Merrill <jason@redhat.com>
4061
4062 PR c++/97566
4063 PR c++/98463
4064 * class.c (layout_class_type): An empty field gets size 0.
4065 (is_empty_field): New.
4066 (check_bases): Check it.
4067 * cp-tree.h (is_empty_field): Declare it.
4068 * constexpr.c (cxx_eval_store_expression): Check it.
4069 (cx_check_missing_mem_inits): Likewise.
4070 * init.c (perform_member_init): Likewise.
4071 * typeck2.c (process_init_constructor_record): Likewise.
4072
4073 2021-01-25 Martin Sebor <msebor@redhat.com>
4074
4075 PR c++/98646
4076 * cvt.c (cp_fold_convert): Propagate TREE_NO_WARNING.
4077
4078 2021-01-25 Jason Merrill <jason@redhat.com>
4079
4080 PR c++/98463
4081 * constexpr.c (get_or_insert_ctor_field): Add check.
4082 (cxx_eval_store_expression): Handle discontinuity of refs.
4083
4084 2021-01-23 Anthony Sharp <anthonysharp15@gmail.com>
4085
4086 * call.c (complain_about_access): Altered function.
4087 * cp-tree.h (complain_about_access): Changed parameters of function.
4088 (get_parent_with_private_access): Declared new function.
4089 * search.c (get_parent_with_private_access): Defined new function.
4090 * semantics.c (enforce_access): Modified function.
4091 * typeck.c (complain_about_unrecognized_member): Updated function
4092 arguments in complain_about_access.
4093
4094 2021-01-23 Patrick Palka <ppalka@redhat.com>
4095
4096 PR c++/97399
4097 * cp-tree.h (shared_member_p): Adjust declaration.
4098 * parser.c (cp_parser_init_declarator): If the storage class
4099 specifier is sc_static, pass true for static_p to
4100 cp_parser_declarator.
4101 (cp_parser_direct_declarator): Don't do inject_this_parm when
4102 the declarator is a friend.
4103 * search.c (shared_member_p): Change return type to bool and
4104 adjust function body accordingly. Return false for a dependent
4105 USING_DECL instead of aborting.
4106 * semantics.c (finish_qualified_id_expr): Rely on shared_member_p
4107 even when type-dependent.
4108
4109 2021-01-22 Marek Polacek <polacek@redhat.com>
4110
4111 PR c++/96623
4112 * parser.c (inject_parm_decls): Remove a redundant assignment.
4113 (cp_parser_class_specifier_1): Clear current_class_{ptr,ref}
4114 before calling inject_parm_decls.
4115
4116 2021-01-22 Jason Merrill <jason@redhat.com>
4117
4118 PR c++/98744
4119 * call.c (make_base_init_ok): Use DECL_HAS_VTT_PARM_P.
4120
4121 2021-01-22 Jakub Jelinek <jakub@redhat.com>
4122
4123 PR sanitizer/95693
4124 * init.c (build_zero_init_1): Revert the 2018-03-06 change to
4125 return build_zero_cst for reference types.
4126 * typeck2.c (process_init_constructor_record): Instead call
4127 build_zero_cst here during error recovery instead of build_zero_init.
4128
4129 2021-01-22 Marek Polacek <polacek@redhat.com>
4130
4131 PR c++/98545
4132 * mangle.c (write_member_name): Emit abi_warn_or_compat_version_crosses
4133 warnings regardless of abi_version_at_least.
4134 (write_expression): When the expression is a dependent name
4135 and an operator name, write "on" before writing its name.
4136
4137 2021-01-22 Marek Polacek <polacek@redhat.com>
4138
4139 PR c++/97966
4140 * pt.c (instantiate_class_template_1): Instantiate members
4141 marked with attribute used only after we're done instantiating
4142 the class.
4143
4144 2021-01-21 Patrick Palka <ppalka@redhat.com>
4145
4146 PR c++/71879
4147 * semantics.c (finish_decltype_type): Set up a cp_unevaluated
4148 sentinel at the start of the function. Remove a now-redundant
4149 manual adjustment of cp_unevaluated_operand.
4150
4151 2021-01-21 Nathan Sidwell <nathan@acm.org>
4152
4153 PR c++/98624
4154 * module.cc (depset::hash::find_dependencies): Add
4155 module arg.
4156 (trees_out::core_vals): Check state before calling
4157 write_location.
4158 (sort_cluster, module_state::write): Adjust
4159 find_dependencies call.
4160
4161 2021-01-21 Jakub Jelinek <jakub@redhat.com>
4162
4163 PR c++/98672
4164 * constexpr.c (check_for_return_continue_data): Add break_stmt member.
4165 (check_for_return_continue): Also look for BREAK_STMT. Handle
4166 SWITCH_STMT by ignoring break_stmt from its body.
4167 (potential_constant_expression_1) <case FOR_STMT>,
4168 <case WHILE_STMT>: If the condition isn't constant true, check if
4169 the loop body can contain a return stmt.
4170 <case SWITCH_STMT>: Adjust check_for_return_continue_data initializer.
4171 <case IF_STMT>: If recursion with tf_none is successful,
4172 merge *jump_target from the branches - returns with highest priority,
4173 breaks or continues lower. If then branch is potentially constant and
4174 doesn't return, check the else branch if it could return, break or
4175 continue.
4176
4177 2021-01-21 Nathan Sidwell <nathan@acm.org>
4178
4179 PR c++/98530
4180 * name-lookup.c (lookup_class_binding): Rearrange a stat-hack.
4181
4182 2021-01-20 Nathan Sidwell <nathan@acm.org>
4183
4184 * module.cc (bytes_in::i, bytes_in::wi): Avoid left shift of
4185 signed type.
4186
4187 2021-01-20 Patrick Palka <ppalka@redhat.com>
4188
4189 PR c++/95434
4190 * pt.c (tsubst) <case TEMPLATE_TYPE_PARM>: If tsubsting
4191 CLASS_PLACEHOLDER_TEMPLATE yields a TEMPLATE_TEMPLATE_PARM,
4192 adjust to its TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
4193
4194 2021-01-20 Patrick Palka <ppalka@redhat.com>
4195
4196 PR c++/82613
4197 * parser.c (cp_parser_class_head): Defer access checking when
4198 parsing the base-clause until all bases are seen and attached
4199 to the class type.
4200 * pt.c (instantiate_class_template): Likewise when substituting
4201 into dependent bases.
4202
4203 2021-01-20 Jakub Jelinek <jakub@redhat.com>
4204
4205 PR c++/98742
4206 * semantics.c (finish_omp_clauses) <case OMP_CLAUSE_DETACH>: If
4207 error_operand_p, remove clause without further checking. Check
4208 for non-NULL TYPE_NAME.
4209
4210 2021-01-19 Marek Polacek <polacek@redhat.com>
4211
4212 PR c++/98659
4213 * pt.c (maybe_instantiate_noexcept): Return false if FN is
4214 error_mark_node.
4215
4216 2021-01-19 Marek Polacek <polacek@redhat.com>
4217
4218 PR c++/98687
4219 * name-lookup.c (push_using_decl_bindings): New, broken out of...
4220 (finish_nonmember_using_decl): ...here.
4221 * name-lookup.h (push_using_decl_bindings): Update declaration.
4222 * pt.c (tsubst_expr): Update the call to push_using_decl_bindings.
4223
4224 2021-01-19 Patrick Palka <ppalka@redhat.com>
4225
4226 PR c++/41437
4227 PR c++/58993
4228 * search.c (friend_accessible_p): If scope is a hidden friend
4229 defined inside a dependent class, consider access from the
4230 class.
4231 * parser.c (cp_parser_late_parsing_for_member): Don't push a
4232 dk_no_check access state.
4233
4234 2021-01-19 Marek Polacek <polacek@redhat.com>
4235
4236 PR c++/98333
4237 * parser.c (cp_parser_class_specifier_1): Perform late-parsing
4238 of NSDMIs before late-parsing of noexcept-specifiers.
4239
4240 2021-01-19 Nathan Sidwell <nathan@acm.org>
4241
4242 * module.cc (identifier): Merge overloads.
4243
4244 2021-01-19 Nathan Sidwell <nathan@acm.org>
4245
4246 PR c++/98624
4247 * module.cc (trees_out::write_location): Make static.
4248
4249 2021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
4250
4251 * parser.c (cp_parser_omp_clause_detach): New.
4252 (cp_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH.
4253 (OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH.
4254 * pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_DETACH clause.
4255 * semantics.c (finish_omp_clauses): Handle OMP_CLAUSE_DETACH clause.
4256 Prevent use of detach with mergeable and overriding the data sharing
4257 mode of the event handle.
4258
4259 2021-01-15 Nathan Sidwell <nathan@acm.org>
4260
4261 PR c++/98538
4262 * tree.c (cp_build_qualified_type_real): Propagate an array's
4263 dependentness to the copy, if known.
4264
4265 2021-01-15 Jason Merrill <jason@redhat.com>
4266
4267 PR c++/98642
4268 * call.c (unsafe_return_slot_p): Return int.
4269 (init_by_return_slot_p): Split out from...
4270 (unsafe_copy_elision_p): ...here.
4271 (unsafe_copy_elision_p_opt): New name for old meaning.
4272 (build_over_call): Adjust.
4273 (make_safe_copy_elision): New.
4274 * typeck2.c (split_nonconstant_init_1): Elide copy from safe
4275 list-initialization.
4276 * cp-tree.h: Adjust.
4277
4278 2021-01-15 Jason Merrill <jason@redhat.com>
4279
4280 * call.c (base_ctor_for, make_base_init_ok): New.
4281 (build_over_call): Use make_base_init_ok.
4282
4283 2021-01-15 Jason Merrill <jason@redhat.com>
4284
4285 PR c++/63707
4286 * tree.c (build_vec_init_expr): Don't call build_vec_init_elt
4287 if we got a CONSTRUCTOR.
4288
4289 2021-01-15 Nathan Sidwell <nathan@acm.org>
4290
4291 PR c++/98591
4292 * lang-specs.h: Fix handling of -fmodule-only with -fsyntax-only.
4293
4294 2021-01-14 Jason Merrill <jason@redhat.com>
4295
4296 * typeck2.c (process_init_constructor_record): Use fldtype
4297 variable consistently.
4298
4299 2021-01-14 Nathan Sidwell <nathan@acm.org>
4300
4301 PR c++/98372
4302 * tree.c (cp_tree_equal): Correct map_context logic.
4303
4304 2021-01-13 Marek Polacek <polacek@redhat.com>
4305
4306 PR c++/98231
4307 * name-lookup.c (push_using_decl_bindings): New.
4308 * name-lookup.h (push_using_decl_bindings): Declare.
4309 * pt.c (tsubst_expr): Call push_using_decl_bindings.
4310
4311 2021-01-13 Nathan Sidwell <nathan@acm.org>
4312
4313 PR c++/98626
4314 * module.cc (module_add_import_initializers): Pass a
4315 zero-element argument vector.
4316
4317 2021-01-12 Patrick Palka <ppalka@redhat.com>
4318
4319 PR c++/98611
4320 * tree.c (cp_walk_subtrees) <case TEMPLATE_TYPE_PARM>: Visit
4321 the template of a CTAD placeholder.
4322
4323 2021-01-12 Marek Polacek <polacek@redhat.com>
4324
4325 PR c++/98620
4326 * typeck2.c (process_init_constructor_record): Don't emit
4327 -Wmissing-field-initializers warnings in unevaluated contexts.
4328
4329 2021-01-11 Jakub Jelinek <jakub@redhat.com>
4330
4331 PR c++/98481
4332 * class.c (find_abi_tags_r): Set *walk_subtrees to 2 instead of 1
4333 for types.
4334 (mark_abi_tags_r): Likewise.
4335 * decl2.c (min_vis_r): Likewise.
4336 * tree.c (cp_walk_subtrees): If *walk_subtrees_p is 2, look through
4337 typedefs.
4338
4339 2021-01-08 Patrick Palka <ppalka@redhat.com>
4340
4341 PR c++/98551
4342 * constexpr.c (cxx_eval_call_expression): Check CLASS_TYPE_P
4343 instead of AGGREGATE_TYPE_P before calling replace_result_decl.
4344
4345 2021-01-08 Patrick Palka <ppalka@redhat.com>
4346
4347 PR c++/98515
4348 * semantics.c (check_accessibility_of_qualified_id): Punt if
4349 we're checking access of a scoped non-static member inside a
4350 class template.
4351
4352 2021-01-07 Jakub Jelinek <jakub@redhat.com>
4353
4354 PR c++/98329
4355 * pt.c (tsubst_copy) <case BIT_CAST_EXPR>: Don't call
4356 cp_build_bit_cast here, instead just build_min a BIT_CAST_EXPR and set
4357 its location.
4358 (tsubst_copy_and_build): Handle BIT_CAST_EXPR.
4359
4360 2021-01-07 Marek Polacek <polacek@redhat.com>
4361
4362 PR c++/98441
4363 * decl.c (grokdeclarator): Move the !funcdecl_p check inside the
4364 !late_return_type block.
4365
4366 2021-01-07 Jason Merrill <jason@redhat.com>
4367
4368 * constexpr.c (cxx_bind_parameters_in_call): Add comment.
4369 (cxx_eval_store_expression): Add comment.
4370
4371 2021-01-07 Jason Merrill <jason@redhat.com>
4372
4373 * call.c (has_next): Factor out from...
4374 (next_conversion): ...here.
4375 (strip_standard_conversion): And here.
4376 (is_subseq): And here.
4377 (build_conv): Check it.
4378 (standard_conversion): Don't call build_conv
4379 for ck_identity.
4380
4381 2021-01-06 Martin Sebor <msebor@redhat.com>
4382
4383 PR c++/95768
4384 * error.c (dump_expr): Call c_pretty_printer::unary_expression.
4385
4386 2021-01-05 Patrick Palka <ppalka@redhat.com>
4387
4388 * pt.c (unify) <case TEMPLATE_PARM_INDEX>: After walking into
4389 the type of the NTTP, substitute into the type again. If the
4390 type is still dependent, don't unify the NTTP.
4391
4392 2021-01-05 Jakub Jelinek <jakub@redhat.com>
4393
4394 * Make-lang.in (cc1plus-checksum, cc1plus$(exeext): Add
4395 $(CODYLIB) after $(BACKEND).
4396
4397 2021-01-05 Jakub Jelinek <jakub@redhat.com>
4398
4399 PR c++/98469
4400 * constexpr.c (cxx_eval_constant_expression) <case BIT_CAST_EXPR>:
4401 Punt if lval is true.
4402 * semantics.c (cp_build_bit_cast): Call get_target_expr_sfinae on
4403 the result if it has a class type.
4404
4405 2021-01-05 Marek Polacek <polacek@redhat.com>
4406
4407 PR c++/82099
4408 * pt.c (resolve_overloaded_unification): Call
4409 maybe_instantiate_noexcept after instantiating the function
4410 decl.
4411
4412 2021-01-05 Nathan Sidwell <nathan@acm.org>
4413
4414 * parser.c (cp_parser_module_declaration): Alter diagnostic
4415 text to say where is permissable.
4416
4417 2021-01-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4418
4419 PR c++/98316
4420 * Make-lang.in (cc1plus$(exeext)): Add $(CODYLIB), $(NETLIBS).
4421
4422 2021-01-02 Jan Hubicka <jh@suse.cz>
4423
4424 * cp-tree.h (cp_tree_c_finish_parsing): Declare.
4425 * decl2.c (c_parse_final_cleanups): Call cp_tree_c_finish_parsing.
4426 * tree.c (cp_tree_c_finish_parsing): New function.
4427
4428 2021-01-01 Jakub Jelinek <jakub@redhat.com>
4429
4430 * ChangeLog-2020: Rotate ChangeLog. New file.
4431
4432 \f
4433 Copyright (C) 2021 Free Software Foundation, Inc.
4434
4435 Copying and distribution of this file, with or without modification,
4436 are permitted in any medium without royalty provided the copyright
4437 notice and this notice are preserved.