]> gcc.gnu.org Git - gcc.git/blame - gcc/cp/ChangeLog
gcc-changelog: ignore one more commit
[gcc.git] / gcc / cp / ChangeLog
CommitLineData
39169029
GA
12021-07-28 Martin Sebor <msebor@redhat.com>
2
3 * init.c: Include new header.
4
af3f12e6
GA
52021-07-27 Marek Polacek <polacek@redhat.com>
6
7 DR 1512
8 PR c++/99701
9 * cp-gimplify.c (cp_fold): Remove {LE,LT,GE,GT_EXPR} from
10 a switch.
11 * typeck.c (cp_build_binary_op): Reject ordered comparison
12 of two null pointers.
13
1a7febe9
GA
142021-07-26 Jakub Jelinek <jakub@redhat.com>
15
16 * parser.h (struct cp_lexer): Add orphan_p member.
17 * parser.c (cp_parser_statement): Don't change in_omp_attribute_pragma
18 upon restart from CPP_PRAGMA handling. Fix up condition when a lexer
19 should be destroyed and adjust saved_tokens if it records tokens from
20 the to be destroyed lexer.
21 (cp_parser_omp_section_scan): New function.
22 (cp_parser_omp_scan_loop_body): Use it. If
23 parser->lexer->in_omp_attribute_pragma, allow optional comma
24 after scan.
25 (cp_parser_omp_sections_scope): Use cp_parser_omp_section_scan.
26
ead235f6
GA
272021-07-23 Jakub Jelinek <jakub@redhat.com>
28
29 * parser.h (struct cp_parser): Add omp_attrs_forbidden_p member.
30 * parser.c (cp_parser_handle_statement_omp_attributes): Diagnose
31 mixing of attribute and pragma syntax directives when seeing
32 omp::directive if parser->omp_attrs_forbidden_p or if attribute syntax
33 directives are followed by OpenMP pragma.
34 (cp_parser_statement): Clear parser->omp_attrs_forbidden_p after
35 the cp_parser_handle_statement_omp_attributes call.
36 (cp_parser_omp_structured_block): Add disallow_omp_attrs argument,
37 if true, set parser->omp_attrs_forbidden_p.
38 (cp_parser_omp_scan_loop_body, cp_parser_omp_sections_scope): Pass
39 false as disallow_omp_attrs to cp_parser_omp_structured_block.
40 (cp_parser_omp_parallel, cp_parser_omp_task): Set
41 parser->omp_attrs_forbidden_p.
42
419c6c68
GA
432021-07-21 Thomas Schwinge <thomas@codesourcery.com>
44 Joseph Myers <joseph@codesourcery.com>
45 Cesar Philippidis <cesar@codesourcery.com>
46
47 * parser.c (cp_parser_omp_clause_name): Handle 'nohost'.
48 (cp_parser_oacc_all_clauses): Handle 'PRAGMA_OACC_CLAUSE_NOHOST'.
49 (OACC_ROUTINE_CLAUSE_MASK): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
50 * pt.c (tsubst_omp_clauses): Handle 'OMP_CLAUSE_NOHOST'.
51 * semantics.c (finish_omp_clauses): Likewise.
52
532021-07-21 Jakub Jelinek <jakub@redhat.com>
54
55 PR c++/101516
56 * semantics.c (finish_omp_reduction_clause): Also call
57 complete_type_or_else and return true if it fails.
58
21ea2f93
GA
592021-07-19 Iain Sandoe <iain@sandoe.co.uk>
60
61 PR c++/95520
62 * coroutines.cc (struct coroutine_info): Add fields for
63 actor and destroy function decls.
64 (to_ramp): New.
65 (coro_get_ramp_function): New.
66 (coro_get_actor_function): New.
67 (coro_get_destroy_function): New.
68 (act_des_fn): Set up mapping between ramp, actor and
69 destroy functions.
70 (morph_fn_to_coro): Adjust interface to the builder for
71 helper function decls.
72 * cp-tree.h (DECL_ACTOR_FN, DECL_DESTROY_FN, DECL_RAMP_FN,
73 JOIN_STR): New.
74 * mangle.c (write_encoding): Handle coroutine helpers.
75 (write_unqualified_name): Handle lambda coroutine helpers.
76
87277b6a
GA
772021-07-16 Patrick Palka <ppalka@redhat.com>
78
79 PR c++/101233
80 * pt.c (alias_ctad_tweaks): Clear cp_unevaluated_operand for
81 substituting DECL_ARGUMENTS.
82
832021-07-16 Patrick Palka <ppalka@redhat.com>
84
85 DR 960
86 PR c++/99664
87 * search.c (check_final_overrider): Compare TYPE_REF_IS_RVALUE
88 when the return types are references.
89
902021-07-16 Marek Polacek <polacek@redhat.com>
91
92 * typeck2.c (check_narrowing): Don't suppress the pedantic error
93 in system headers.
94
d97d71a1
GA
952021-07-15 Jakub Jelinek <jakub@redhat.com>
96
97 PR c++/101443
98 * cp-gimplify.c (cp_fold): For comparisons with NULLPTR_TYPE
99 operands, fold them right away to true or false.
100
1012021-07-15 Jason Merrill <jason@redhat.com>
102
103 PR c++/101095
104 * cp-objcp-common.c (cp_common_init_ts): Mark types as types.
105 (cp_tree_size): Remove redundant entries.
106
c4fee1c6
GA
1072021-07-14 Patrick Palka <ppalka@redhat.com>
108
109 PR c++/88252
110 * cp-tree.h (TEMPLATE_TYPE_PARM_FOR_CLASS): Remove.
111 * pt.c (push_template_decl): Remove TEMPLATE_TYPE_PARM_FOR_CLASS
112 handling.
113 (redeclare_class_template): Likewise.
114 (forwarding_reference_p): Define.
115 (maybe_adjust_types_for_deduction): Use it instead. Add 'tparms'
116 parameter.
117 (unify_one_argument): Pass tparms to
118 maybe_adjust_types_for_deduction.
119 (try_one_overload): Likewise.
120 (unify): Likewise.
121 (rewrite_template_parm): Remove TEMPLATE_TYPE_PARM_FOR_CLASS
122 handling.
123
1242021-07-14 Jason Merrill <jason@redhat.com>
125
126 * class.c (struct find_final_overrider_data): Use auto_vec.
127 (find_final_overrider): Remove explicit release.
128 * coroutines.cc (process_conditional): Use auto_vec.
129 * cp-gimplify.c (struct cp_genericize_data): Use auto_vec.
130 (cp_genericize_tree): Remove explicit release.
131 * parser.c (cp_parser_objc_at_property_declaration): Use
132 auto_delete_vec.
133 * semantics.c (omp_reduction_lookup): Use auto_vec.
134
1352021-07-14 Marek Polacek <polacek@redhat.com>
136
137 PR c++/101371
138 * constexpr.c (cxx_eval_array_reference): Create a new .object
139 and .ctor for the non-aggregate non-scalar case too when
140 value-initializing.
141
07bcbf9c
GA
1422021-07-12 Patrick Palka <ppalka@redhat.com>
143
144 PR c++/79501
145 PR c++/100983
146 * decl.c (grokfndecl): Don't require that deduction guides are
147 declared at namespace scope. Check that class-scope deduction
148 guides have the same access as the member class template.
149 (grokdeclarator): Pretend class-scope deduction guides are static.
150 * search.c (lookup_member): Don't use a BASELINK for (class-scope)
151 deduction guides.
152
269256f3
GA
1532021-07-10 Patrick Palka <ppalka@redhat.com>
154
155 PR c++/82110
156 * init.c (build_aggr_init): Return error_mark_node if
157 expand_aggr_init_1 returns false.
158 (expand_default_init): Change return type to bool. Return false
159 on error, true on success.
160 (expand_aggr_init_1): Likewise.
161
ef2ace64
GA
1622021-07-09 Jason Merrill <jason@redhat.com>
163
164 PR c++/101098
165 * decl.c (function_requirements_equivalent_p): Only compare
166 trailing requirements on a specialization.
167
1682021-07-09 Iain Sandoe <iain@sandoe.co.uk>
169
170 * coroutines.cc (build_actor_fn): Move common code to
171 act_des_fn.
172 (build_destroy_fn): Likewise.
173 (act_des_fn): Build the void return here. Ensure that the
174 source location matches the original function.
175
1762021-07-09 Iain Sandoe <iain@sandoe.co.uk>
177
178 * coroutines.cc
179 (coro_rewrite_function_body): Connect the replacement
180 function block to the block nest correctly.
181
1822021-07-09 Patrick Palka <ppalka@redhat.com>
183
184 PR c++/101181
185 * constraint.cc (tsubst_requires_expr): Pass complain/in_decl to
186 add_extra_args.
187 * cp-tree.h (add_extra_args): Add complain/in_decl parameters.
188 * pt.c (build_extra_args): Make a copy of args.
189 (add_extra_args): Add complain/in_decl parameters. Enable the
190 code for handling the case where the extra arguments are
191 dependent.
192 (tsubst_pack_expansion): Pass complain/in_decl to
193 add_extra_args.
194 (tsubst_template_args): Handle missing template arguments.
195 (tsubst_expr) <case IF_STMT>: Pass complain/in_decl to
196 add_extra_args.
197
1982021-07-09 Patrick Palka <ppalka@redhat.com>
199
200 PR c++/101247
201 * pt.c (any_template_parm_r) <case TEMPLATE_DECL>: Just walk the
202 DECL_CONTEXT.
203
fdc4d2a5
GA
2042021-07-08 Martin Sebor <msebor@redhat.com>
205
206 PR bootstrap/101372
207 * module.cc (identifier): Suppress warning.
208 (module_state::read_macro_maps): Remove warning suppression.
209 (module_state::install_macros): Ditto.
210
2112021-07-08 Marek Polacek <polacek@redhat.com>
212
213 PR c++/101087
214 * cp-tree.h (unevaluated_p): New.
215 * except.c (check_noexcept_r): Use it. Don't walk into
216 unevaluated operands.
217
2182021-07-08 Martin Sebor <msebor@redhat.com>
219
220 PR bootstrap/101374
221 * module.cc (module_state::read_macro_maps): Temporarily disable
222 -Warray-bounds.
223 (module_state::install_macros): Same.
224
6fba0eea
GA
2252021-07-06 Martin Sebor <msebor@redhat.com>
226
227 * error.c (cp_printer): Remove support for %G and %K.
228
7a60a6e8
GA
2292021-07-02 Jakub Jelinek <jakub@redhat.com>
230
231 * parser.h (struct cp_lexer): Add in_omp_attribute_pragma member.
232 (struct cp_omp_declare_simd_data): Likewise.
233 * cp-tree.h (enum cp_tree_index): Add CPTI_OMP_IDENTIFIER.
234 (omp_identifier): Define.
235 * parser.c (cp_parser_skip_to_pragma_eol): Handle
236 in_omp_attribute_pragma CPP_PRAGMA_EOL followed by CPP_EOF.
237 (cp_parser_require_pragma_eol): Likewise.
238 (struct cp_omp_attribute_data): New type.
239 (cp_parser_handle_statement_omp_attributes): New function.
240 (cp_parser_statement): Handle OpenMP directives in statement's
241 attribute-specifier-seq.
242 (cp_parser_omp_directive_args, cp_parser_omp_sequence_args): New
243 functions.
244 (cp_parser_std_attribute): Handle omp::directive and omp::sequence
245 attributes.
246 (cp_parser_omp_all_clauses): If in_omp_attribute_pragma, allow
247 a comma also before the first clause.
248 (cp_parser_omp_allocate): Likewise.
249 (cp_parser_omp_atomic): Likewise.
250 (cp_parser_omp_depobj): Likewise.
251 (cp_parser_omp_flush): Likewise.
252 (cp_parser_omp_ordered): Likewise.
253 (cp_parser_omp_declare_simd): Save in_omp_attribute_pragma
254 into struct cp_omp_declare_simd_data.
255 (cp_finish_omp_declare_variant): Add in_omp_attribute_pragma
256 argument. If set, allow a comma also before match clause.
257 (cp_parser_late_parsing_omp_declare_simd): If in_omp_attribute_pragma,
258 allow a comma also before the first clause. Adjust
259 cp_finish_omp_declare_variant caller.
260 (cp_parser_omp_declare_target): If in_omp_attribute_pragma, allow
261 a comma also before the first clause.
262 (cp_parser_omp_declare_reduction_exprs): Likewise.
263 (cp_parser_omp_requires): Likewise.
264 * decl.c (initialize_predefined_identifiers): Initialize
265 omp_identifier.
266 * decl2.c (cplus_decl_attributes): Reject omp::directive and
267 omp::sequence attributes.
268
2692021-07-02 Jakub Jelinek <jakub@redhat.com>
270
271 PR c/101297
272 * parser.c (cp_parser_omp_atomic): Consume comma only if it
273 appears before a CPP_NAME.
274
2752021-07-02 Patrick Palka <ppalka@redhat.com>
276
277 PR c++/101247
278 * pt.c (any_template_parm_r) <case TEMPLATE_DECL>: Rewrite to
279 use common_enclosing_class and to not depend on the TREE_TYPE
280 of outer levels pointing to the corresponding primary template.
281
bea7c16a
GA
2822021-07-01 Patrick Palka <ppalka@redhat.com>
283
284 PR c++/101194
285 * constexpr.c (cxx_eval_array_reference): When the element type
286 is an empty type and the corresponding element is omitted, just
287 return an empty CONSTRUCTOR instead of attempting value
288 initialization.
289
2902021-07-01 Patrick Palka <ppalka@redhat.com>
291
292 PR c++/96204
293 * pt.c (finish_template_variable): Pass the partially
294 instantiated template and its args to instantiate_template.
295 (instantiate_class_template_1): No need to call
296 push_nested_class and pop_nested_class around the call to
297 most_specialized_partial_spec.
298 (instantiate_template_1): Pass the partially instantiated
299 template to lookup_template_variable.
300 (most_specialized_partial_spec): Use push_access_scope_guard
301 to set the access scope appropriately. Use
302 deferring_access_check_sentinel to force access to get checked
303 immediately.
304 (instantiate_decl): Just pass the VAR_DECL to
305 most_specialized_partial_spec.
306
25b6bfea
GA
3072021-06-30 Patrick Palka <ppalka@redhat.com>
308
309 * constraint.cc (get_normalized_constraints_from_decl): Use
310 push_access_scope_guard instead of push_nested_class_guard.
311 * cp-tree.h (struct push_nested_class_guard): Replace with ...
312 (struct push_access_scope_guard): ... this.
313 * pt.c (push_access_scope): When the argument corresponds to
314 a class type, push the class instead of its context.
315 (pop_access_scope): Adjust accordingly.
316
3172021-06-30 Marek Polacek <polacek@redhat.com>
318
319 PR c++/100975
320 DR 2397
321 * decl.c (create_array_type_for_decl): Allow array of auto.
322
6bc18203
GA
3232021-06-29 Jason Merrill <jason@redhat.com>
324
325 * pt.c (instantiate_decl): Only consider partial specializations of
326 actual variable templates.
327
461f937b
GA
3282021-06-26 Patrick Palka <ppalka@redhat.com>
329
330 PR c++/96204
331 * pt.c (instantiate_class_template_1): Enter the scope of the
332 type when calling most_specialized_partial_spec.
333
3342021-06-26 Jason Merrill <jason@redhat.com>
335
336 PR c++/101040
337 PR c++/97566
338 * class.c (is_empty_field): Handle null argument.
339 * constexpr.c (cxx_eval_bare_aggregate): Discard initializer
340 for empty field.
341
90708f87
GA
3422021-06-26 Marek Polacek <polacek@redhat.com>
343
344 PR c++/100752
345 * parser.c (cp_parser_declarator): Pass flags down to
346 cp_parser_declarator. Also pass static_p/member_p.
347
3482021-06-25 Martin Sebor <msebor@redhat.com>
349
350 * call.c (build_over_call): Replace direct uses of TREE_NO_WARNING
351 with warning_suppressed_p, suppress_warning, and copy_no_warning, or
352 nothing if not necessary.
353 (set_up_extended_ref_temp): Same.
354 * class.c (layout_class_type): Same.
355 * constraint.cc (constraint_satisfaction_value): Same.
356 * coroutines.cc (finish_co_await_expr): Same.
357 (finish_co_yield_expr): Same.
358 (finish_co_return_stmt): Same.
359 (build_actor_fn): Same.
360 (coro_rewrite_function_body): Same.
361 (morph_fn_to_coro): Same.
362 * cp-gimplify.c (genericize_eh_spec_block): Same.
363 (gimplify_expr_stmt): Same.
364 (cp_genericize_r): Same.
365 (cp_fold): Same.
366 * cp-ubsan.c (cp_ubsan_instrument_vptr): Same.
367 * cvt.c (cp_fold_convert): Same.
368 (convert_to_void): Same.
369 * decl.c (wrapup_namespace_globals): Same.
370 (grokdeclarator): Same.
371 (finish_function): Same.
372 (require_deduced_type): Same.
373 * decl2.c (no_linkage_error): Same.
374 (c_parse_final_cleanups): Same.
375 * except.c (expand_end_catch_block): Same.
376 * init.c (build_new_1): Same.
377 (build_new): Same.
378 (build_vec_delete_1): Same.
379 (build_vec_init): Same.
380 (build_delete): Same.
381 * method.c (defaultable_fn_check): Same.
382 * parser.c (cp_parser_fold_expression): Same.
383 (cp_parser_primary_expression): Same.
384 * pt.c (push_tinst_level_loc): Same.
385 (tsubst_copy): Same.
386 (tsubst_omp_udr): Same.
387 (tsubst_copy_and_build): Same.
388 * rtti.c (build_if_nonnull): Same.
389 * semantics.c (maybe_convert_cond): Same.
390 (finish_return_stmt): Same.
391 (finish_parenthesized_expr): Same.
392 (cp_check_omp_declare_reduction): Same.
393 * tree.c (build_cplus_array_type): Same.
394 * typeck.c (build_ptrmemfunc_access_expr): Same.
395 (cp_build_indirect_ref_1): Same.
396 (cp_build_function_call_vec): Same.
397 (warn_for_null_address): Same.
398 (cp_build_binary_op): Same.
399 (unary_complex_lvalue): Same.
400 (cp_build_modify_expr): Same.
401 (build_x_modify_expr): Same.
402 (convert_for_assignment): Same.
403
9aa8327e
GA
4042021-06-24 Patrick Palka <ppalka@redhat.com>
405
406 PR c++/98832
407 * pt.c (maybe_aggr_guide): Handle alias templates appropriately.
408
4092021-06-24 Patrick Palka <ppalka@redhat.com>
410
411 PR c++/101182
412 * constraint.cc (evaluate_requires_expr): Adjust function comment.
413 * cp-gimplify.c (cp_genericize_r) <case REQUIRES_EXPR>: Move to ...
414 (cp_fold) <case REQUIRES_EXPR>: ... here.
415
4162021-06-24 Jakub Jelinek <jakub@redhat.com>
417
418 * parser.c (cp_omp_split_clauses): Pass C_ORT_OMP_TARGET instead of
419 C_ORT_OMP for clauses on target construct.
420 (OMP_TARGET_CLAUSE_MASK): Add in_reduction clause.
421 (cp_parser_omp_target): For non-combined target add
422 map (always, tofrom:) clauses for OMP_CLAUSE_IN_REDUCTION. Pass
423 C_ORT_OMP_TARGET to finish_omp_clauses.
424 * semantics.c (handle_omp_array_sections_1): Adjust ort handling
425 for addition of C_ORT_OMP_TARGET and simplify, mapping clauses are
426 never present on C_ORT_*DECLARE_SIMD.
427 (handle_omp_array_sections): Likewise.
428 (finish_omp_clauses): Likewise. Handle OMP_CLAUSE_IN_REDUCTION
429 on C_ORT_OMP_TARGET, set OMP_CLAUSE_MAP_IN_REDUCTION on
430 corresponding map clauses.
431 * pt.c (tsubst_expr): Pass C_ORT_OMP_TARGET instead of C_ORT_OMP for
432 clauses on target construct.
433
fcf617f0
GA
4342021-06-23 Patrick Palka <ppalka@redhat.com>
435
436 PR c++/101174
437 * pt.c (push_access_scope): For artificial deduction guides,
438 set the access scope to that of the constructor.
439 (pop_access_scope): Likewise.
440 (build_deduction_guide): Don't set DECL_CONTEXT on the guide.
441
4422021-06-23 Patrick Palka <ppalka@redhat.com>
443
444 PR c++/86439
445 * call.c (print_error_for_call_failure): Constify 'args' parameter.
446 (perform_dguide_overload_resolution): Define.
447 * cp-tree.h: (perform_dguide_overload_resolution): Declare.
448 * pt.c (do_class_deduction): Use perform_dguide_overload_resolution
449 instead of build_new_function_call. Don't use tf_decltype or
450 set cp_unevaluated_operand. Remove unnecessary NULL_TREE tests.
451
2f080224
GA
4522021-06-21 Patrick Palka <ppalka@redhat.com>
453
454 PR c++/67302
455 * typeck.c (check_return_expr): Call maybe_undo_parenthesized_ref
456 sooner, before the NRVO handling.
457
4582021-06-21 Patrick Palka <ppalka@redhat.com>
459
460 PR c++/80431
461 * tree.c (bot_replace): Use convert_to_base to build the
462 conversion to the (morally) virtual base.
463
4642021-06-21 Jakub Jelinek <jakub@redhat.com>
465
466 PR inline-asm/100785
467 * typeck.c (cxx_mark_addressable): Diagnose trying to make
468 bit-fields addressable.
469
688359a2
GA
4702021-06-17 Jason Merrill <jason@redhat.com>
471
472 PR c++/101106
473 * decl.c (duplicate_decls): Make 'deleted after first declaration'
474 pedwarn on by default.
475
4762021-06-17 Jason Merrill <jason@redhat.com>
477
478 PR c++/101029
479 * init.c (build_vec_init): Preserve the type of base.
480
9a61dfdb
GA
4812021-06-16 Jason Merrill <jason@redhat.com>
482
483 PR c++/101078
484 PR c++/91706
485 * pt.c (tsubst_baselink): Update binfos in non-dependent case.
486
ede6c356
GA
4872021-06-15 Robin Dapp <rdapp@linux.ibm.com>
488
489 * decl.c (duplicate_decls): Likewise.
490
8dc48181
GA
4912021-06-14 Tobias Burnus <tobias@codesourcery.com>
492
493 PR c/100913
494 * parser.c (cp_parser_omp_clause_affinity): No need to set iterator
495 var in the error case.
496
4e70c34e
GA
4972021-06-13 Trevor Saunders <tbsaunde@tbsaunde.org>
498
499 * constexpr.c (cxx_eval_call_expression): Iterate over vec<>
500 with range based for.
501 (cxx_eval_store_expression): Likewise.
502 (cxx_eval_loop_expr): Likewise.
503 * decl.c (wrapup_namespace_globals): Likewise.
504 (cp_finish_decl): Likewise.
505 (cxx_simulate_enum_decl): Likewise.
506 * parser.c (cp_parser_postfix_expression): Likewise.
507
8b8c3912
GA
5082021-06-12 Jason Merrill <jason@redhat.com>
509
510 PR c++/101029
511 * init.c (build_vec_init): Shortcut [0] case.
512
5132021-06-12 Jason Merrill <jason@redhat.com>
514
515 * pt.c (lookup_template_class_1): Shortcut current_class_type.
516
f16f65f8
GA
5172021-06-11 Patrick Palka <ppalka@redhat.com>
518
519 DR 1227
520 PR c++/96560
521 * pt.c (tsubst_arg_types): Rearrange so that we substitute into
522 TYPE_ARG_TYPES in forward order while short circuiting
523 appropriately. Adjust formatting.
524
5252021-06-11 Jakub Jelinek <jakub@redhat.com>
526
527 PR c++/100974
528 * cp-tree.h (struct saved_scope): Add consteval_if_p
529 member. Formatting fix for the discarded_stmt comment.
530 (in_consteval_if_p, IF_STMT_CONSTEVAL_P): Define.
531 * parser.c (cp_parser_lambda_expression): Temporarily disable
532 in_consteval_if_p when parsing lambda body.
533 (cp_parser_selection_statement): Parse consteval if.
534 * decl.c (struct named_label_entry): Add in_consteval_if member.
535 (level_for_consteval_if): New function.
536 (poplevel_named_label_1, check_previous_goto_1, check_goto): Handle
537 consteval if.
538 * constexpr.c (cxx_eval_builtin_function_call): Clarify in comment
539 why CP_BUILT_IN_IS_CONSTANT_EVALUATED needs to *non_constant_p
540 for !ctx->manifestly_const_eval.
541 (cxx_eval_conditional_expression): For IF_STMT_CONSTEVAL_P evaluate
542 condition as if it was __builtin_is_constant_evaluated call.
543 (potential_constant_expression_1): For IF_STMT_CONSTEVAL_P always
544 recurse on both branches.
545 * cp-gimplify.c (genericize_if_stmt): Genericize IF_STMT_CONSTEVAL_P
546 as the else branch.
547 * pt.c (tsubst_expr) <case IF_STMT>: Copy IF_STMT_CONSTEVAL_P.
548 Temporarily set in_consteval_if_p when recursing on
549 IF_STMT_CONSTEVAL_P then branch.
550 (tsubst_lambda_expr): Temporarily disable
551 in_consteval_if_p when instantiating lambda body.
552 * call.c (immediate_invocation_p): Return false when
553 in_consteval_if_p.
554
43c35d0d
GA
5552021-06-11 Marek Polacek <polacek@redhat.com>
556
557 PR c++/100995
558 * constexpr.c (maybe_constexpr_fn): New.
559 * cp-tree.h (maybe_constexpr_fn): Declare.
560 * semantics.c (find_std_constant_evaluated_r): New.
561 (maybe_warn_for_constant_evaluated): New.
562 (finish_if_stmt_cond): Call it.
563
5642021-06-10 Patrick Palka <ppalka@redhat.com>
565
566 PR c++/67829
567 * pt.c (unify) <case BOUND_TEMPLATE_TEMPLATE_PARM>: When
568 the TEMPLATE_DECL of a BOUND_TEMPLATE_TEMPLATE_PARM argument is
569 a template template parameter, adjust to the
570 TEMPLATE_TEMPLATE_PARAMETER before falling through.
571
5722021-06-10 Patrick Palka <ppalka@redhat.com>
573
574 PR c++/100946
575 * constraint.cc (normalize_placeholder_type_constraints): When
576 normalizing a non-templated return-type-requirement, add a dummy
577 level to initial_parms.
578
c6038721
GA
5792021-06-08 Marek Polacek <polacek@redhat.com>
580
581 PR c++/100065
582 * decl.c (grokdeclarator): Store a value-dependent
583 explicit-specifier even for deduction guides.
584
5852021-06-08 Jason Merrill <jason@redhat.com>
586
587 * parser.c (cp_parser_string_literal): Adjust diagnostic.
588
5892021-06-08 Jason Merrill <jason@redhat.com>
590
591 PR c++/100963
592 * call.c (perfect_conversion_p): Check check_narrowing.
593
5942021-06-08 Jason Merrill <jason@redhat.com>
595
596 PR c++/91706
597 * name-lookup.c (get_class_binding): Keep a BASELINK.
598 (set_inherited_value_binding_p): Adjust.
599 * lambda.c (is_lambda_ignored_entity): Adjust.
600 * pt.c (lookup_template_function): Copy a BASELINK before
601 modifying it.
602
6032021-06-08 Jason Merrill <jason@redhat.com>
604
605 PR c++/91706
606 * semantics.c (baselink_for_fns): Fix BASELINK_BINFO.
607
6082021-06-08 Jason Merrill <jason@redhat.com>
609
610 * module.cc (duplicate_hash::hash): Comment out.
611 (trees_in::tree_value): Adjust loop counter.
612
6132021-06-08 Jason Merrill <jason@redhat.com>
614
615 PR c++/100102
616 * init.c (build_offset_ref): Return the BASELINK for a static
617 member function.
618
438aac59
GA
6192021-06-07 Patrick Palka <ppalka@redhat.com>
620
621 PR c++/100918
622 * parser.c (cp_parser_lookup_name): Check access of the lookup
623 result before we potentially adjust an injected-class-name to
624 its TEMPLATE_DECL.
625
7d6987e9
GA
6262021-06-06 Jakub Jelinek <jakub@redhat.com>
627
628 PR c/100902
629 * parser.c (cp_parser_omp_target): Call c_omp_adjust_map_clauses
630 even when target is combined with other constructs.
631
600f90cb
GA
6322021-06-04 Patrick Palka <ppalka@redhat.com>
633
634 PR c++/100893
635 * pt.c (convert_template_argument): Strip top-level cv-quals
636 on the substituted type of a non-type template parameter.
637
6382021-06-04 Patrick Palka <ppalka@redhat.com>
639
640 PR c++/100102
641 * pt.c (tsubst_function_decl): Remove old code for reducing
642 args when it has excess levels.
643
6442021-06-04 Jakub Jelinek <jakub@redhat.com>
645
646 PR c++/100872
647 * name-lookup.c (maybe_save_operator_binding): Add op_attr after all
648 ATTR_IS_DEPENDENT attributes in the DECL_ATTRIBUTES list rather than
649 to the start.
650
440c8a0a
GA
6512021-06-03 Patrick Palka <ppalka@redhat.com>
652
653 PR c++/100592
654 * decl.c (make_typename_type): After calling
655 lookup_template_class, adjust the result to its TYPE_NAME and
656 then consider the tf_keep_type_decl flag.
657
6582021-06-03 Patrick Palka <ppalka@redhat.com>
659
660 PR c++/100862
661 * pt.c (set_current_access_from_decl): Move to ...
662 * class.c (set_current_access_from_decl): ... here.
663 (handle_using_decl): Use it to propagate the access of the
664 using-enum decl to the copy of the imported enumerator.
665 * cp-tree.h (set_current_access_from_decl): Declare.
666 * decl.c (build_enumerator): Simplify using make_temp_override
667 and set_current_access_from_decl.
668
6692021-06-03 Jakub Jelinek <jakub@redhat.com>
670
671 PR c++/100859
672 * semantics.c (handle_omp_array_sections_1): For
673 OMP_CLAUSE_{AFFINITY,DEPEND} handle FIELD_DECL base using
674 finish_non_static_data_member and allow this as base.
675 (finish_omp_clauses): Move OMP_CLAUSE_AFFINITY
676 after depend only cases. Let this be diagnosed by !lvalue_p
677 case for OMP_CLAUSE_{AFFINITY,DEPEND} and remove useless
678 assert.
679 * pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_AFFINITY.
680
9663c744
GA
6812021-06-02 Jason Merrill <jason@redhat.com>
682
683 PR c++/100838
684 * call.c (convert_like_internal): Clear tf_no_cleanup when
685 recursing.
686 (build_user_type_conversion_1): Only add ck_rvalue if
687 LOOKUP_ONLYCONVERTING.
688
b75978d1
GA
6892021-06-01 Patrick Palka <ppalka@redhat.com>
690
691 PR c++/65816
692 * init.c (expand_aggr_init_1): Check
693 type_has_non_user_provided_default_constructor instead of
694 type_has_user_provided_constructor.
695
6962021-06-01 Jason Merrill <jason@redhat.com>
697
698 PR c++/91859
699 * call.c (build_op_delete_call): Don't set CALL_FROM_NEW_OR_DELETE_P
700 for destroying delete.
701 * init.c (build_delete): Don't clobber before destroying delete.
702
7032021-06-01 Jason Merrill <jason@redhat.com>
704
705 PR c++/94492
706 * decl2.c (cp_warn_deprecated_use): Check warning_enabled_at.
707
ee682192
GA
7082021-05-31 Richard Biener <rguenther@suse.de>
709
710 PR c++/88601
711 * cp-objcp-common.c (names_builtin_p): Handle
712 RID_BUILTIN_SHUFFLEVECTOR.
713 * cp-tree.h (build_x_shufflevector): Declare.
714 * parser.c (cp_parser_postfix_expression): Handle
715 RID_BUILTIN_SHUFFLEVECTOR.
716 * pt.c (tsubst_copy_and_build): Handle IFN_SHUFFLEVECTOR.
717 * typeck.c (build_x_shufflevector): Build either a lowered
718 VEC_PERM_EXPR or an unlowered shufflevector via a temporary
719 internal function IFN_SHUFFLEVECTOR.
720
48166757
GA
7212021-05-28 Jason Merrill <jason@redhat.com>
722
723 * constexpr.c (build_data_member_initialization): Use tsi_range.
724 (build_constexpr_constructor_member_initializers): Likewise.
725 (constexpr_fn_retval, cxx_eval_statement_list): Likewise.
726 (potential_constant_expression_1): Likewise.
727 * coroutines.cc (await_statement_expander): Likewise.
728 (await_statement_walker): Likewise.
729 * module.cc (trees_out::core_vals): Likewise.
730 * pt.c (tsubst_expr): Likewise.
731 * semantics.c (set_cleanup_locs): Likewise.
732
7332021-05-28 Jason Merrill <jason@redhat.com>
734
735 PR c++/100797
736 PR c++/95719
737 * call.c (build_over_call): Adjust base_binfo in
738 resolves_to_fixed_type_p case.
739
7402021-05-28 Jakub Jelinek <jakub@redhat.com>
741
742 PR middle-end/99928
743 * semantics.c (handle_omp_array_sections): Copy
744 OMP_CLAUSE_MAP_IMPLICIT.
745 (finish_omp_clauses): Move not just OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
746 marked clauses last, but also OMP_CLAUSE_MAP_IMPLICIT. Add
747 map_firstprivate_head bitmap, set it for GOMP_MAP_FIRSTPRIVATE_POINTER
748 maps and silently remove OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT if it is
749 present too. For OMP_CLAUSE_MAP_IMPLICIT silently remove the clause
750 if present in map_head, map_field_head or map_firstprivate_head
751 bitmaps.
752
7532021-05-28 Tobias Burnus <tobias@codesourcery.com>
754
755 * parser.c (cp_parser_omp_clause_affinity): New.
756 (cp_parser_omp_clause_name, cp_parser_omp_var_list_no_open,
757 cp_parser_omp_all_clauses, OMP_TASK_CLAUSE_MASK): Handle affinity
758 clause.
759 * semantics.c (handle_omp_array_sections_1, handle_omp_array_sections,
760 finish_omp_clauses): Likewise.
761
cd62d089
GA
7622021-05-27 Matthias Kretz <kretz@kde.org>
763
764 PR c++/100716
765 * error.c (dump_template_bindings): Include code to print
766 "[with" and ']', conditional on whether anything is printed at
767 all. This is tied to whether a semicolon is needed to separate
768 multiple template parameters. If the template argument repeats
769 the template parameter (T = T), then skip the parameter.
770 (dump_substitution): Moved code to print "[with" and ']' to
771 dump_template_bindings.
772 (dump_function_decl): Partial revert of PR50828, which masked
773 TFF_TEMPLATE_NAME for all of dump_function_decl. Now
774 TFF_TEMPLATE_NAME is masked for the scope of the function and
775 only carries through to dump_function_name.
776 (dump_function_name): Avoid calling dump_template_parms if
777 TFF_TEMPLATE_NAME is set.
778
7792021-05-27 Matthias Kretz <kretz@kde.org>
780
781 PR c++/100763
782 * error.c: Call dump_scope when printing a typedef.
783
7842021-05-27 Patrick Palka <ppalka@redhat.com>
785
786 PR c++/99893
787 * tree.c (cp_walk_subtrees) <case STATIC_ASSERT>: New case.
788
7892021-05-27 Jason Merrill <jason@redhat.com>
790
791 PR c++/86355
792 * pt.c (use_pack_expansion_extra_args_p): Don't compare
793 args from the same argument pack.
794
7952021-05-27 Patrick Palka <ppalka@redhat.com>
796
797 DR 1315
798 PR c++/67593
799 PR c++/96555
800 * pt.c (process_partial_specialization): Don't error on a
801 non-simple non-type template argument that involves template
802 parameters.
803 (for_each_template_parm_r): Don't walk TRAIT_EXPR, PLUS_EXPR,
804 MULT_EXPR, or SCOPE_REF when include_nondeduced_p is false.
805
01c59ef2
GA
8062021-05-26 Patrick Palka <ppalka@redhat.com>
807
808 PR c++/100502
809 * typeck.c (finish_class_member_access_expr): Disable ahead
810 of time access checking during the member lookup.
811
8122021-05-26 Patrick Palka <ppalka@redhat.com>
813
814 PR c++/100368
815 * tree.c (build_target_expr_with_type): Don't call force_rvalue
816 on CALL_EXPR initializer. Simplify now that bot_manip is no
817 longer a caller.
818 (bot_manip): Use force_target_expr instead of
819 build_target_expr_with_type.
820
8212021-05-26 Patrick Palka <ppalka@redhat.com>
822
823 PR c++/97420
824 * cvt.c (noexcept_conv_p): Remove redundant checks and simplify.
825 (fnptr_conv_p): Don't call non_reference. Use INDIRECT_TYPE_P
826 instead of TYPE_PTR_P.
827 * pt.c (convert_nontype_argument_function): Look through
828 implicit INDIRECT_REFs before calling strip_fnptr_conv.
829
2bc6dace
GA
8302021-05-25 Jakub Jelinek <jakub@redhat.com>
831
832 PR c++/100666
833 * call.c (convert_arg_to_ellipsis): For expressions with NULLPTR_TYPE
834 and side-effects, temporarily disable -Wunused-result warning when
835 building COMPOUND_EXPR.
836
2832d51b
GA
8372021-05-21 Jakub Jelinek <jakub@redhat.com>
838
839 PR middle-end/99928
840 * semantics.c (finish_omp_clauses): Move firstprivate clauses with
841 OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT to the end of the chain. Don't error
842 if a decl is mentioned both in map clause and in such firstprivate
843 clause unless OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET is also set.
844
ea34e2ed
GA
8452021-05-20 Jason Merrill <jason@redhat.com>
846
847 * call.c (reference_binding): Check for designator.
848 (implicit_conversion_1, build_special_member_call): Likewise.
849 * decl.c (reshape_init_r): Likewise.
850 * pt.c (do_class_deduction): Likewise.
851 * typeck2.c (digest_init_r): Likewise.
852
8532021-05-20 Jason Merrill <jason@redhat.com>
854
855 PR c++/100489
856 * decl.c (reshape_init_class): Handle designator for
857 member of anonymous aggregate here.
858 * typeck2.c (process_init_constructor_record): Not here.
859
8602021-05-20 Jonathan Wakely <jwakely@redhat.com>
861
862 * call.c (maybe_warn_array_conv): Use new warning option.
863 * decl.c (mark_inline_variable, grokdeclarator): Likewise.
864 * error.c (maybe_warn_cpp0x): Likewise.
865 * parser.c (cp_parser_primary_expression)
866 (cp_parser_unqualified_id)
867 (cp_parser_pseudo_destructor_name)
868 (cp_parser_lambda_introducer)
869 (cp_parser_lambda_declarator_opt)
870 (cp_parser_selection_statement)
871 (cp_parser_init_statement)
872 (cp_parser_decomposition_declaration)
873 (cp_parser_function_specifier_opt)
874 (cp_parser_static_assert)
875 (cp_parser_namespace_definition)
876 (cp_parser_using_declaration)
877 (cp_parser_asm_definition)
878 (cp_parser_ctor_initializer_opt_and_function_body)
879 (cp_parser_initializer_list)
880 (cp_parser_type_parameter_key)
881 (cp_parser_member_declaration)
882 (cp_parser_try_block)
883 (cp_parser_std_attribute_spec): Likewise.
884 * pt.c (check_template_variable): Likewise.
885
8862021-05-20 Jason Merrill <jason@redhat.com>
887
888 PR c++/100634
889 * pt.c (invalid_nontype_parm_type_p): Return true for COMPLEX_TYPE.
890
8912021-05-20 Jason Merrill <jason@redhat.com>
892
893 PR c++/100659
894 * cp-tree.h (CONST_DECL_USING_P): Check for null TREE_TYPE.
895
65f32e5d
GA
8962021-05-19 Jason Merrill <jason@redhat.com>
897
898 PR c++/100367
899 PR c++/96299
900 * method.c (genericize_spaceship): Use fold_build2 for scalar
901 operands.
902
9032021-05-19 Jason Merrill <jason@redhat.com>
904
905 * pt.c (build_deduction_guide): Treat the implicit deduction guide
906 as a member of the class.
907
9082021-05-19 Marek Polacek <polacek@redhat.com>
909
910 PR c++/100596
911 * cp-tree.h (any_non_type_attribute_p): Remove.
912 * decl.c (grokdeclarator): Turn an error into a warning and only
913 warn for standard attributes.
914 * decl2.c (any_non_type_attribute_p): Remove.
915 * parser.c (cp_parser_elaborated_type_specifier): Turn an error
916 into a warning and only warn for standard attributes.
917 (cp_parser_member_declaration): Likewise.
918
9192021-05-19 Martin Liska <mliska@suse.cz>
920
921 PR testsuite/100658
922 * mangle.c (write_encoding): Fix typos.
923
9242021-05-19 Jakub Jelinek <jakub@redhat.com>
925
926 PR middle-end/99928
927 * parser.c (cp_parser_omp_master): Set OMP_MASTER_COMBINED on
928 master when combined with taskloop.
929 (cp_parser_omp_parallel): Don't set OMP_PARALLEL_COMBINED on
930 parallel master when not combined with taskloop.
931
9322021-05-19 Jason Merrill <jason@redhat.com>
933
934 PR c++/100261
935 * rtti.c (get_tinfo_decl_direct): Check TYPE_TRANSPARENT_AGGR.
936
9372021-05-19 Jason Merrill <jason@redhat.com>
938
939 PR c++/100372
940 * tree.c (strip_typedefs): Only look at the pattern of a
941 TYPE_PACK_EXPANSION if it's a type.
942
a8daf9a1
GA
9432021-05-18 Marek Polacek <polacek@redhat.com>
944
945 * class.c (classtype_has_non_deleted_copy_ctor): Remove.
946 * constraint.cc (contains_wildcard_p): Likewise.
947 (get_template_head_requirements): Likewise.
948 (check_constrained_friend): Likewise.
949 (subsumes_constraints): Likewise.
950 * cp-tree.h (classtype_has_non_deleted_copy_ctor): Likewise.
951 (push_void_library_fn): Likewise.
952 (get_pattern_parm): Likewise.
953 (get_template_parms_at_level): Likewise.
954 (lambda_return_type): Likewise.
955 (get_template_head_requirements): Likewise.
956 (check_constrained_friend): Likewise.
957 (subsumes_constraints): Likewise.
958 * decl.c (push_void_library_fn): Likewise.
959 * lambda.c (lambda_return_type): Likewise.
960 * pt.c (get_template_parms_at_level): Likewise.
961 (get_pattern_parm): Likewise.
962
9632021-05-18 Jason Merrill <jason@redhat.com>
964
965 PR c++/100644
966 * call.c (perfect_candidate_p): An implicitly deleted move
967 is not perfect.
968
9692021-05-18 Andreas Krebbel <krebbel@linux.ibm.com>
970
971 PR c++/100281
972 * cvt.c (cp_convert_to_pointer): Use the size of the target
973 pointer type.
974 * tree.c (cp_build_reference_type): Call
975 cp_build_reference_type_for_mode with VOIDmode.
976 (cp_build_reference_type_for_mode): Rename from
977 cp_build_reference_type. Add MODE argument and invoke
978 build_reference_type_for_mode.
979 (strip_typedefs): Use build_pointer_type_for_mode and
980 cp_build_reference_type_for_mode for pointers and references.
981
a7ffc1ef
GA
9822021-05-17 Jonathan Wakely <jwakely@redhat.com>
983
984 PR c++/100635
985 * call.c (convert_like_internal): Print different diagnostic if
986 the lvalue reference is const.
987
87a7d10c
GA
9882021-05-14 Jason Merrill <jason@redhat.com>
989
990 PR c++/95870
991 * pt.c (enclosing_instantiation_of): Just compare
992 DECL_SOURCE_LOCATION.
993 (regenerate_decl_from_template): Copy DECL_SOURCE_LOCATION.
994
9952021-05-14 Marek Polacek <polacek@redhat.com>
996 Jason Merrill <jason@redhat.com>
997
998 PR c++/99032
999 * cp-tree.h (any_non_type_attribute_p): Declare.
1000 * decl.c (grokdeclarator): Diagnose when an attribute appertains to
1001 a friend declaration that is not a definition.
1002 * decl2.c (any_non_type_attribute_p): New.
1003 * parser.c (cp_parser_decl_specifier_seq): Diagnose standard attributes
1004 in the middle of decl-specifiers.
1005 (cp_parser_elaborated_type_specifier): Diagnose when an attribute
1006 appertains to a friend declaration that is not a definition.
1007 (cp_parser_member_declaration): Likewise.
1008
0ff3a0f2
GA
10092021-05-12 Marek Polacek <polacek@redhat.com>
1010
1011 * pt.c (tsubst_copy_and_build): Add warn_int_in_bool_context
1012 sentinel.
1013
10142021-05-12 Marcel Vollweiler <marcel@codesourcery.com>
1015
1016 * parser.c (cp_parser_omp_clause_map): Support map-type-modifier
1017 'close'.
1018
037e3661
GA
10192021-05-11 Jason Merrill <jason@redhat.com>
1020
1021 PR c++/100517
1022 * typeck.c (build_reinterpret_cast_1): Check intype on
1023 cast to vector.
1024
10252021-05-11 Patrick Palka <ppalka@redhat.com>
1026
1027 PR c++/51577
1028 * name-lookup.c (maybe_save_operator_binding): Unconditionally
1029 enable for all function templates, not just generic lambdas.
1030 Handle compound-assignment operator expressions.
1031 * typeck.c (build_x_compound_expr): Call maybe_save_operator_binding
1032 in the type-dependent case.
1033 (build_x_modify_expr): Likewise. Move declaration of 'op' closer
1034 to its first use.
1035
10362021-05-11 Patrick Palka <ppalka@redhat.com>
1037
1038 PR c++/100138
1039 * constraint.cc (tsubst_constraint): Set up cp_unevaluated.
1040 (satisfy_atom): Set up iloc_sentinel before calling
1041 cxx_constant_value.
1042 * pt.c (tsubst_pack_expansion): When returning a rebuilt pack
1043 expansion, carry over PACK_EXPANSION_LOCAL_P and
1044 PACK_EXPANSION_SIZEOF_P from the original pack expansion.
1045
aa891c56
GA
10462021-05-10 Richard Biener <rguenther@suse.de>
1047
1048 PR middle-end/100464
1049 PR c++/100468
1050 * call.c (set_up_extended_ref_temp): Mark the temporary
1051 addressable if the TARGET_EXPR was.
1052
10532021-05-10 Martin Liska <mliska@suse.cz>
1054
1055 * decl.c (duplicate_decls): Use startswith
1056 function instead of strncmp.
1057 (cxx_builtin_function): Likewise.
1058 (omp_declare_variant_finalize_one): Likewise.
1059 (grokfndecl): Likewise.
1060 * error.c (dump_decl_name): Likewise.
1061 * mangle.c (find_decomp_unqualified_name): Likewise.
1062 (write_guarded_var_name): Likewise.
1063 (decl_tls_wrapper_p): Likewise.
1064 * parser.c (cp_parser_simple_type_specifier): Likewise.
1065 (cp_parser_tx_qualifier_opt): Likewise.
1066 * pt.c (template_parm_object_p): Likewise.
1067 (dguide_name_p): Likewise.
1068
10692021-05-10 Martin Liska <mliska@suse.cz>
1070
1071 PR c++/99616
1072 * decl.c (grokdeclarator): Remove redundant NULL check.
1073
62d87a32
GA
10742021-05-07 Jason Merrill <jason@redhat.com>
1075
1076 * tree.c (rvalue): Assert expr is not a class lvalue.
1077
10782021-05-07 Jason Merrill <jason@redhat.com>
1079
1080 * cp-tree.h (build_stub_object): Declare.
1081 * method.c (build_stub_object): No longer static.
1082 * call.c (can_convert): Use it.
1083 * tree.c (build_dummy_object): Adjust comment.
1084 * typeck.c (cp_build_binary_op): Wrap SPACESHIP_EXPR in a
1085 TARGET_EXPR.
1086
10872021-05-07 Jason Merrill <jason@redhat.com>
1088
1089 * coroutines.cc (build_co_await): Don't call 'rvalue'.
1090 (flatten_await_stmt): Simplify initialization.
1091 (morph_fn_to_coro): Change 'rvalue' to 'move'. Simplify.
1092
99e8df7a
GA
10932021-05-04 Tobias Burnus <tobias@codesourcery.com>
1094
1095 * semantics.c (finish_omp_reduction_clause): Accept float + complex
1096 for || and && reductions.
1097
e690396d
GA
10982021-05-03 Patrick Palka <ppalka@redhat.com>
1099
1100 PR c++/100362
1101 * parser.c (cp_parser_class_head): Reinstate calls to pushclass
1102 and popclass when parsing the base-clause that were removed in
1103 r11-6815.
1104
11052021-05-03 Patrick Palka <ppalka@redhat.com>
1106
1107 PR c++/68942
1108 PR c++/100344
1109 * pt.c (tsubst_copy_and_build) <case CALL_EXPR>: Set tf_conv
1110 only when the callee is a FUNCTION_DECL.
1111
11122021-05-03 Marek Polacek <polacek@redhat.com>
1113
1114 PR c++/100055
1115 * decl.c (grokfndecl): Check current_template_parms.
1116
11172021-05-03 Marek Polacek <polacek@redhat.com>
1118
1119 DR 1312
1120 * constexpr.c (cxx_eval_constant_expression): Don't check
1121 integer_zerop.
1122
620a0635
GA
11232021-05-01 Jason Merrill <jason@redhat.com>
1124
1125 * cp-tree.h (class ovl_iterator): Allow copying. Add op==.
1126 (class ovl_range, class lkp_range): New.
1127 * call.c (build_op_call_1, add_candidates): Use them.
1128 (build_op_delete_call, has_trivial_copy_assign_p): Likewise.
1129 (has_trivial_copy_p): Likewise.
1130 * class.c (handle_using_decl, get_basefndecls): Likewise.
1131 (maybe_warn_about_overly_private_class): Likewise.
1132 (warn_hidden, add_implicitly_declared_members): Likewise.
1133 (check_methods, clone_constructors_and_destructors): Likewise.
1134 (type_has_user_nondefault_constructor): Likewise.
1135
3c8e539d
GA
11362021-04-29 Jason Merrill <jason@redhat.com>
1137
1138 * constexpr.c (cxx_fold_indirect_ref_1): Only set *empty_base if we
1139 don't find a field.
1140
11412021-04-29 Jason Merrill <jason@redhat.com>
1142
1143 PR c++/51344
1144 * decl2.c (grokfield): Call cplus_decl_attributes for friend.
1145 (save_template_attributes): Use chainon.
1146 * friend.c (do_friend): Remove attrlist parm.
1147 * cp-tree.h (do_friend): Adjust.
1148 * class.c (add_implicitly_declared_members): Adjust.
1149 * decl.c (grokdeclarator): Adjust.
1150 * pt.c (apply_late_template_attributes): Optimize.
1151
11522021-04-29 Jason Merrill <jason@redhat.com>
1153
1154 PR c++/97974
1155 * class.c (finish_struct_anon_r): Drop complain parm.
1156 Remove non-field diagnostic.
1157 (finish_struct_anon): Adjust.
1158 * decl.c (fixup_anonymous_aggr): Move non-field diagnostic here.
1159
11602021-04-29 Jason Merrill <jason@redhat.com>
1161
1162 * cp-tree.h (cp_evaluated): Add reset parm to constructor.
1163 * parser.c (cp_parser_constant_expression): Change
1164 allow_non_constant_p to int. Use cp_evaluated.
1165 (cp_parser_initializer_clause): Pass 2 to allow_non_constant_p.
1166 * semantics.c (finish_id_expression_1): Don't mess with
1167 cp_unevaluated_operand here.
1168
11692021-04-29 Jason Merrill <jason@redhat.com>
1170
1171 * cp-tree.h: Clarify comments.
1172 * pt.c (get_template_parm_object): Add assert.
1173 * semantics.c (finish_compound_literal): Clear TREE_HAS_CONSTRUCTOR.
1174 * tree.c (zero_init_expr_p): Check TREE_HAS_CONSTRUCTOR.
1175 * typeck2.c (store_init_value): Likewise.
1176
11772021-04-29 Patrick Palka <ppalka@redhat.com>
1178
1179 PR c++/68942
1180 * pt.c (tsubst_copy_and_build) <case CALL_EXPR>: When KOENIG_P,
1181 set tf_conv during the initial substitution into the function.
1182
11832021-04-29 Jakub Jelinek <jakub@redhat.com>
1184
1185 PR c++/100319
1186 * semantics.c (finish_omp_clauses): Fix up check that variable
1187 mentioned in detach clause doesn't appear in data-sharing clauses.
1188
e4ff4ffb
GA
11892021-04-28 Jakub Jelinek <jakub@redhat.com>
1190
1191 * module.cc: Remove #error that triggers if DEV-PHASE is empty.
1192
8f54dd61
GA
11932021-04-27 Jason Merrill <jason@redhat.com>
1194
1195 PR c++/92145
1196 * class.c (classtype_has_depr_implicit_copy): Check DECL_CONTEXT
1197 of operator=.
1198
11992021-04-27 Patrick Palka <ppalka@redhat.com>
1200
1201 PR c++/88580
1202 * pt.c (tsubst_initializer_list): Correctly handle the case
1203 where an argument inside a base initializer pack expansion is
1204 itself a pack expansion.
1205
c0fa3f2f
GA
12062021-04-26 Patrick Palka <ppalka@redhat.com>
1207
1208 PR c++/100209
1209 * constexpr.c (cxx_fold_indirect_ref): Try to canonicalize the
1210 object/offset pair for a POINTER_PLUS_EXPR of a COMPONENT_REF
1211 with a negative offset into one whose offset is nonnegative
1212 before calling cxx_fold_indirect_ref_1.
1213
502ef97c
GA
12142021-04-24 Patrick Palka <ppalka@redhat.com>
1215
1216 PR c++/89565
1217 PR c++/93383
1218 PR c++/95291
1219 PR c++/99200
1220 PR c++/99683
1221 * pt.c (do_class_deduction): Punt if the initializer is
1222 type-dependent.
1223
12242021-04-24 Patrick Palka <ppalka@redhat.com>
1225
1226 PR c++/87709
1227 * parser.c (cp_parser_type_id_1): If we see a template
1228 placeholder, first try simulating an error before issuing
1229 a real error.
1230
05ec629f
GA
12312021-04-23 Patrick Palka <ppalka@redhat.com>
1232
1233 PR c++/98767
1234 * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause):
1235 Adjust parameter list loop to iterate over 'types' instead of
1236 'args'. Output the trailing '...' for a variadic function.
1237 Remove PARM_DECL support.
1238 (pp_cxx_requires_expr): Pretty print the parameter list directly
1239 instead of going through pp_cxx_parameter_declaration_clause.
1240
12412021-04-23 Patrick Palka <ppalka@redhat.com>
1242
1243 DR 2374
1244 * decl.c (is_direct_enum_init): Check the implicit
1245 convertibility requirement added by CWG 2374.
1246
12472021-04-23 Martin Liska <mliska@suse.cz>
1248
1249 * cp-tree.h (STATIC_ASSERT): Prefer static assert.
1250 * lex.c (init_operators): Remove run-time check.
1251
e3948473
GA
12522021-04-22 Marek Polacek <polacek@redhat.com>
1253
1254 PR c++/100161
1255 * pt.c (tsubst_copy_and_build) <case PLUS_EXPR>: Test op0 and
1256 op1 separately for value- or type-dependence.
1257
c1ef0c92
GA
12582021-04-21 Marek Polacek <polacek@redhat.com>
1259
1260 PR c++/96380
1261 * parser.c (cp_parser_enum_specifier): Don't allow defining
1262 types in enum-base.
1263
12642021-04-21 Martin Liska <mliska@suse.cz>
1265
1266 Revert:
1267 2021-04-21 Martin Liska <mliska@suse.cz>
1268
1269 * error.c (dump_decl): Use flags in dump_generic_node call.
1270
12712021-04-21 Martin Liska <mliska@suse.cz>
1272
1273 * error.c (dump_decl): Use flags in dump_generic_node call.
1274
12752021-04-21 Martin Liska <mliska@suse.cz>
1276
1277 * error.c (dump_decl): Support anonymous labels.
1278
be8aad8d
GA
12792021-04-20 Jason Merrill <jason@redhat.com>
1280
1281 PR c++/100109
1282 * pt.c (find_parameter_packs_r): Look into enum initializers.
1283
6e81e015
GA
12842021-04-19 Marek Polacek <polacek@redhat.com>
1285
1286 PR c++/97536
1287 * decl.c (grokvardecl): Given an error when a concept is not defined
1288 at namespace scope.
1289
8ae884c0
GA
12902021-04-16 Jakub Jelinek <jakub@redhat.com>
1291
1292 PR c++/100111
1293 * constexpr.c (cxx_eval_store_expression): Don't add CONSTRUCTORs
1294 for empty classes into *valp when types don't match even when *valp
1295 is NULL.
1296
12972021-04-16 Marek Polacek <polacek@redhat.com>
1298
1299 PR c++/99803
1300 * decl.c (make_typename_type): Give an error and return when
1301 name is is_overloaded_fn.
1302 * parser.c (cp_parser_class_name): Don't check is_overloaded_fn
1303 before calling make_typename_type.
1304
13052021-04-16 Patrick Palka <ppalka@redhat.com>
1306
1307 PR c++/99700
1308 * constexpr.c (reduced_constant_expression_p): For array
1309 CONSTRUCTORs, use a dedicated loop that additionally verifies
1310 the CONSTRUCTOR spans the entire array.
1311
13122021-04-16 Jakub Jelinek <jakub@redhat.com>
1313
1314 PR c++/99850
1315 * parser.c (cp_parser_constraint_requires_parens) <case CPP_DEREF>:
1316 If lambda_p, return pce_ok instead of pce_maybe_postfix.
1317
13182021-04-16 Jakub Jelinek <jakub@redhat.com>
1319
1320 PR c++/99833
1321 * pt.c (extract_locals_r): When handling DECL_EXPR of a structured
1322 binding, add to data.internal also all corresponding structured
1323 binding decls.
1324
13252021-04-16 Jason Merrill <jason@redhat.com>
1326
1327 PR c++/100079
1328 * cp-tree.h (first_field): Declare.
1329 * mangle.c (range_expr_nelts): New.
1330 (write_expression): Improve class NTTP mangling.
1331 * pt.c (get_template_parm_object): Clear TREE_HAS_CONSTRUCTOR.
1332 * tree.c (zero_init_expr_p): Improve class NTTP handling.
1333 * decl.c: Adjust comment.
1334
ee351f7f
GA
13352021-04-15 Jason Merrill <jason@redhat.com>
1336
1337 PR c++/80456
1338 * call.c (build_new_method_call_1): Check again for side-effects
1339 with a volatile object.
1340
13412021-04-15 Jason Merrill <jason@redhat.com>
1342
1343 PR c++/100101
1344 PR c++/99583
1345 * pt.c (find_parameter_packs_r) [FUNCTION_TYPE]: Walk into
1346 TYPE_RAISES_EXCEPTIONS here.
1347 * tree.c (cp_walk_subtrees): Not here.
1348
13492021-04-15 Jason Merrill <jason@redhat.com>
1350
1351 PR c++/100091
1352 PR c++/99478
1353 * parser.c (cp_parser_default_type_template_argument): Set
1354 parser->local_variables_forbidden_p.
1355
13562021-04-15 Richard Sandiford <richard.sandiford@arm.com>
1357
1358 PR c++/98852
1359 * typeck.c (merge_type_attributes_from): New function.
1360 (cp_common_type): Use it for vector types.
1361
df3b1289
GA
13622021-04-14 Jason Merrill <jason@redhat.com>
1363
1364 PR c++/100078
1365 PR c++/93085
1366 * pt.c (uses_outer_template_parms): Also look at default
1367 template argument.
1368
13692021-04-14 Jason Merrill <jason@redhat.com>
1370
1371 PR c++/93314
1372 * semantics.c (finish_id_expression_1): Clear cp_unevaluated_operand
1373 for a non-static data member in a constant-expression.
1374
13752021-04-14 Patrick Palka <ppalka@redhat.com>
1376
1377 PR c++/83476
1378 PR c++/99885
1379 * pt.c (deducible_expression): Look through implicit
1380 INDIRECT_REFs as well.
1381
13822021-04-14 Jason Merrill <jason@redhat.com>
1383
1384 PR c++/99478
1385 * parser.c (cp_parser_lambda_expression): Reject lambda
1386 in template parameter type.
1387
13882021-04-14 Jason Merrill <jason@redhat.com>
1389
1390 PR c++/90674
1391 * decl.c (duplicate_decls): Don't propagate
1392 DECL_INITIALIZED_IN_CLASS_P to a specialization.
1393
13942021-04-14 Jason Merrill <jason@redhat.com>
1395
1396 PR c++/88742
1397 PR c++/49951
1398 PR c++/58123
1399 * semantics.c (set_cleanup_locs): New.
1400 (do_poplevel): Call it.
1401 * parser.c (cp_parser_compound_statement): Consume the }
1402 before finish_compound_stmt.
1403
6d0d35d5
GA
14042021-04-13 Jason Merrill <jason@redhat.com>
1405
1406 PR c++/100032
1407 * pt.c (get_underlying_template): Compare TYPE_QUALS.
1408
14092021-04-13 Jason Merrill <jason@redhat.com>
1410
1411 PR c++/100054
1412 PR c++/90479
1413 * init.c (get_nsdmi): Do more context adjustment for local classes.
1414
14152021-04-13 Patrick Palka <ppalka@redhat.com>
1416
1417 PR c++/99008
1418 * pt.c (do_class_deduction): Reject alias CTAD in C++17 mode
1419 rather than issuing a pedwarn.
1420 * typeck2.c (build_functional_cast_1): Handle CTAD uniformly
1421 for consistent diagnostics.
1422
14232021-04-13 Jason Merrill <jason@redhat.com>
1424
1425 PR c++/91933
1426 * class.c (build_base_path): Shortcut simple non-pointer case.
1427
14282021-04-13 Eric Botcazou <ebotcazou@adacore.com>
1429
1430 * module.cc (ordinary_loc_of): Test LINEMAPS_MACRO_LOWEST_LOCATION
1431 of the linemap.
1432 (module_state::write_location): Likewise.
1433
14342021-04-13 Patrick Palka <ppalka@redhat.com>
1435
1436 PR c++/97134
1437 * pt.c (do_class_deduction): Look through EXPR_PACK_EXPANSION
1438 when checking if the initializer is an equivalent class
1439 placeholder template parameter.
1440
14412021-04-13 Patrick Palka <ppalka@redhat.com>
1442
1443 PR c++/99961
1444 PR c++/99994
1445 * constraint.cc (satisfy_normalized_constraints): Set
1446 cp_unevaluated.
1447 * parser.c (cp_parser_concept_definition): Likewise.
1448 (cp_parser_requires_clause_opt): Likewise.
1449
287ad814
GA
14502021-04-12 Jason Merrill <jason@redhat.com>
1451
1452 PR c++/93085
1453 * pt.c (uses_outer_template_parms): Handle non-type and template
1454 template parameters specifically.
1455
a0ecde22
GA
14562021-04-11 Jason Merrill <jason@redhat.com>
1457
1458 PR c++/97974
1459 * decl.c (fixup_anonymous_aggr): Prune all functions from
1460 CLASSTYPE_MEMBER_VEC.
1461
1d54b138
GA
14622021-04-10 Jason Merrill <jason@redhat.com>
1463
1464 PR c++/98800
1465 PR c++/97399
1466 * parser.c (cp_parser_direct_declarator): Don't
1467 inject_this_parameter if static_p.
1468 (cp_parser_omp_var_list_no_open): Parse 'this' even if
1469 current_class_ptr isn't set for a better diagnostic.
1470
14712021-04-10 Jason Merrill <jason@redhat.com>
1472
1473 PR c++/99180
1474 PR c++/93295
1475 PR c++/93867
1476 PR c++/99118
1477 PR c++/96873
1478 * pt.c (alias_ctad_tweaks): Handle failure better.
1479
14802021-04-10 Jason Merrill <jason@redhat.com>
1481
1482 PR c++/100006
1483 * pt.c (find_parameter_packs_r) [TAG_DEFN]: Look into bases.
1484
3115aba8
GA
14852021-04-09 Patrick Palka <ppalka@redhat.com>
1486
1487 * cp-tree.h (LAMBDA_EXPR_REGENERATED_FROM)
1488 (LAMBDA_EXPR_REGENERATING_TARGS): Replace these with ...
1489 (LAMBDA_EXPR_REGEN_INFO): ... this.
1490 (tree_lambda_expr::regenerated_from)
1491 (tree_lambda_expr::regenerating_targs): Replace these with ...
1492 (tree_lambda_expr::regen_info): ... this.
1493 * constraint.cc (satisfy_declaration_constraints): Adjust
1494 accordingly.
1495 * lambda.c (build_lambda_expr): Likewise.
1496 * pt.c (regenerated_lambda_fn_p): Likewise.
1497 (most_general_lambda): Likewise.
1498 (tsubst_lambda_expr): Likewise.
1499
15002021-04-09 Marek Polacek <polacek@redhat.com>
1501
1502 PR c++/99806
1503 * parser.c (cp_parser_member_declaration): Call
1504 cp_parser_save_default_args even for function templates. Use
1505 STRIP_TEMPLATE on the declaration we're passing.
1506
019a9220
GA
15072021-04-08 Patrick Palka <ppalka@redhat.com>
1508
1509 PR c++/99874
1510 * constraint.cc (get_normalized_constraints_from_decl): Handle
1511 regenerated lambdas.
1512 (satisfy_declaration_constraints): Likewise. Check for
1513 dependent args later.
1514 * cp-tree.h (LAMBDA_EXPR_INSTANTIATED): Replace with ...
1515 (LAMBDA_EXPR_REGENERATED_FROM): ... this.
1516 (LAMBDA_EXPR_REGENERATING_TARGS): New.
1517 (tree_lambda_expr::regenerated_from): New data member.
1518 (tree_lambda_expr::regenerating_targs): New data member.
1519 (add_to_template_args): Declare.
1520 (regenerated_lambda_fn_p): Likewise.
1521 (most_general_lambda): Likewise.
1522 * lambda.c (build_lambda_expr): Set LAMBDA_EXPR_REGENERATED_FROM
1523 and LAMBDA_EXPR_REGENERATING_TARGS.
1524 * pt.c (add_to_template_args): No longer static.
1525 (tsubst_function_decl): Unconditionally propagate constraints on
1526 the substituted function decl.
1527 (instantiated_lambda_fn_p): Rename to ...
1528 (regenerated_lambda_fn_p): ... this. Check
1529 LAMBDA_EXPR_REGENERATED_FROM instead of
1530 LAMBDA_EXPR_INSTANTIATED.
1531 (most_general_lambda): Define.
1532 (enclosing_instantiation_of): Adjust after renaming
1533 instantiated_lambda_fn_p.
1534 (tsubst_lambda_expr): Don't set LAMBDA_EXPR_INSTANTIATED. Set
1535 LAMBDA_EXPR_REGENERATED_FROM and LAMBDA_EXPR_REGENERATING_TARGS.
1536 Don't substitute or set constraints on the regenerated lambda.
1537
15382021-04-08 Patrick Palka <ppalka@redhat.com>
1539
1540 PR c++/97679
1541 * pt.c (build_deduction_guide): Document OUTER_ARGS. Substitute
1542 them into the propagated constraints.
1543
15442021-04-08 Jason Merrill <jason@redhat.com>
1545
1546 PR c++/91849
1547 * call.c (convert_like_internal): Improve reference diagnostic.
1548
15492021-04-08 Jakub Jelinek <jakub@redhat.com>
1550
1551 PR c++/99859
1552 * constexpr.c (addr_of_non_const_var): New function.
1553 (cxx_bind_parameters_in_call): Set *non_constant_args to true
1554 even if cp_walk_tree on arg with addr_of_non_const_var callback
1555 returns true.
1556
15572021-04-08 Jason Merrill <jason@redhat.com>
1558
1559 PR c++/94529
1560 * pt.c (determine_specialization): Improve diagnostic.
1561
15622021-04-08 Marek Polacek <polacek@redhat.com>
1563
1564 PR c++/99844
1565 * decl.c (build_explicit_specifier): Call
1566 check_for_bare_parameter_packs.
1567 * except.c (build_noexcept_spec): Likewise.
1568
299859c2
GA
15692021-04-07 Jason Merrill <jason@redhat.com>
1570
1571 PR c++/41723
1572 * parser.c (cp_parser_class_name): Check dependent_scope_p.
1573
15742021-04-07 Jason Merrill <jason@redhat.com>
1575
1576 PR c++/52625
1577 * pt.c (maybe_process_partial_specialization): Check
1578 DECL_SELF_REFERENCE_P.
1579
15802021-04-07 Jason Merrill <jason@redhat.com>
1581
1582 PR c++/92918
1583 * name-lookup.c (push_class_level_binding_1): Do overload a new
1584 function with a previous using-declaration.
1585
8cac6af6
GA
15862021-04-06 Jason Merrill <jason@redhat.com>
1587
1588 PR c++/96673
1589 * init.c (get_nsdmi): Don't defer access checking.
1590
15912021-04-06 Jason Merrill <jason@redhat.com>
1592
1593 PR c++/99901
1594 * decl.c (cp_finish_decl): mark_needed an implicitly inline
1595 static data member with an out-of-class redeclaration.
1596
15972021-04-06 Jason Merrill <jason@redhat.com>
1598
1599 PR c++/91241
1600 * mangle.c (write_compact_number): Add sanity check.
1601 (write_local_name): Use list_length for parm number.
1602
16032021-04-06 Patrick Palka <ppalka@redhat.com>
1604
1605 PR c++/99899
1606 * pt.c (do_auto_deduction): Don't exit early when deducing the
1607 array type of a structured binding. Also handle adc_decomp_type
1608 during constraint checking.
1609
b1da9916
GA
16102021-04-05 Jason Merrill <jason@redhat.com>
1611
1612 PR c++/96311
1613 * typeck.c (check_return_expr): Call mark_exp_read in dependent
1614 case.
1615
16162021-04-05 Jason Merrill <jason@redhat.com>
1617
1618 PR c++/98440
1619 * typeck.c (build_reinterpret_cast_1): Don't perform
1620 temporary materialization.
1621
16222021-04-05 Jason Merrill <jason@redhat.com>
1623
1624 PR c++/95317
1625 * pt.c (lookup_template_class_1): Do tsubst_enum when
1626 tsubsting a generic lambda.
1627
16282021-04-05 Jason Merrill <jason@redhat.com>
1629
1630 PR c++/95870
1631 * pt.c (enclosing_instantiation_of): Compare DECL_SOURCE_LOCATION if
1632 there is no enclosing non-lambda function.
1633
16342021-04-05 Nathan Sidwell <nathan@acm.org>
1635
1636 PR c++/99380
1637 * module.cc (name_pending_imports): Drop 'atend' parm. Don't
1638 query export when not needed.
1639 (preprocess_module, preprocessed_module): Adjust.
1640
16412021-04-05 Jason Merrill <jason@redhat.com>
1642
1643 PR c++/99066
1644 * pt.c (mark_decl_instantiated): Set DECL_EXTERNAL.
1645
16462021-04-05 Jason Merrill <jason@redhat.com>
1647
1648 PR c++/99201
1649 * pt.c (class el_data): Add visited field.
1650 (extract_local_specs): Pass it to cp_walk_tree.
1651 (extract_locals_r): Walk into the body of a lambda.
1652
16532021-04-05 Jason Merrill <jason@redhat.com>
1654
1655 * ptree.c (cxx_print_decl): Check DECL_MODULE_IMPORT_P on
1656 template result.
1657
91472884
GA
16582021-04-04 Jason Merrill <jason@redhat.com>
1659
1660 PR c++/99643
1661 * typeck2.c (massage_init_elt): Don't strip TARGET_EXPR.
1662
c0756c4e
GA
16632021-04-03 Marek Polacek <polacek@redhat.com>
1664
1665 PR c++/91416
1666 * parser.c: Create a GC root for attributes in a decl specifier.
1667 (cp_parser_type_specifier): Push/pop ->attributes onto/from it.
1668
16692021-04-03 Jason Merrill <jason@redhat.com>
1670
1671 PR c++/91217
1672 * pt.c (tsubst_lambda_expr): Skip the body block from
1673 DECL_SAVED_TREE.
1674
16752021-04-03 Jason Merrill <jason@redhat.com>
1676
1677 PR c++/90664
1678 * cvt.c (can_convert_qual): Check fnptr_conv_p.
1679
16802021-04-03 Jason Merrill <jason@redhat.com>
1681
1682 PR c++/97900
1683 * pt.c (regenerate_decl_from_template): tsubst_decl
1684 the parms.
1685
b7c1f3d6
GA
16862021-04-02 Patrick Palka <ppalka@redhat.com>
1687
1688 PR c++/99869
1689 * parser.c (do_range_for_auto_deduction): Pass adc_variable_type
1690 to do_auto_deduction.
1691
16922021-04-02 Patrick Palka <ppalka@redhat.com>
1693
1694 PR c++/99586
1695 * semantics.c (finish_compound_literal): Check
1696 template_placeholder_p instead of type_uses_auto.
1697
16982021-04-02 Jason Merrill <jason@redhat.com>
1699
1700 PR c++/97938
1701 * cp-tree.h (PACK_EXPANSION_AUTO_P): New.
1702 * lambda.c (add_capture): Set it.
1703 * pt.c (tsubst_pack_expansion): Handle it.
1704
17052021-04-02 Nathan Sidwell <nathan@acm.org>
1706
1707 * cp-tree.h (lang_decl_base): Correct module flag comment.
1708 * module.cc (trees_in::assert_definition): Break out
1709 not_tmpl var.
1710 (trees_out::lang_decl_bools): Do not write purview for header units.
1711
f1607029
GA
17122021-04-01 Marek Polacek <polacek@redhat.com>
1713
1714 PR c++/99831
1715 * method.c (defaulted_late_check): ++ and -- function_depth around
1716 the call to synthesize_method.
1717 * pt.c: Remove the saved_trees global.
1718
17192021-04-01 Jason Merrill <jason@redhat.com>
1720
1721 PR c++/99583
1722 PR c++/99584
1723 * tree.c (cp_walk_subtrees) [FUNCTION_TYPE]: Walk into
1724 TYPE_RAISES_EXCEPTIONS.
1725
17262021-04-01 Iain Sandoe <iain@sandoe.co.uk>
1727
1728 * mapper-client.cc (INCLUDE_MAP): New; require map to be
1729 included from system.h.
1730 * mapper-resolver.cc (INCLUDE_MAP): Likewise.
1731
17322021-04-01 Jason Merrill <jason@redhat.com>
1733
1734 PR c++/98481
1735 * mangle.c (write_expression): Adjust.
1736 * class.c (find_abi_tags_r): Disable PR98481 fix for ABI v14.
1737 (mark_abi_tags_r): Likewise.
1738
17392021-04-01 Nathan Sidwell <nathan@acm.org>
1740
1741 PR c++/99283
1742 * module.cc (trees_out::decl_node): Adjust importedness reference
1743 assert.
1744 (module_state::intercluster_seed): New. Seed both imports and
1745 inter-cluster references. Broken out of ...
1746 (module_state::write_cluster): ... here. Call it.
1747
95d217ab
GA
17482021-03-31 Jason Merrill <jason@redhat.com>
1749
1750 PR c++/99445
1751 * tree.c (strip_typedefs): Handle TYPE_PACK_EXPANSION.
1752
17532021-03-31 Patrick Palka <ppalka@redhat.com>
1754
1755 PR c++/88115
1756 * mangle.c (write_expression): Adjust the mangling of
1757 __alignof__.
1758
17592021-03-31 Patrick Palka <ppalka@redhat.com>
1760
1761 PR c++/99815
1762 * pt.c (placeholder_type_constraint_dependent_p): Expand
1763 argument packs to separate the first non-pack argument
1764 from the rest.
1765
08d2edae
GA
17662021-03-30 Nathan Sidwell <nathan@acm.org>
1767
1768 PR c++/99283
1769 * module.cc (dumper::operator): Make less brittle.
1770 (trees_out::core_bools): VAR_DECLs always have a context.
1771 (trees_out::key_mergeable): Use same_type_p for asserting.
1772 (trees_in::read_var_def): Propagate
1773 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
1774
17752021-03-30 Jakub Jelinek <jakub@redhat.com>
1776
1777 PR c++/99790
1778 * cp-gimplify.c (cp_gimplify_expr): Handle PTRMEM_CST.
1779
651684b4
GA
17802021-03-26 Marek Polacek <polacek@redhat.com>
1781
1782 PR c++/98352
1783 * method.c (implicitly_declare_fn): Pass &raises to
1784 synthesized_method_walk.
1785
17862021-03-26 Nathan Sidwell <nathan@acm.org>
1787
1788 PR c++/99283
1789 * cp-tree.h (DECL_MODULE_CHECK): Ban TEMPLATE_DECL.
1790 (SET_TYPE_TEMPLATE_INFO): Restore Alias template setting.
1791 * decl.c (duplicate_decls): Remove template_decl module flag
1792 propagation.
1793 * module.cc (merge_kind_name): Add alias tmpl spec as a thing.
1794 (dumper::impl::nested_name): Adjust for template-decl module flag
1795 change.
1796 (trees_in::assert_definition): Likewise.
1797 (trees_in::install_entity): Likewise.
1798 (trees_out::decl_value): Likewise. Remove alias template
1799 separation of template and type_decl.
1800 (trees_in::decl_value): Likewise.
1801 (trees_out::key_mergeable): Likewise,
1802 (trees_in::key_mergeable): Likewise.
1803 (trees_out::decl_node): Adjust for template-decl module flag
1804 change.
1805 (depset::hash::make_dependency): Likewise.
1806 (get_originating_module, module_may_redeclare): Likewise.
1807 (set_instantiating_module, set_defining_module): Likewise.
1808 * name-lookup.c (name_lookup::search_adl): Likewise.
1809 (do_pushdecl): Likewise.
1810 * pt.c (build_template_decl): Likewise.
1811 (lookup_template_class_1): Remove special alias_template handling
1812 of DECL_TI_TEMPLATE.
1813 (tsubst_template_decl): Likewise.
1814
18152021-03-26 Jakub Jelinek <jakub@redhat.com>
1816
1817 PR c++/99705
1818 * tree.c (bot_manip): Remap artificial automatic temporaries mentioned
1819 in DECL_EXPR or in BIND_EXPR_VARS.
1820
4493b1c1
GA
18212021-03-25 Jakub Jelinek <jakub@redhat.com>
1822
1823 PR c++/99672
1824 * parser.c (cp_parser_postfix_expression): For calls, create
1825 combined_loc and temporarily set input_location to it before
1826 calling finish_call_expr.
1827
18282021-03-25 Marek Polacek <polacek@redhat.com>
1829
1830 PR c++/94751
1831 * call.c (build_over_call): Maybe call mark_used in case
1832 deduce_inheriting_ctor fails and return error_mark_node.
1833 * cp-tree.h (deduce_inheriting_ctor): Adjust declaration.
1834 * method.c (deduce_inheriting_ctor): Return bool if the deduction
1835 fails.
1836 (implicitly_declare_fn): If raises is error_mark_node, call
1837 synthesized_method_walk with diag being true.
1838
18392021-03-25 Jakub Jelinek <jakub@redhat.com>
1840
1841 PR c++/99745
1842 * decl2.c (grokbitfield): Diagnose bitfields containing bare parameter
1843 packs and don't set DECL_BIT_FIELD_REPRESENTATIVE in that case.
1844
18452021-03-25 Marek Polacek <polacek@redhat.com>
1846
1847 PR c++/99331
1848 * call.c (build_converted_constant_expr_internal): Don't emit
1849 -Wconversion warnings.
1850
18512021-03-25 Jakub Jelinek <jakub@redhat.com>
1852
1853 PR c++/99565
1854 * call.c (build_conditional_expr_1): Pass OEP_ADDRESS_OF_SAME_FIELD
1855 to operand_equal_p.
1856 * cvt.c (convert_to_void): Preserve location_t on COND_EXPR or
1857 or COMPOUND_EXPR.
1858
bf1f3168
GA
18592021-03-23 Nathan Sidwell <nathan@acm.org>
1860
1861 PR c++/99283
1862 * name-lookup.c (check_module_override): Set global or partition
1863 DUP on the binding vector.
1864
18652021-03-23 Marek Polacek <polacek@redhat.com>
1866
1867 PR c++/99318
1868 * decl2.c (cp_warn_deprecated_use_scopes): Only call
1869 cp_warn_deprecated_use when decl is a namespace, class, or enum.
1870
18712021-03-23 Nathan Sidwell <nathan@acm.org>
1872
1873 PR c++/99239
1874 * decl.c (duplicate_decls): Remove assert about maybe-imported
1875 artificial decls.
1876
18772021-03-23 Jakub Jelinek <jakub@redhat.com>
1878
1879 PR c++/99650
1880 * decl.c (cp_finish_decomp): Diagnose void initializers when
1881 using tuple_element and get.
1882
8b744f46
GA
18832021-03-22 Nathan Sidwell <nathan@acm.org>
1884
1885 PR c++/99480
1886 * module.cc (depset::hash::make_dependency): Propagate flags for
1887 partial specialization.
1888 (module_may_redeclare): Handle partial specialization.
1889
18902021-03-22 Nathan Sidwell <nathan@acm.org>
1891
1892 PR c++/99425
1893 * cp-tree.h (map_context_from, map_context_to): Delete.
1894 (add_mergeable_specialization): Add is_alias parm.
1895 * pt.c (add_mergeable_specialization): Add is_alias parm, add them.
1896 * module.cc (map_context_from, map_context_to): Delete.
1897 (trees_in::decl_value): Add specializations later, adjust call.
1898 Drop useless alias lookup. Set duplicate fn parm context.
1899 (check_mergeable_decl): Drop context mapping.
1900 (trees_in::is_matching_decl): Likewise.
1901 (trees_in::read_function_def): Drop parameter context adjustment
1902 here.
1903
19042021-03-22 Martin Liska <mliska@suse.cz>
1905
1906 PR c++/99687
1907 * module.cc (fini_modules): Call vec_free instead of delete.
1908
6af7b307
GA
19092021-03-20 Jakub Jelinek <jakub@redhat.com>
1910
1911 PR debug/99230
1912 * cp-gimplify.c (cp_genericize_r) <case STATEMENT_LIST>: Remove
1913 special code, instead call c_genericize_control_stmt.
1914
5f256a70
GA
19152021-03-19 Jakub Jelinek <jakub@redhat.com>
1916
1917 PR c++/99456
1918 * constexpr.c (cxx_eval_constant_expression): For CONVERT_EXPR from
1919 INDIRECT_TYPE_P to ARITHMETIC_TYPE_P, when !ctx->manifestly_const_eval
1920 don't diagnose it, set *non_constant_p nor return t.
1921
287e3e84
GA
19222021-03-19 Marek Polacek <polacek@redhat.com>
1923
1924 PR c++/99500
1925 * parser.c (cp_parser_requirement_parameter_list): Handle
1926 error_mark_node.
1927
19282021-03-18 Marek Polacek <polacek@redhat.com>
1929
1930 * pt.c (tsubst_copy_and_build) <case FLOAT_EXPR>: Remove.
1931
19322021-03-18 Marek Polacek <polacek@redhat.com>
1933
1934 * pt.c (tsubst_copy_and_build): Add assert.
1935
19362021-03-18 Iain Sandoe <iain@sandoe.co.uk>
1937
1938 PR objc++/49070
1939 * parser.c (cp_debug_parser): Add Objective-C++ message
1940 state flag.
1941 (cp_parser_nested_name_specifier_opt): Allow colon to
1942 terminate an assignment-expression when parsing Objective-
1943 C++ messages.
1944 (cp_parser_objc_message_expression): Set and clear message
1945 parsing state on entry and exit.
1946 * parser.h (struct cp_parser): Add a context flag for
1947 Objective-C++ message state.
1948
19492021-03-18 Martin Liska <mliska@suse.cz>
1950
1951 PR c++/99617
1952 * coroutines.cc (struct var_nest_node): Init then_cl and else_cl
1953 to NULL.
1954
19ac7c94
GA
19552021-03-17 Marek Polacek <polacek@redhat.com>
1956
1957 PR c++/97973
1958 * call.c (conv_unsafe_in_template_p): New.
1959 (convert_like): Use it.
1960
19612021-03-17 Anthony Sharp <anthonysharp15@gmail.com>
1962 Jason Merrill <jason@redhat.com>
1963
1964 * semantics.c (get_class_access_diagnostic_decl): New
1965 function that examines special cases when a parent
1966 class causes a private access failure.
1967 (enforce_access): Slightly modified to call function
1968 above.
1969
bc212776
GA
19702021-03-16 Jason Merrill <jason@redhat.com>
1971
1972 * tree.c (cp_tree_equal): Use real_identical.
1973
19742021-03-16 Jakub Jelinek <jakub@redhat.com>
1975
1976 PR c++/99613
1977 * decl.c (expand_static_init): For thread guards, call __cxa_atexit
1978 before calling __cxa_guard_release rather than after it. Formatting
1979 fixes.
1980
19812021-03-16 Martin Liska <mliska@suse.cz>
1982 Jason Merrill <jason@redhat.com>
1983
1984 PR c++/99108
1985 * call.c (get_function_version_dispatcher): Handle
1986 DECL_LOCAL_DECL_P.
1987 * decl.c (maybe_version_functions): Likewise.
1988 (maybe_mark_function_versioned): New.
1989 * name-lookup.c (push_local_extern_decl_alias): No longer static.
1990 * name-lookup.h (push_local_extern_decl_alias): Adjust.
1991
19922021-03-16 Nathan Sidwell <nathan@acm.org>
1993
1994 PR c++/99496
1995 * module.cc (trees_out::decl_value): Adjust typedef streaming,
1996 indicate whether it is a dependent alias.
1997 (trees_in::decl_value): Likewise. Set as dependent alias, if it
1998 is one.
1999
3c5b6d24
GA
20002021-03-15 Iain Sandoe <iain@sandoe.co.uk>
2001
2002 PR c++/99047
2003 * coroutines.cc (expand_one_await_expression): If the
2004 await_ready() expression is not a boolean then convert it
2005 as required.
2006
20072021-03-15 Iain Sandoe <iain@sandoe.co.uk>
2008
2009 PR c++/98704
2010 * coroutines.cc (build_actor_fn): Make destroy index 1
2011 correspond to the abnormal unhandled_exception() exit.
2012 Substitute the proxy for the resume index.
2013 (coro_rewrite_function_body): Arrange to reset the resume
2014 index and make done = true for a rethrown exception from
2015 unhandled_exception ().
2016 (morph_fn_to_coro): Adjust calls to build_actor_fn and
2017 coro_rewrite_function_body.
2018
20192021-03-15 Iain Sandoe <iain@sandoe.co.uk>
2020
2021 PR c++/98480
2022 * coroutines.cc (replace_continue): Rewrite continue into
2023 'goto label'.
2024 (await_statement_walker): Handle await expressions in the
2025 initializer, condition and iteration expressions of for
2026 loops.
2027
20282021-03-15 Iain Sandoe <iain@sandoe.co.uk>
2029
2030 PR c++/96749
2031 * coroutines.cc (flatten_await_stmt): Allow for the case
2032 where a target expression variable only has uses in the
2033 second part of a compound expression.
2034 (maybe_promote_temps): Avoid emiting empty statements.
2035
20362021-03-15 Tobias Burnus <tobias@codesourcery.com>
2037
2038 PR c++/99509
2039 * decl.c (cp_finish_decl): For 'omp declare target implicit' vars,
2040 ensure that the varpool node is marked as offloadable.
2041
6da2762a
GA
20422021-03-12 Nathan Sidwell <nathan@acm.org>
2043
2044 PR c++/99238
2045 * module.cc (depset::hash::add_binding_entity): Assert not
2046 visited.
2047 (depset::add::add_specializations): Likewise.
2048 * name-lookup.c (name_lookup::dedup): New.
2049 (name_lookup::~name_lookup): Assert not deduping.
2050 (name_lookup::restore_state): Likewise.
2051 (name_lookup::add_overload): Replace outlined code with dedup
2052 call.
2053 (name_lookup::add_value): Likewise.
2054 (name_lookup::search_namespace_only): Likewise.
2055 (name_lookup::adl_namespace_fns): Likewise.
2056 (name_lookup::adl_class_fns): Likewise.
2057 (name_lookup::search_adl): Likewise. Add clearing dedup call.
2058 (name_lookup::search_qualified): Likewise.
2059 (name_lookup::search_unqualified): Likewise.
2060
20612021-03-12 Jakub Jelinek <jakub@redhat.com>
2062
2063 PR c++/99507
2064 * call.c (build_over_call): For immediate evaluation of functions
2065 that return references, undo convert_from_reference effects before
2066 calling cxx_constant_value and call convert_from_reference
2067 afterwards.
2068
48ff383f
GA
20692021-03-11 Nathan Sidwell <nathan@acm.org>
2070
2071 PR c++/99248
2072 * name-lookup.c (lookup_elaborated_type_1): Access slot not bind
2073 when there's a binding vector.
2074 * ptree.c (cxx_print_xnode): Lazy flags are no longer a thing.
2075
20762021-03-11 Nathan Sidwell <nathan@acm.org>
2077
2078 PR c++/99528
2079 * module.cc (enum merge_kind): Delete MK_type_tmpl_spec,
2080 MK_decl_tmpl_spec.
2081 (trees_in::decl_value): Adjust add_mergeable_specialization call.
2082 (trees_out::get_merge_kind): Adjust detecting a partial template
2083 instantiation.
2084 (trees_out::key_mergeable): Adjust handling same.
2085 (trees_in::key_mergeabvle): Likewise.
2086
e9800852
GA
20872021-03-10 Nathan Sidwell <nathan@acm.org>
2088
2089 PR c++/99423
2090 * module.cc (post_load_processing): Assert not gcable.
2091 (laxy_load_pendings): Extend no-gc region around
2092 post_load_processing.
2093
20942021-03-10 Nathan Sidwell <nathan@acm.org>
2095
2096 PR c++/99508
2097 * decl.c (make_rtl_for_nonlocal_decl): Propagate local-extern's
2098 assembler name to the ns alias.
2099
8dc225d3
GA
21002021-03-09 Jakub Jelinek <jakub@redhat.com>
2101
2102 PR c++/99459
2103 * coroutines.cc (build_co_await): Look through NOP_EXPRs in
2104 build_special_member_call return value to find the CALL_EXPR.
2105 Simplify.
2106
21072021-03-09 Nathan Sidwell <nathan@acm.org>
2108
2109 PR c++/99472
2110 * parser.c (cp_parser_diagnose_invalid_type_name): Clarify
2111 that C++20 does not yet imply modules.
2112
6405b40f
GA
21132021-03-08 Nathan Sidwell <nathan@acm.org>
2114
2115 PR c++/99436
2116 * name-lookup.c (get_cxx_dialect_name): Add cxx23.
2117
21182021-03-08 Nathan Sidwell <nathan@acm.org>
2119
2120 * lex.c (module_token_filter::resume): Ignore module-decls inside
2121 header-unit.
2122 * parser.c (cp_parser_module_declaration): Reject in header-unit.
2123
21242021-03-08 Nathan Sidwell <nathan@acm.org>
2125
2126 PR c++/99285
2127 * cp-tree.h (match_mergeable_specialization)
2128 (add_mergeable_specialization): Adjust parms.
2129 * module.cc (trees_in::decl_value): Adjust
2130 add_mergeable_specialization calls.
2131 (trees_out::key_mergeable): Adjust match_mergeable_specialization
2132 calls.
2133 (specialization_add): Likewise.
2134 * pt.c (match_mergeable_specialization): Do not insert.
2135 (add_mergeable_specialization): Add to hash table here.
2136
0ad6a2e2
GA
21372021-03-06 Patrick Palka <ppalka@redhat.com>
2138 Jakub Jelinek <jakub@redhat.com>
2139
2140 PR c++/99287
2141 * constexpr.c (cxx_eval_increment_expression): Pass lval when
2142 evaluating the MODIFY_EXPR, and update 'mod' with the result of
2143 this evaluation. Check *non_constant_p afterwards. For prefix
2144 ops, just return 'mod'.
2145
21462021-03-06 Patrick Palka <ppalka@redhat.com>
2147 Jakub Jelinek <jakub@redhat.com>
2148
2149 PR c++/96330
2150 * pt.c (tsubst_copy) <case TEMPLATE_ID_EXPR>: Rename local
2151 variable 'fn' to 'tmpl'. Handle a variable template-id by
2152 calling lookup_template_variable.
2153
21542021-03-06 Patrick Palka <ppalka@redhat.com>
2155
2156 PR c++/99365
2157 * pt.c (unify) <case TEMPLATE_TYPE_PARM>: Pass targs as
2158 outer_targs to do_auto_deduction.
2159 (placeholder_type_constraint_dependent_p): Define.
2160 (do_auto_deduction): When processing_template_decl != 0
2161 and context is adc_unify and we have constraints, pretend the
2162 constraints are satisfied instead of punting. Otherwise don't
2163 punt unless placeholder_type_constraint_dependent_p holds.
2164 Add some clarifying sanity checks. Add a hack to add missing
2165 outermost template levels to outer_args before checking
2166 satisfaction. Don't substitute outer_targs into type if it's
2167 already been done.
2168
ceae9533
GA
21692021-03-05 Marek Polacek <polacek@redhat.com>
2170
2171 PR c++/99374
2172 * call.c (standard_conversion): When converting pointers to
2173 member, don't return NULL when the bases are equivalent but
2174 incomplete.
2175
21762021-03-05 Marek Polacek <polacek@redhat.com>
2177
2178 PR c++/99120
2179 * name-lookup.c (check_local_shadow): Check if the type of decl
2180 is non-null before checking TYPE_PTR*.
2181
21822021-03-05 Nathan Sidwell <nathan@acm.org>
2183
2184 PR c++/99245
2185 * module.cc (module_state::write_cluster): Relax binding assert.
2186
21872021-03-05 Nathan Sidwell <nathan@acm.org>
2188
2189 PR c++/99377
2190 * pt.c (instantiate_decl): Call set_instantiating_module.
2191
21922021-03-05 Iain Sandoe <iain@sandoe.co.uk>
2193
2194 PR c++/98118
2195 * coroutines.cc (build_co_await): Use type_build_ctor_call()
2196 to determine cases when a CTOR needs to be built.
2197 (flatten_await_stmt): Likewise.
2198 (morph_fn_to_coro): Likewise.
2199
22002021-03-05 Iain Sandoe <iain@sandoe.co.uk>
2201
2202 PR c++/95616
2203 * coroutines.cc (coro_diagnose_throwing_fn): New helper.
2204 (coro_diagnose_throwing_final_aw_expr): New helper.
2205 (build_co_await): Diagnose throwing final await expression
2206 components.
2207 (build_init_or_final_await): Diagnose a throwing promise
2208 final_suspend() call.
2209
22102021-03-05 Iain Sandoe <iain@sandoe.co.uk>
2211
2212 PR c++/95615
2213 * coroutines.cc (struct param_info): Track parameter copies that need
2214 a DTOR.
2215 (coro_get_frame_dtor): New helper function factored from build_actor().
2216 (build_actor_fn): Use coro_get_frame_dtor().
2217 (morph_fn_to_coro): Track parameters that need DTORs on exception,
2218 likewise the frame promise and the return object. On exception, run the
2219 DTORs for these, destroy the frame and then rethrow the exception.
2220
22212021-03-05 Nathan Sidwell <nathan@acm.org>
2222
2223 PR c++/99389
2224 * pt.c (instantiate_class_template_1): Set instantiating module
2225 here.
2226
22272021-03-05 Tobias Burnus <tobias@codesourcery.com>
2228
2229 PR c/99137
2230 * parser.c (cp_parser_oacc_clause_async): Reject comma expressions.
2231
67f10d28
GA
22322021-03-04 Jakub Jelinek <jakub@redhat.com>
2233
2234 PR c++/88146
2235 PR c++/99362
2236 * cvt.c (convert_to_void): Revert 2019-10-17 changes. Clarify
2237 comment.
2238
22392021-03-04 Nathan Sidwell <nathan@acm.org>
2240
2241 PR c++/99170
2242 * module.cc (class uintset): Delete.
2243 (typedef attached_map_t): A hash map.
2244 (attached_table): Use attached_map_t. Adjust uses ...
2245 (trees_out::decl_value, trees_in::decl_value): ... here ...
2246 (trees_out::key_mergeable): ... here ...
2247 (trees_in::key_mergeable): ... here ...
2248 (maybe_attach_decl): ... here ...
2249 (direct_import): ... and here.
2250
22512021-03-04 Nathan Sidwell <nathan@acm.org>
2252
2253 PR c++/99170
2254 * cp-tree.h
2255 * lex.c (cxx_dup_lang_specific_decl): Adjust for module_attached_p
2256 rename.
2257 * module.cc (class pending_key): New.
2258 (default_hash_traits<pending_key>): New specialization.
2259 (pending_map_t): New typedef.
2260 (pending_table): Replace old table.
2261 (trees_out::lang_decl_bools): Adjust.
2262 (trees_in::lang_decl_bools): Adjust.
2263 (trees_in::install_entity): Drop pending member and specialization
2264 handling.
2265 (find_pending_key): New.
2266 (depset::hash::fiund_dependencies): Use it.
2267 (pendset_lazy_load): Delete.
2268 (module_state::write_cluster): Don't count pendings here. Bye
2269 Duff's device-like thing.
2270 (module_state::write_pendings): Reimplement.
2271 (module_state::read_pendings): Reimplement.
2272 (lazy_specializations_p): Delete.
2273 (module_state::write): Adjust write_pendings call.
2274 (lazy_load_pendings): New.
2275 (lazy_load_specializations): Delete.
2276 (lazy_load_members): Delete.
2277 (init_modules): Adjust.
2278 * name-lookup.c (maybe_lazily_declare): Call lazy_load_pendings
2279 not lazy_load_members.
2280 (note_pending_specializations): Delete.
2281 (load_pending_specializations): Delete.
2282 * name-lookup.h (BINDING_VECTR_PENDING_SPECIALIZATIONS_P): Delete.
2283 (BINDING_VECTOR_PENDING_MEMBERS_P): Delete.
2284 (BINDING_VECTR_PENDING_MEMBERS_P): Delete.
2285 (note_pending_specializations): Delete.
2286 (load_pending_specializations): Delete.
2287 * pt.c (lookup_template_class_1): Call lazy_load_pendings not
2288 lazy_load_specializations.
2289 (instantiate_template_class_1): Likewise.
2290 (instantiate_decl): Call lazy_load_pendings.
2291 * typeck.c (complete_type): Likewise.
2292
f3641ac7
GA
22932021-03-03 Nathan Sidwell <nathan@acm.org>
2294
2295 PR c++/99170
2296 * module.cc (post_load_decls): New.
2297 (lazy_snum, recursive_lazy): Move earlier.
2298 (module_state::read_cluster): Push cloning onto post_load_decls.
2299 (post_load_processing): New. Do the cloning here.
2300 (module_state::read_inits): Call post_load_processing.
2301 (module_state::read_language): Likewise.
2302 (lazy_load_binding, lazy_load_specializations): Likewise
2303 (lazy_load_members): Likewise
2304
23052021-03-03 Nathan Sidwell <nathan@acm.org>
2306
2307 PR c++/99170
2308 * module.cc (trees_out::decl_value): Stream specialization keys
2309 after decl.
2310 (trees_in::decl_value): Stream them back and insert after
2311 completing the decl.
2312 (trees_out::key_mergeable): Drop some streaming here ...
2313 (trees_in::key_mergeable): ... and here. Don't insert into
2314 specialization tables.
2315
23162021-03-03 Patrick Palka <ppalka@redhat.com>
2317
2318 * constraint.cc (struct sat_info): Document the different
2319 meanings of noisy() and diagnose_unsatisfaction_p() during
2320 satisfaction and requires-expression evaluation.
2321 (tsubst_valid_expression_requirement): Take a sat_info instead
2322 of a subst_info. Perform the substitution quietly first. Fold
2323 in error-replaying code from diagnose_valid_expression.
2324 (tsubst_simple_requirement): Take a sat_info instead of a
2325 subst_info.
2326 (tsubst_type_requirement_1): New. Fold in error-replaying code
2327 from diagnose_valid_type.
2328 (tsubst_type_requirement): Use the above. Take a sat_info
2329 instead of a subst_info.
2330 (tsubst_compound_requirement): Likewise. Fold in
2331 error-replaying code from diagnose_compound_requirement.
2332 (tsubst_nested_requirement): Take a sat_info instead of a
2333 subst_info. Fold in error-replaying code from
2334 diagnose_nested_requirement.
2335 (tsubst_requirement): Take a sat_info instead of a subst_info.
2336 (tsubst_requires_expr): Split into two versions, one that takes
2337 a sat_info argument and another that takes a complain and
2338 in_decl argument. Remove outdated documentation. Document the
2339 effects of the sat_info argument. Don't short-circuit
2340 processing of requirements when diagnosing unsatisfaction,
2341 mirroring diagnose_requires_expr.
2342 (satisfy_nondeclaration_constraint) <case REQUIRES_EXPR>: Remove
2343 assert, and se the three-parameter version of tsubst_requires_expr.
2344 (diagnose_trait_expr): Make static. Take a template argument
2345 vector instead of a parameter mapping.
2346 (diagnose_valid_expression): Remove.
2347 (diagnose_valid_type): Remove.
2348 (diagnose_simple_requirement): Remove.
2349 (diagnose_compound_requirement): Remove.
2350 (diagnose_type_requirement): Remove.
2351 (diagnose_nested_requirement): Remove.
2352 (diagnose_requirement): Remove.
2353 (diagnose_requires_expr): Remove.
2354 (diagnose_atomic_constraint): Take a sat_info instead of a
2355 subst_info. Adjust call to diagnose_trait_expr. Call
2356 tsubst_requires_expr instead of diagnose_requires_expr.
2357 (diagnose_constraints): Remove special casing of REQUIRES_EXPR
2358 and just always call constraint_satisfaction_value.
2359
23602021-03-03 Patrick Palka <ppalka@redhat.com>
2361
2362 * constexpr.c (cxx_eval_call_expression): Adjust call to
2363 evaluate_concept_check.
2364 (cxx_eval_constant_expression) <case REQUIRES_EXPR>: Use
2365 evaluate_requires_expression instead of
2366 satisfy_constraint_expression.
2367 <case TEMPLATE_ID_EXPR>: Adjust call to evaluate_concept_check.
2368 * constraint.cc (struct sat_info): Adjust comment about which
2369 satisfaction entrypoints use noisy-unsat.
2370 (normalize_template_requirements): Remove (and adjust callers
2371 appropriately).
2372 (normalize_nontemplate_requirements): Likewise.
2373 (tsubst_nested_requirement): Use constraint_satisfaction_value
2374 instead of satisfy_constraint_expression, which'll do the
2375 noisy replaying of ill-formed quiet satisfaction for us.
2376 (decl_satisfied_cache): Adjust comment.
2377 (satisfy_constraint): Rename to ...
2378 (satisfy_normalized_constraints): ... this.
2379 (satisfy_associated_constraints): Remove (and make its
2380 callers check for dependent arguments).
2381 (satisfy_constraint_expression): Rename to ...
2382 (satisfy_nondeclaration_constraints): ... this. Assert that
2383 'args' is empty when 't' is a concept-id. Removing handling
2384 bare constraint-expressions, and handle REQUIRES_EXPRs
2385 specially. Adjust comment accordingly.
2386 (satisfy_declaration_constraints): Assert in the two-parameter
2387 version that 't' is not a TEMPLATE_DECL. Adjust following
2388 removal of normalize_(non)?template_requirements and
2389 satisfy_asociated_constraints.
2390 (constraint_satisfaction_value): Combine the two- and
2391 three-parameter versions in the natural way.
2392 (constraints_satisfied_p): Combine the one- and two-parameter
2393 versions in the natural way. Improve documentation.
2394 (evaluate_requires_expr): Define.
2395 (evaluate_concept_check): Remove 'complain' parameter. Use
2396 constraint_satisfaction_value instead of
2397 satisfy_constraint_expression.
2398 (diagnose_nested_requirement): Adjust following renaming of
2399 satisfy_constraint_expression.
2400 (diagnose_constraints): Handle REQUIRES_EXPR by going through
2401 diagnose_requires_expr directly instead of treating it as a
2402 constraint-expression. Improve documentation.
2403 * cp-gimplify.c (cp_genericize_r) <case CALL_EXPR>: Adjust call
2404 to evaluate_concept_check.
2405 <case REQUIRES_EXPR>: Use evaluate_requires_expr instead of
2406 constraints_satisfied_p.
2407 <case TEMPLATE_ID_EXPR>: Adjust call to evaluate_concept_check.
2408 * cp-tree.h (evaluate_requires_expr): Declare.
2409 (evaluate_concept_check): Remove tsubst_flag_t parameter.
2410 (satisfy_constraint_expression): Remove declaration.
2411 (constraints_satisfied_p): Remove one-parameter declaration.
2412 Add a default argument to the two-parameter declaration.
2413 * cvt.c (convert_to_void): Adjust call to
2414 evaluate_concept_check.
2415
24162021-03-03 Jakub Jelinek <jakub@redhat.com>
2417
2418 PR c++/82959
2419 * call.c (op_is_ordered): Handle TRUTH_ANDIF_EXPR, TRUTH_ORIF_EXPR
2420 and COMPOUND_EXPR.
2421
24222021-03-03 Marek Polacek <polacek@redhat.com>
2423
2424 PR c++/97034
2425 PR c++/99009
2426 * pt.c (build_deduction_guide): Use INNERMOST_TEMPLATE_ARGS.
2427 (maybe_aggr_guide): Use the original template type where needed. In
2428 a class member template, partially instantiate the result of
2429 collect_ctor_idx_types.
2430 (do_class_deduction): Defer the deduction until the enclosing
2431 scope is non-dependent.
2432
24332021-03-03 Jason Merrill <jason@redhat.com>
2434
2435 PR c++/95675
2436 * call.c (build_temp): Wrap a CALL_EXPR in a TARGET_EXPR
2437 if it didn't get one before.
2438
24392021-03-03 Nathan Sidwell <nathan@acm.org>
2440
2441 PR c++/99344
2442 * module.cc (trees_out::decl_node): Small refactor.
2443 (depset::hash::add_binding_entity): Return true on meeting an
2444 import. Set namespace's import here.
2445 (module_state:write_namespaces): Inform of purview too.
2446 (module_state:read_namespaces): Adjust.
2447 * name-lookup.c (implicitly_export_namespace): Delete.
2448 (do_pushdecl): Don't call it.
2449 (push_namespace): Likewise, set purview.
2450 (add_imported_namespace): Reorder parms.
2451 * name-lookup.h (add_imported_namespace): Alter param ordering.
2452
d97a92dc
GA
24532021-03-02 Martin Sebor <msebor@redhat.com>
2454
2455 PR c++/99251
2456 * class.c (build_base_path): Call build_if_nonnull.
2457 * cp-tree.h (build_if_nonnull): Declare.
2458 * rtti.c (ifnonnull): Rename...
2459 (build_if_nonnull): ...to this. Set no-warning bit on COND_EXPR.
2460 (build_dynamic_cast_1): Adjust to name change.
2461
24622021-03-02 Patrick Palka <ppalka@redhat.com>
2463
2464 PR c++/96443
2465 PR c++/96960
2466 * constraint.cc (type_deducible_p): Don't substitute into the
2467 constraints, and instead just pass 'args' to do_auto_deduction
2468 as the outer template arguments.
2469 (tsubst_parameter_mapping): Remove confused code for handling
2470 placeholder type arguments.
2471 (normalize_placeholder_type_constraint): Define.
2472 (satisfy_constraint_expression): Use it to handle placeholder
2473 'auto' types.
2474 * cp-tree.h (PLACEHOLDER_TYPE_CONSTRAINTS_INFO): Define.
2475 (PLACEHOLDER_TYPE_CONSTRAINTS): Redefine in terms of the above.
2476 * pt.c (tsubst) <case TEMPLATE_TYPE_PARM>: Use
2477 PLACEHOLDER_TYPE_CONSTRAINTS_INFO instead.
2478 (make_constrained_placeholder_type): Set
2479 PLACEHOLDER_TYPE_CONSTRAINTS_INFO instead.
2480 (do_auto_deduction): Clarify comments about the outer_targs
2481 parameter. Rework satisfaction of a placeholder type constraint
2482 to pass in the complete set of template arguments directly to
2483 constraints_satisfied_p.
2484 (splice_late_return_type): Use PLACEHOLDER_TYPE_CONSTRAINTS_INFO
2485 instead. Also rebuild the the constraint info on the new auto.
2486
24872021-03-02 Patrick Palka <ppalka@redhat.com>
2488
2489 * constraint.cc (build_parameter_mapping): Rely on the caller to
2490 determine the in-scope template parameters.
2491 (norm_info::norm_info): Delegate the tsubst_flags_t constructor
2492 to the two-parameter constructor. In the two-parameter
2493 constructor, fold in the definition of make_context, set
2494 initial_parms appropriately, and don't set the now-removed
2495 orig_decl member.
2496 (norm_info::make_context): Remove, now that its only use is
2497 inlined into the caller.
2498 (norm_info::update_context): Adjust call to
2499 build_parameter_mapping to pass in the relevant set of in-scope
2500 template parameters.
2501 (norm_info::ctx_parms): Define this member function.
2502 (norm_info::context): Initialize to NULL_TREE.
2503 (norm_info::orig_decl): Remove this data member.
2504 (norm_info::initial_parms): Define this data member.
2505 (normalize_atom): Adjust call to build_parameter_mapping to pass
2506 in the relevant set of in-scope template parameters. Use
2507 info.initial_parms instead of info.orig_decl.
2508 (normalize_constraint_expression): Take a norm_info object
2509 instead of a bool. Cache the result of normalization.
2510 (tsubst_nested_requirement): Call satisfy_constraint_expression
2511 instead of satisfy_constraint, so that we normalize on demand.
2512 (satisfy_constraint_expression): Handle a NESTED_REQ argument.
2513 Adjust call to normalize_constraint_expression.
2514 (finish_nested_requirement): Set the TREE_TYPE of the NESTED_REQ
2515 to current_template_parms.
2516 (diagnose_nested_requirements): Go through
2517 satisfy_constraint_expression, as with tsubst_nested_requirement.
2518
25192021-03-02 Patrick Palka <ppalka@redhat.com>
2520
2521 * constraint.cc (tsubst_parameter_mapping): Canonicalize the
2522 arguments of a substituted TYPE_ARGUMENT_PACK even if we've
2523 started with a TYPE_ARGUMENT_PACK.
2524 (finish_requires_expr): Don't set DECL_CONTEXT and
2525 CONSTRAINT_VAR_P on each of the introduced parameters here.
2526 * parser.c (cp_parser_requirement_parameter_list): Instead set
2527 these fields earlier, here.
2528 * pt.c (do_auto_deduction): Canonicalize the result of
2529 do_auto_deduction. Pass 'complain' to finish_decltype_type.
2530
25312021-03-02 Patrick Palka <ppalka@redhat.com>
2532
2533 * constraint.cc (tsubst_simple_requirement): Just return
2534 boolean_true_node on success.
2535 (tsubst_type_requirement): Likewise.
2536 (tsubst_compound_requirement): Likewise.
2537 (tsubst_nested_requirement): Likewise.
2538 (tsubst_requirement_body): Remove.
2539 (check_constaint_variables): Rename to ...
2540 (check_constraint_variables): ... this.
2541 (tsubst_constraint_variables): Adjust.
2542 (tsubst_requires_expr): Fold tsubst_requirement_body into here.
2543
88938886
GA
25442021-03-01 Nathan Sidwell <nathan@acm.org>
2545
2546 PR c++/99294
2547 * class.c (fixup_type_variants): Propagate mode, precision,
2548 alignment & emptiness.
2549 * module.cc (trees_out::type_node): Use TYPE_ALIGN_RAW.
2550 (trees_in::tree_node): Rematerialize alignment here.
2551
ec9dc4fa
GA
25522021-02-27 Jason Merrill <jason@redhat.com>
2553
2554 PR c++/90333
2555 * parser.c (cp_parser_lambda_declarator_opt): Accept GNU attributes
2556 between () and ->.
2557
06a9f20f
GA
25582021-02-26 Jakub Jelinek <jakub@redhat.com>
2559
2560 * parser.c (cp_parser_lambda_declarator_opt): Implement
2561 P1102R2 - Down with ()! Make ()s optional before lambda specifiers
2562 for -std={c,gnu}++2b or with pedwarn in earlier versions.
2563
25642021-02-26 Jakub Jelinek <jakub@redhat.com>
2565
2566 PR c++/95451
2567 * lambda.c (is_lambda_ignored_entity): Before checking for
2568 LAMBDA_FUNCTION_P, use OVL_FIRST. Drop FUNCTION_DECL check.
2569
25702021-02-26 Jason Merrill <jason@redhat.com>
2571
2572 PR c++/98810
2573 * pt.c (tsubst_copy) [VIEW_CONVERT_EXPR]: Add const
2574 to a class non-type template argument that needs it.
2575
25762021-02-26 Patrick Palka <ppalka@redhat.com>
2577
2578 PR c++/98990
2579 * pt.c (splice_late_return_type): Rebuild the entire return type
2580 if we have to adjust the level of an auto within.
2581 (type_uses_auto): Adjust call to find_type_usage.
2582 * type-utils.h (find_type_usage): Revert r10-6571 change that
2583 made this function return a pointer to the auto node.
2584
daa68844
GA
25852021-02-25 Patrick Palka <ppalka@redhat.com>
2586
2587 PR c++/99213
2588 PR c++/94521
2589 * error.c (dump_scope): Pass TFF_NO_TEMPLATE_BINDINGS instead of
2590 TFF_NO_FUNCTION_ARGUMENTS when dumping a function scope.
2591
25922021-02-25 Patrick Palka <ppalka@redhat.com>
2593
2594 PR c++/99103
2595 * pt.c (is_spec_or_derived): Drop cv-qualifiers from 'etype'.
2596 (maybe_aggr_guide): Fix order of arguments to is_spec_or_derived.
2597
25982021-02-25 Marek Polacek <polacek@redhat.com>
2599
2600 DR 1312
2601 PR c++/99176
2602 * constexpr.c (is_std_construct_at): New overload.
2603 (is_std_allocator_allocate): New overload.
2604 (cxx_eval_call_expression): Use the new overloads.
2605 (cxx_eval_constant_expression): Reject casting
2606 from void * as per DR 1312. Don't check can_convert.
2607
26082021-02-25 Iain Sandoe <iain@sandoe.co.uk>
2609
2610 PR c++/97587
2611 * coroutines.cc (struct param_info): Track rvalue refs.
2612 (morph_fn_to_coro): Track rvalue refs, and call the promise
2613 CTOR with the frame copy of passed parms.
2614
26152021-02-25 Iain Sandoe <iain@sandoe.co.uk>
2616
2617 PR c++/95822
2618 * coroutines.cc (morph_fn_to_coro): Unconditionally remove any
2619 set throwing_cleanup marker.
2620
26212021-02-25 Nathan Sidwell <nathan@acm.org>
2622
2623 PR c++/99166
2624 * module.cc (module_state::inform_cmi_p): Renamed field.
2625 (module_state::do_import): Adjust.
2626 (init_modules, finish_module_processing): Likewise.
2627 (handle_module_option): Likewise.
2628
26292021-02-25 Nathan Sidwell <nathan@acm.org>
2630
2631 PR c++/98318
2632 * mapper-client.cc (module_client::open_module_client): Fix typo
2633 of fd init.
2634
4028d01a
GA
26352021-02-24 Nathan Sidwell <nathan@acm.org>
2636
2637 PR c++/98718
2638 * module.cc (ool): New indirection vector.
2639 (loc_spans::maybe_propagate): Location is not optional.
2640 (loc_spans::open): Likewise. Assert monotonically advancing.
2641 (module_for_ordinary_loc): Use ool indirection vector.
2642 (module_state::write_prepare_maps): Do not count empty macro
2643 expansions. Elide empty spans.
2644 (module_state::write_macro_maps): Skip empty expansions.
2645 (ool_cmp): New qsort comparator.
2646 (module_state::write): Create and destroy ool vector.
2647 (name_pending_imports): Fix dump push/pop.
2648 (preprocess_module): Likewise. Add more dumping.
2649 (preprocessed_module): Likewise.
2650
26512021-02-24 Iain Sandoe <iain@sandoe.co.uk>
2652
2653 PR c++/96251
2654 * coroutines.cc (coro_common_keyword_context_valid_p): Suppress
2655 error reporting when instantiating for a constexpr.
2656
71e24b06
GA
26572021-02-23 Nathan Sidwell <nathan@acm.org>
2658
2659 PR c++/99208
2660 * decl.c (name_unnamed_type): Check DECL identity, not IDENTIFIER
2661 identity.
2662
26632021-02-23 Patrick Palka <ppalka@redhat.com>
2664
2665 PR c++/95468
2666 * pt.c (tsubst_copy_and_build) <case BASELINK>: New case, copied
2667 over from tsubst_copy.
2668
26692021-02-23 Patrick Palka <ppalka@redhat.com>
2670
2671 * pt.c (instantiation_dependent_expression_p): Check
2672 processing_template_decl before calling
2673 potential_constant_expression.
2674
2f5765cf
GA
26752021-02-22 Nathan Sidwell <nathan@acm.org>
2676
2677 PR c++/99174
2678 * module.cc (struct module_state): Add visited_p flag.
2679 (name_pending_imports): Use it to avoid duplicate requests.
2680 (preprocess_module): Don't read preprocessor state if we failed to
2681 load a module's config.
2682
26832021-02-22 Nathan Sidwell <nathan@acm.org>
2684
2685 PR c++/99153
2686 * decl.c (duplicate_decls): Move DECL_MODULE_IMPORT_P propagation
2687 to common-path.
2688 * module.cc (set_defining_module): Add assert.
2689
50352c6c
GA
26902021-02-19 Nathan Sidwell <nathan@acm.org>
2691
2692 PR c++/98741
2693 * module.cc (pending_imports): New.
2694 (declare_module): Adjust test condition.
2695 (name_pending_imports): New.
2696 (preprocess_module): Reimplement using pending_imports.
2697 (preprocessed_module): Move name-getting to name_pending_imports.
2698 * name-lookup.c (append_imported_binding_slot): Assert module
2699 ordering is increasing.
2700
27012021-02-19 Nathan Sidwell <nathan@acm.org>
2702
2703 * module.cc (note_cmis): New.
2704 (struct module_state): Add inform_read_p bit.
2705 (module_state::do_import): Inform of CMI location, if enabled.
2706 (init_modules): Canonicalize note_cmis entries.
2707 (handle_module_option): Handle -flang-info-module-read=FOO.
2708
27092021-02-19 Jason Merrill <jason@redhat.com>
2710
2711 PR c++/96926
2712 * call.c (perfect_conversion_p): Limit rvalueness
2713 test to reference bindings.
2714
27152021-02-19 Jason Merrill <jason@redhat.com>
2716
2717 PR c++/96926
2718 * call.c (perfect_conversion_p): New.
2719 (perfect_candidate_p): New.
2720 (add_candidates): Ignore templates after a perfect non-template.
2721
bf81237e
GA
27222021-02-18 Nathan Sidwell <nathan@acm.org>
2723
2724 PR c++/99023
2725 * module.cc (canonicalize_header_name): Use
2726 cpp_probe_header_unit.
2727 (maybe_translate_include): Fix note_includes comparison.
2728 (init_modules): Fix note_includes string termination.
2729
27302021-02-18 Jakub Jelinek <jakub@redhat.com>
2731
2732 PR c++/99132
2733 * cp-gimplify.c (cp_genericize_r) <case CALL_EXPR>: Use
2734 cp_get_callee_fndecl_nofold instead of cp_get_callee_fndecl to check
2735 for immediate function calls.
2736
acc0ee5c
GA
27372021-02-17 Nathan Sidwell <nathan@acm.org>
2738
2739 PR c++/99023
2740 * module.cc (struct macro_export): Add GTY markers.
2741 (macro_exports): Likewise, us a va_gc Vector.
2742
27432021-02-17 Jakub Jelinek <jakub@redhat.com>
2744
2745 PR sanitizer/99106
2746 * init.c (build_zero_init_1): For flexible array members just return
2747 NULL_TREE instead of returning empty CONSTRUCTOR with non-complete
2748 ARRAY_TYPE.
2749
27502021-02-17 Nathan Sidwell <nathan@acm.org>
2751
2752 PR c++/99116
2753 * name-lookup.c (do_pushdecl): Don't peek under template_parm
2754 bindings here ...
2755 (set_identifier_type_value_with_scope): ... or here.
2756 (do_pushtag): Only set_identifier_type_value_with_scope at
2757 non-class template parm scope, and use parent scope.
2758
27592021-02-17 Nathan Sidwell <nathan@acm.org>
2760
2761 PR c++/99071
2762 * name-lookup.c (maybe_record_mergeable_decl): Deref the correct
2763 pointer.
2764
27652021-02-17 Patrick Palka <ppalka@redhat.com>
2766
2767 PR debug/96997
2768 PR c++/94034
2769 * tree.c (build_aggr_init_expr): Revert r10-7718 change.
2770
fab095da
GA
27712021-02-12 Nathan Sidwell <nathan@acm.org>
2772
2773 * module.cc (module_state::write_cluster): Check bindings for
2774 imported using-decls.
2775
27762021-02-12 Nathan Sidwell <nathan@acm.org>
2777
2778 PR c++/99040
2779 * module.cc (trees_in::decl_value): Call add_module_namespace_decl
2780 for new namespace-scope entities.
2781 (module_state::read_cluster): Don't call add_module_decl here.
2782 * name-lookup.h (add_module_decl): Rename to ...
2783 (add_module_namespace_decl): ... this.
2784 * name-lookup.c (newbinding_bookkeeping): Move into ...
2785 (do_pushdecl): ... here. Its only remaining caller.
2786 (add_module_decl): Rename to ...
2787 (add_module_namespace_decl): ... here. Add checking-assert for
2788 circularity. Don't call newbinding_bookkeeping, just extern_c
2789 checking and incomplete var checking.
2790
27912021-02-12 Nathan Sidwell <nathan@acm.org>
2792
2793 PR c++/99039
2794 PR c++/99040
2795 * cp-tree.h (CPTI_GLOBAL_TYPE): Delete.
2796 (global_type_node): Delete.
2797 (IDENTIFIER_TYPE_VALUE): Delete.
2798 (IDENTIFIER_HAS_TYPE_VALUE): Delete.
2799 (get_type_value): Delete.
2800 * name-lookup.h (identifier_type_value): Delete.
2801 * name-lookup.c (check_module_override): Don't
2802 SET_IDENTIFIER_TYPE_VALUE here.
2803 (do_pushdecl): Nor here.
2804 (identifier_type_value_1, identifier_type_value): Delete.
2805 (set_identifier_type_value_with_scope): Only
2806 SET_IDENTIFIER_TYPE_VALUE for local and class scopes.
2807 (pushdecl_nanmespace_level): Remove shadow stack nadgering.
2808 (do_pushtag): Use REAL_IDENTIFIER_TYPE_VALUE.
2809 * call.c (check_dtor_name): Use lookup_name.
2810 * decl.c (cxx_init_decl_processing): Drop global_type_node.
2811 * decl2.c (cplus_decl_attributes): Don't SET_IDENTIFIER_TYPE_VALUE
2812 here.
2813 * init.c (get_type_value): Delete.
2814 * pt.c (instantiate_class_template_1): Don't call pushtag or
2815 SET_IDENTIFIER_TYPE_VALUE here.
2816 (tsubst): Assert never an identifier.
2817 (dependent_type_p): Drop global_type_node assert.
2818 * typeck.c (error_args_num): Don't use IDENTIFIER_HAS_TYPE_VALUE
2819 to determine ctorness.
2820
28212021-02-12 Jakub Jelinek <jakub@redhat.com>
2822
2823 PR c++/97742
2824 * parser.c (cp_parser_requirement_seq): Stop iterating after reaching
2825 CPP_EOF.
2826
28272021-02-12 Jason Merrill <jason@redhat.com>
2828
2829 PR c++/97246
2830 PR c++/94546
2831 * pt.c (extract_fnparm_pack): Check DECL_PACK_P here.
2832 (register_parameter_specializations): Not here.
2833
0c5cdb31
GA
28342021-02-11 Marek Polacek <polacek@redhat.com>
2835
2836 PR c++/95888
2837 * pt.c (lookup_template_class_1): Pass tf_none to tsubst when looking
2838 for the partial instantiation.
2839
28402021-02-11 Jakub Jelinek <jakub@redhat.com>
2841
2842 PR c++/99033
2843 * init.c (build_zero_init_1): Handle zero initialiation of
2844 flexible array members like initialization of [0] arrays.
2845 Use integer_minus_onep instead of comparison to integer_minus_one_node
2846 and integer_zerop instead of comparison against size_zero_node.
2847 Formatting fixes.
2848
28492021-02-11 Marek Polacek <polacek@redhat.com>
2850
2851 PR c++/99063
2852 * semantics.c (finish_do_stmt): Check for unexpanded parameter packs.
2853
28542021-02-11 Patrick Palka <ppalka@redhat.com>
2855
2856 PR c++/97582
2857 * name-lookup.c (op_unqualified_lookup): Handle an ambiguous
2858 lookup result by discarding it if the first element is a
2859 class-scope declaration, otherwise return it.
2860 (push_operator_bindings): Handle an ambiguous lookup result by
2861 doing push_local_binding on each element in the list.
2862
28632021-02-11 Marek Polacek <polacek@redhat.com>
2864
2865 * parser.c (cp_parser_selection_statement): Use vec_free.
2866
4b37c3ea
GA
28672021-02-10 Jakub Jelinek <jakub@redhat.com>
2868
2869 PR c++/98988
2870 PR c++/99031
2871 * constexpr.c: Include cgraph.h.
2872 (cxx_eval_call_expression): Call varpool_node::finalize_decl on
2873 heap artificial vars.
2874 (cxx_eval_outermost_constant_expr): Remove varpool nodes for
2875 heap artificial vars.
2876
28772021-02-10 Nathan Sidwell <nathan@acm.org>
2878
2879 PR c++/99030
2880 * pt.c (tsubst_copy) [VAR_DECL]: For a DECL_LOCAL_DECL_P T is the
2881 answer if there's no local specialization.
2882
0a91b73e
GA
28832021-02-09 Nathan Sidwell <nathan@acm.org>
2884
2885 PR c++/98944
2886 * module.cc (module_state::is_rooted): Rename to ...
2887 (module_state::has_location): ... here. Adjust callers.
2888 (module_state::read_partitions): Adjust validity check.
2889 Don't overwrite a known location.
2890
28912021-02-09 Jason Merrill <jason@redhat.com>
2892
2893 PR c++/96905
2894 * pt.c (mark_decl_instantiated): Exit early if consteval.
2895
28962021-02-09 Jason Merrill <jason@redhat.com>
2897
2898 PR c++/98326
2899 PR c++/20408
2900 * cp-gimplify.c (simple_empty_class_p): Don't touch an invisiref
2901 parm.
2902
29032021-02-09 Jason Merrill <jason@redhat.com>
2904
2905 PR c++/98994
2906 PR c++/97566
2907 * constexpr.c (cxx_eval_store_expression): Only skip empty fields in
2908 RECORD_TYPE.
2909
2da7ce23
GA
29102021-02-08 Nathan Sidwell <nathan@acm.org>
2911
2912 * decl.c (start_cleanup_fn): Push function into
2913 namespace.
2914
29152021-02-08 Nathan Sidwell <nathan@acm.org>
2916
2917 PR c++/98531
2918 * cp-tree.h (push_abi_namespace, pop_abi_namespace): Declare.
2919 * decl.c (push_abi_namespace, pop_abi_namespace): Moved
2920 from rtti.c, add default namespace arg.
2921 (check_redeclaration_exception_specification): Allow a lazy
2922 builtin's eh spec to differ from an lready-declared user
2923 declaration.
2924 (declare_global_var): Use push/pop_abi_namespace.
2925 (get_atexit_node): Push the fndecl into a namespace.
2926 * rtti.c (push_abi_namespace, pop_abi_namespace): Moved to
2927 decl.c.
2928
29292021-02-08 Marek Polacek <polacek@redhat.com>
2930
2931 * cp-tree.h (CLASSTYPE_TI_TEMPLATE): Fix typo.
2932
1ed59127
GA
29332021-02-05 Marek Polacek <polacek@redhat.com>
2934
2935 PR c++/98947
2936 * call.c (build_conditional_expr_1): Don't call mark_lvalue_use
2937 on arg2/arg3.
2938 * expr.c (mark_use) <case MODIFY_EXPR>: Don't check read_p when
2939 issuing the -Wvolatile warning. Only set TREE_THIS_VOLATILE if
2940 a warning was emitted.
2941
29422021-02-05 Marek Polacek <polacek@redhat.com>
2943
2944 PR c++/96462
2945 * name-lookup.c (lookup_using_decl): Hoist the destructor check.
2946
29472021-02-05 Jakub Jelinek <jakub@redhat.com>
2948
2949 PR c++/97878
2950 * decl.c (check_array_initializer): For structured bindings, require
2951 the array type to be complete.
2952
a19dd5e6
GA
29532021-02-04 Jason Merrill <jason@redhat.com>
2954
2955 PR c++/98717
2956 * constraint.cc (build_concept_check_arguments): Remove assert.
2957 (build_concept_check): Allow empty args.
2958
29592021-02-04 Tom Greenslade (thomgree) <thomgree@cisco.com>
2960
2961 PR c++/90926
2962 * call.c (can_convert_array): Extend to handle all valid aggregate
2963 initializers of an array; including by string literals, not just by
2964 brace-init-list.
2965 (build_aggr_conv): Call can_convert_array more often, not just in
2966 brace-init-list case.
2967 * typeck2.c (array_string_literal_compatible_p): New function.
2968 (digest_init_r): call array_string_literal_compatible_p
2969 * cp-tree.h: (array_string_literal_compatible_p): Declare.
2970
29712021-02-04 Jason Merrill <jason@redhat.com>
2972
2973 PR c++/98802
2974 * pt.c (do_class_deduction): No aggregate guide if any_dguides_p.
2975
29762021-02-04 Jason Merrill <jason@redhat.com>
2977
2978 PR c++/95192
2979 * pt.c (tsubst_attribute): Handle error.
2980 (apply_late_template_attributes): Return false on error.
2981 (tsubst_function_decl): Check its return value.
2982 (tsubst_decl): Likewise.
2983 (push_template_decl): Assert current_template_parms.
2984 (tsubst_template_decl): Set current_template_parms.
2985
9faaa807
GA
29862021-02-03 Marek Polacek <polacek@redhat.com>
2987
2988 PR c++/98951
2989 * call.c (struct z_candidate): Mark rewritten and reversed as const.
2990 (struct NonPublicField): Mark operator() as const.
2991 (struct NonTrivialField): Likewise.
2992
29932021-02-03 Jason Merrill <jason@redhat.com>
2994
2995 PR c++/98926
2996 PR c++/98570
2997 * pt.c (spec_hasher::equal): Set processing_template_decl.
2998 * Make-lang.in (check-g++-strict-gc): Add --param
2999 hash-table-verification-limit=10000.
3000
30012021-02-03 Marek Polacek <polacek@redhat.com>
3002
3003 PR c++/98899
3004 * parser.c (cp_parser_class_specifier_1): Use any possible
3005 DEFPARSE_INSTANTIATIONS to update DEFERRED_NOEXCEPT_PATTERN.
3006 (cp_parser_save_noexcept): Initialize DEFPARSE_INSTANTIATIONS.
3007 * pt.c (tsubst_exception_specification): Stash new_specs into
3008 DEFPARSE_INSTANTIATIONS.
3009 * tree.c (fixup_deferred_exception_variants): Use
3010 UNPARSED_NOEXCEPT_SPEC_P.
3011
548b75d8
GA
30122021-02-02 Jason Merrill <jason@redhat.com>
3013
3014 PR c++/98929
3015 PR c++/96199
3016 * error.c (dump_expr): Ignore dummy object.
3017 * pt.c (tsubst_baselink): Handle dependent scope.
3018
f7884fb1
GA
30192021-02-01 Patrick Palka <ppalka@redhat.com>
3020
3021 PR c++/98295
3022 * constexpr.c (cxx_eval_array_reference): Also set
3023 new_ctx.object when setting new_ctx.ctor.
3024
30252021-02-01 Marek Polacek <polacek@redhat.com>
3026
3027 PR c++/98355
3028 * parser.c (cp_parser_has_attribute_expression): Use
3029 uses_template_parms instead of type_dependent_expression_p.
3030
30312021-02-01 Jason Merrill <jason@redhat.com>
3032
3033 PR c++/98570
3034 * cp-tree.h: Declare it.
3035 * pt.c (comparing_dependent_aliases): New flag.
3036 (template_args_equal, spec_hasher::equal): Set it.
3037 (dependent_alias_template_spec_p): Assert that we don't
3038 get non-types other than error_mark_node.
3039 (instantiate_alias_template): SET_TYPE_STRUCTURAL_EQUALITY
3040 on complex alias specializations. Set TYPE_DEPENDENT_P here.
3041 (tsubst_decl): Not here.
3042 * module.cc (module_state::read_cluster): Set
3043 comparing_dependent_aliases instead of
3044 comparing_specializations.
3045 * tree.c (cp_tree_equal): Remove comparing_specializations
3046 module handling.
3047 * typeck.c (structural_comptypes): Adjust.
3048 (comptypes): Remove comparing_specializations handling.
3049
2900f2f2
GA
30502021-01-29 Nathan Sidwell <nathan@acm.org>
3051
3052 PR c++/98843
3053 * module.cc (module_state_config): Add num_entities field.
3054 (module_state::read_entities): The entity_ary span is
3055 already allocated.
3056 (module_state::write_config): Write num_entities.
3057 (module_state::read_config): Read num_entities.
3058 (module_state::write): Set config's num_entities.
3059 (module_state::read_initial): Allocate the entity ary
3060 span here.
3061 (module_state::read_language): Do not set entity_lwm
3062 here.
3063
30642021-01-29 Marek Polacek <polacek@redhat.com>
3065
3066 PR c++/96137
3067 * parser.c (cp_parser_class_name): If parser->scope is
3068 error_mark_node, return it, otherwise continue.
3069
85d04a2e
GA
30702021-01-28 Jakub Jelinek <jakub@redhat.com>
3071
3072 PR c++/98841
3073 * typeck.c (build_x_indirect_ref): For *this, return current_class_ref.
3074
30752021-01-28 Jakub Jelinek <jakub@redhat.com>
3076
3077 PR c++/33661
3078 PR c++/98847
3079 * decl.c (cp_finish_decl): For register vars with asmspec in templates
3080 call set_user_assembler_name and set DECL_HARD_REGISTER.
3081 * pt.c (tsubst_expr): When instantiating DECL_HARD_REGISTER vars,
3082 pass asmspec_tree to cp_finish_decl.
3083
30842021-01-28 Nathan Sidwell <nathan@acm.org>
3085
3086 PR c++/98770
3087 * module.cc (trees_out::decl_value): Swap is_typedef & TYPE_NAME
3088 check order.
3089 (trees_in::decl_value): Do typedef frobbing only when installing
3090 a new typedef, adjust is_matching_decl call. Swap is_typedef
3091 & TYPE_NAME check.
3092 (trees_in::is_matching_decl): Add is_typedef parm. Adjust variable
3093 names and deal with typedef checking.
3094
aa69f0a8
GA
30952021-01-27 Jason Merrill <jason@redhat.com>
3096
3097 PR c++/97874
3098 * name-lookup.c (lookup_using_decl): Clean up handling
3099 of dependency and inherited constructors.
3100 (finish_nonmember_using_decl): Handle DECL_DEPENDENT_P.
3101 * pt.c (tsubst_expr): Handle DECL_DEPENDENT_P.
3102
e62bb7f0
GA
31032021-01-26 Jason Merrill <jason@redhat.com>
3104
3105 PR c++/97474
3106 * call.c (type_passed_as): Don't mark invisiref restrict.
3107
31082021-01-26 Jason Merrill <jason@redhat.com>
3109
3110 PR c++/97566
3111 PR c++/98463
3112 * class.c (layout_class_type): An empty field gets size 0.
3113 (is_empty_field): New.
3114 (check_bases): Check it.
3115 * cp-tree.h (is_empty_field): Declare it.
3116 * constexpr.c (cxx_eval_store_expression): Check it.
3117 (cx_check_missing_mem_inits): Likewise.
3118 * init.c (perform_member_init): Likewise.
3119 * typeck2.c (process_init_constructor_record): Likewise.
3120
161e4c08
GA
31212021-01-25 Martin Sebor <msebor@redhat.com>
3122
3123 PR c++/98646
3124 * cvt.c (cp_fold_convert): Propagate TREE_NO_WARNING.
3125
31262021-01-25 Jason Merrill <jason@redhat.com>
3127
3128 PR c++/98463
3129 * constexpr.c (get_or_insert_ctor_field): Add check.
3130 (cxx_eval_store_expression): Handle discontinuity of refs.
3131
6b163337
GA
31322021-01-23 Anthony Sharp <anthonysharp15@gmail.com>
3133
3134 * call.c (complain_about_access): Altered function.
3135 * cp-tree.h (complain_about_access): Changed parameters of function.
3136 (get_parent_with_private_access): Declared new function.
3137 * search.c (get_parent_with_private_access): Defined new function.
3138 * semantics.c (enforce_access): Modified function.
3139 * typeck.c (complain_about_unrecognized_member): Updated function
3140 arguments in complain_about_access.
3141
31422021-01-23 Patrick Palka <ppalka@redhat.com>
3143
3144 PR c++/97399
3145 * cp-tree.h (shared_member_p): Adjust declaration.
3146 * parser.c (cp_parser_init_declarator): If the storage class
3147 specifier is sc_static, pass true for static_p to
3148 cp_parser_declarator.
3149 (cp_parser_direct_declarator): Don't do inject_this_parm when
3150 the declarator is a friend.
3151 * search.c (shared_member_p): Change return type to bool and
3152 adjust function body accordingly. Return false for a dependent
3153 USING_DECL instead of aborting.
3154 * semantics.c (finish_qualified_id_expr): Rely on shared_member_p
3155 even when type-dependent.
3156
8502e23d
GA
31572021-01-22 Marek Polacek <polacek@redhat.com>
3158
3159 PR c++/96623
3160 * parser.c (inject_parm_decls): Remove a redundant assignment.
3161 (cp_parser_class_specifier_1): Clear current_class_{ptr,ref}
3162 before calling inject_parm_decls.
3163
31642021-01-22 Jason Merrill <jason@redhat.com>
3165
3166 PR c++/98744
3167 * call.c (make_base_init_ok): Use DECL_HAS_VTT_PARM_P.
3168
31692021-01-22 Jakub Jelinek <jakub@redhat.com>
3170
3171 PR sanitizer/95693
3172 * init.c (build_zero_init_1): Revert the 2018-03-06 change to
3173 return build_zero_cst for reference types.
3174 * typeck2.c (process_init_constructor_record): Instead call
3175 build_zero_cst here during error recovery instead of build_zero_init.
3176
31772021-01-22 Marek Polacek <polacek@redhat.com>
3178
3179 PR c++/98545
3180 * mangle.c (write_member_name): Emit abi_warn_or_compat_version_crosses
3181 warnings regardless of abi_version_at_least.
3182 (write_expression): When the expression is a dependent name
3183 and an operator name, write "on" before writing its name.
3184
31852021-01-22 Marek Polacek <polacek@redhat.com>
3186
3187 PR c++/97966
3188 * pt.c (instantiate_class_template_1): Instantiate members
3189 marked with attribute used only after we're done instantiating
3190 the class.
3191
7559d465
GA
31922021-01-21 Patrick Palka <ppalka@redhat.com>
3193
3194 PR c++/71879
3195 * semantics.c (finish_decltype_type): Set up a cp_unevaluated
3196 sentinel at the start of the function. Remove a now-redundant
3197 manual adjustment of cp_unevaluated_operand.
3198
31992021-01-21 Nathan Sidwell <nathan@acm.org>
3200
3201 PR c++/98624
3202 * module.cc (depset::hash::find_dependencies): Add
3203 module arg.
3204 (trees_out::core_vals): Check state before calling
3205 write_location.
3206 (sort_cluster, module_state::write): Adjust
3207 find_dependencies call.
3208
32092021-01-21 Jakub Jelinek <jakub@redhat.com>
3210
3211 PR c++/98672
3212 * constexpr.c (check_for_return_continue_data): Add break_stmt member.
3213 (check_for_return_continue): Also look for BREAK_STMT. Handle
3214 SWITCH_STMT by ignoring break_stmt from its body.
3215 (potential_constant_expression_1) <case FOR_STMT>,
3216 <case WHILE_STMT>: If the condition isn't constant true, check if
3217 the loop body can contain a return stmt.
3218 <case SWITCH_STMT>: Adjust check_for_return_continue_data initializer.
3219 <case IF_STMT>: If recursion with tf_none is successful,
3220 merge *jump_target from the branches - returns with highest priority,
3221 breaks or continues lower. If then branch is potentially constant and
3222 doesn't return, check the else branch if it could return, break or
3223 continue.
3224
32252021-01-21 Nathan Sidwell <nathan@acm.org>
3226
3227 PR c++/98530
3228 * name-lookup.c (lookup_class_binding): Rearrange a stat-hack.
3229
b93d0e36
GA
32302021-01-20 Nathan Sidwell <nathan@acm.org>
3231
3232 * module.cc (bytes_in::i, bytes_in::wi): Avoid left shift of
3233 signed type.
3234
32352021-01-20 Patrick Palka <ppalka@redhat.com>
3236
3237 PR c++/95434
3238 * pt.c (tsubst) <case TEMPLATE_TYPE_PARM>: If tsubsting
3239 CLASS_PLACEHOLDER_TEMPLATE yields a TEMPLATE_TEMPLATE_PARM,
3240 adjust to its TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
3241
32422021-01-20 Patrick Palka <ppalka@redhat.com>
3243
3244 PR c++/82613
3245 * parser.c (cp_parser_class_head): Defer access checking when
3246 parsing the base-clause until all bases are seen and attached
3247 to the class type.
3248 * pt.c (instantiate_class_template): Likewise when substituting
3249 into dependent bases.
3250
32512021-01-20 Jakub Jelinek <jakub@redhat.com>
3252
3253 PR c++/98742
3254 * semantics.c (finish_omp_clauses) <case OMP_CLAUSE_DETACH>: If
3255 error_operand_p, remove clause without further checking. Check
3256 for non-NULL TYPE_NAME.
3257
f35a4f96
GA
32582021-01-19 Marek Polacek <polacek@redhat.com>
3259
3260 PR c++/98659
3261 * pt.c (maybe_instantiate_noexcept): Return false if FN is
3262 error_mark_node.
3263
32642021-01-19 Marek Polacek <polacek@redhat.com>
3265
3266 PR c++/98687
3267 * name-lookup.c (push_using_decl_bindings): New, broken out of...
3268 (finish_nonmember_using_decl): ...here.
3269 * name-lookup.h (push_using_decl_bindings): Update declaration.
3270 * pt.c (tsubst_expr): Update the call to push_using_decl_bindings.
3271
32722021-01-19 Patrick Palka <ppalka@redhat.com>
3273
3274 PR c++/41437
3275 PR c++/58993
3276 * search.c (friend_accessible_p): If scope is a hidden friend
3277 defined inside a dependent class, consider access from the
3278 class.
3279 * parser.c (cp_parser_late_parsing_for_member): Don't push a
3280 dk_no_check access state.
3281
32822021-01-19 Marek Polacek <polacek@redhat.com>
3283
3284 PR c++/98333
3285 * parser.c (cp_parser_class_specifier_1): Perform late-parsing
3286 of NSDMIs before late-parsing of noexcept-specifiers.
3287
32882021-01-19 Nathan Sidwell <nathan@acm.org>
3289
3290 * module.cc (identifier): Merge overloads.
3291
32922021-01-19 Nathan Sidwell <nathan@acm.org>
3293
3294 PR c++/98624
3295 * module.cc (trees_out::write_location): Make static.
3296
59cf67d1
GA
32972021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
3298
3299 * parser.c (cp_parser_omp_clause_detach): New.
3300 (cp_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH.
3301 (OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH.
3302 * pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_DETACH clause.
3303 * semantics.c (finish_omp_clauses): Handle OMP_CLAUSE_DETACH clause.
3304 Prevent use of detach with mergeable and overriding the data sharing
3305 mode of the event handle.
3306
2f7f0d32
GA
33072021-01-15 Nathan Sidwell <nathan@acm.org>
3308
3309 PR c++/98538
3310 * tree.c (cp_build_qualified_type_real): Propagate an array's
3311 dependentness to the copy, if known.
3312
33132021-01-15 Jason Merrill <jason@redhat.com>
3314
3315 PR c++/98642
3316 * call.c (unsafe_return_slot_p): Return int.
3317 (init_by_return_slot_p): Split out from...
3318 (unsafe_copy_elision_p): ...here.
3319 (unsafe_copy_elision_p_opt): New name for old meaning.
3320 (build_over_call): Adjust.
3321 (make_safe_copy_elision): New.
3322 * typeck2.c (split_nonconstant_init_1): Elide copy from safe
3323 list-initialization.
3324 * cp-tree.h: Adjust.
3325
33262021-01-15 Jason Merrill <jason@redhat.com>
3327
3328 * call.c (base_ctor_for, make_base_init_ok): New.
3329 (build_over_call): Use make_base_init_ok.
3330
33312021-01-15 Jason Merrill <jason@redhat.com>
3332
3333 PR c++/63707
3334 * tree.c (build_vec_init_expr): Don't call build_vec_init_elt
3335 if we got a CONSTRUCTOR.
3336
33372021-01-15 Nathan Sidwell <nathan@acm.org>
3338
3339 PR c++/98591
3340 * lang-specs.h: Fix handling of -fmodule-only with -fsyntax-only.
3341
5fff80fd
GA
33422021-01-14 Jason Merrill <jason@redhat.com>
3343
3344 * typeck2.c (process_init_constructor_record): Use fldtype
3345 variable consistently.
3346
33472021-01-14 Nathan Sidwell <nathan@acm.org>
3348
3349 PR c++/98372
3350 * tree.c (cp_tree_equal): Correct map_context logic.
3351
be0851b8
GA
33522021-01-13 Marek Polacek <polacek@redhat.com>
3353
3354 PR c++/98231
3355 * name-lookup.c (push_using_decl_bindings): New.
3356 * name-lookup.h (push_using_decl_bindings): Declare.
3357 * pt.c (tsubst_expr): Call push_using_decl_bindings.
3358
33592021-01-13 Nathan Sidwell <nathan@acm.org>
3360
3361 PR c++/98626
3362 * module.cc (module_add_import_initializers): Pass a
3363 zero-element argument vector.
3364
6851dda2
GA
33652021-01-12 Patrick Palka <ppalka@redhat.com>
3366
3367 PR c++/98611
3368 * tree.c (cp_walk_subtrees) <case TEMPLATE_TYPE_PARM>: Visit
3369 the template of a CTAD placeholder.
3370
33712021-01-12 Marek Polacek <polacek@redhat.com>
3372
3373 PR c++/98620
3374 * typeck2.c (process_init_constructor_record): Don't emit
3375 -Wmissing-field-initializers warnings in unevaluated contexts.
3376
67fbb7f0
GA
33772021-01-11 Jakub Jelinek <jakub@redhat.com>
3378
3379 PR c++/98481
3380 * class.c (find_abi_tags_r): Set *walk_subtrees to 2 instead of 1
3381 for types.
3382 (mark_abi_tags_r): Likewise.
3383 * decl2.c (min_vis_r): Likewise.
3384 * tree.c (cp_walk_subtrees): If *walk_subtrees_p is 2, look through
3385 typedefs.
3386
bf5cbb9e
GA
33872021-01-08 Patrick Palka <ppalka@redhat.com>
3388
3389 PR c++/98551
3390 * constexpr.c (cxx_eval_call_expression): Check CLASS_TYPE_P
3391 instead of AGGREGATE_TYPE_P before calling replace_result_decl.
3392
33932021-01-08 Patrick Palka <ppalka@redhat.com>
3394
3395 PR c++/98515
3396 * semantics.c (check_accessibility_of_qualified_id): Punt if
3397 we're checking access of a scoped non-static member inside a
3398 class template.
3399
7d187e4f
GA
34002021-01-07 Jakub Jelinek <jakub@redhat.com>
3401
3402 PR c++/98329
3403 * pt.c (tsubst_copy) <case BIT_CAST_EXPR>: Don't call
3404 cp_build_bit_cast here, instead just build_min a BIT_CAST_EXPR and set
3405 its location.
3406 (tsubst_copy_and_build): Handle BIT_CAST_EXPR.
3407
34082021-01-07 Marek Polacek <polacek@redhat.com>
3409
3410 PR c++/98441
3411 * decl.c (grokdeclarator): Move the !funcdecl_p check inside the
3412 !late_return_type block.
3413
34142021-01-07 Jason Merrill <jason@redhat.com>
3415
3416 * constexpr.c (cxx_bind_parameters_in_call): Add comment.
3417 (cxx_eval_store_expression): Add comment.
3418
34192021-01-07 Jason Merrill <jason@redhat.com>
3420
3421 * call.c (has_next): Factor out from...
3422 (next_conversion): ...here.
3423 (strip_standard_conversion): And here.
3424 (is_subseq): And here.
3425 (build_conv): Check it.
3426 (standard_conversion): Don't call build_conv
3427 for ck_identity.
3428
942ae5be
GA
34292021-01-06 Martin Sebor <msebor@redhat.com>
3430
3431 PR c++/95768
3432 * error.c (dump_expr): Call c_pretty_printer::unary_expression.
3433
651b8a50
GA
34342021-01-05 Patrick Palka <ppalka@redhat.com>
3435
3436 * pt.c (unify) <case TEMPLATE_PARM_INDEX>: After walking into
3437 the type of the NTTP, substitute into the type again. If the
3438 type is still dependent, don't unify the NTTP.
3439
34402021-01-05 Jakub Jelinek <jakub@redhat.com>
3441
3442 * Make-lang.in (cc1plus-checksum, cc1plus$(exeext): Add
3443 $(CODYLIB) after $(BACKEND).
3444
34452021-01-05 Jakub Jelinek <jakub@redhat.com>
3446
3447 PR c++/98469
3448 * constexpr.c (cxx_eval_constant_expression) <case BIT_CAST_EXPR>:
3449 Punt if lval is true.
3450 * semantics.c (cp_build_bit_cast): Call get_target_expr_sfinae on
3451 the result if it has a class type.
3452
34532021-01-05 Marek Polacek <polacek@redhat.com>
3454
3455 PR c++/82099
3456 * pt.c (resolve_overloaded_unification): Call
3457 maybe_instantiate_noexcept after instantiating the function
3458 decl.
3459
34602021-01-05 Nathan Sidwell <nathan@acm.org>
3461
3462 * parser.c (cp_parser_module_declaration): Alter diagnostic
3463 text to say where is permissable.
3464
34652021-01-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3466
3467 PR c++/98316
3468 * Make-lang.in (cc1plus$(exeext)): Add $(CODYLIB), $(NETLIBS).
3469
2eacfdbd
GA
34702021-01-02 Jan Hubicka <jh@suse.cz>
3471
3472 * cp-tree.h (cp_tree_c_finish_parsing): Declare.
3473 * decl2.c (c_parse_final_cleanups): Call cp_tree_c_finish_parsing.
3474 * tree.c (cp_tree_c_finish_parsing): New function.
3475
b6dd195a
GA
34762021-01-01 Jakub Jelinek <jakub@redhat.com>
3477
3478 * ChangeLog-2020: Rotate ChangeLog. New file.
3479
ad41bd84 3480\f
618e665a 3481Copyright (C) 2021 Free Software Foundation, Inc.
ad41bd84
JM
3482
3483Copying and distribution of this file, with or without modification,
3484are permitted in any medium without royalty provided the copyright
3485notice and this notice are preserved.
This page took 4.288969 seconds and 5 git commands to generate.