]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/cp/ChangeLog
Daily bump.
[thirdparty/gcc.git] / gcc / cp / ChangeLog
1 2023-11-25 Nathaniel Shead <nathanieloshead@gmail.com>
2
3 * name-lookup.cc (check_can_export_using_decl): New.
4 (do_nonmember_using_decl): Use above to check if names can be
5 exported.
6
7 2023-11-25 Nathaniel Shead <nathanieloshead@gmail.com>
8
9 PR c++/102341
10 * decl.cc (duplicate_decls): Allow exporting a redeclaration of
11 a typedef.
12
13 2023-11-24 Tobias Burnus <tobias@codesourcery.com>
14
15 * parser.cc (cp_parser_omp_clause_dist_schedule,
16 cp_parser_omp_scan_loop_body, cp_parser_omp_assumption_clauses,
17 cp_parser_omp_depobj): Add OPT_Wopenmp to warning_at.
18 * semantics.cc (finish_omp_clauses): Likewise.
19
20 2023-11-24 Tobias Burnus <tobias@codesourcery.com>
21
22 * parser.cc (cp_parser_omp_depobj): Accept optionally an argument
23 to the destroy clause.
24
25 2023-11-24 Nathaniel Shead <nathanieloshead@gmail.com>
26
27 PR c++/99232
28 * decl.cc (grokvardecl): Don't mark variables attached to
29 modules as internal.
30
31 2023-11-24 Nathaniel Shead <nathanieloshead@gmail.com>
32
33 PR c++/107398
34 * module.cc (trees_out::get_merge_kind): Handle lambdas in class
35 scope.
36 (maybe_key_decl): Remove assertion and fix whitespace.
37
38 2023-11-24 Nathaniel Shead <nathanieloshead@gmail.com>
39
40 PR c++/98885
41 * decl.cc (duplicate_decls): Adjust error message.
42 (xref_tag): Adjust error message. Check exporting decl that is
43 already declared as non-exporting.
44
45 2023-11-23 Jakub Jelinek <jakub@redhat.com>
46
47 PR c++/110348
48 * parser.cc: Implement C++26 P2741R3 - user-generated static_assert
49 messages.
50 (cp_parser_static_assert): Parse message argument as
51 conditional-expression if it is not a pure string literal or
52 several of them concatenated followed by closing paren.
53 * semantics.cc (finish_static_assert): Handle message which is not
54 STRING_CST. For condition with bare parameter packs return early.
55 * pt.cc (tsubst_expr) <case STATIC_ASSERT>: Also tsubst_expr
56 message and make sure that if it wasn't originally STRING_CST, it
57 isn't after tsubst_expr either.
58
59 2023-11-22 Patrick Palka <ppalka@redhat.com>
60
61 PR c++/112633
62 * pt.cc (tsubst_aggr_type): Handle empty TYPE_TEMPLATE_INFO
63 in the entering_scope adjustment.
64
65 2023-11-22 Jason Merrill <jason@redhat.com>
66
67 * decl.cc (start_preparsed_function): Clarify ctype logic.
68
69 2023-11-20 Marc Poulhiès <dkm@kataplop.net>
70
71 * lambda.cc (compare_lambda_sig): Fix typo in variadic.
72
73 2023-11-20 Jason Merrill <jason@redhat.com>
74
75 * pt.cc (comp_template_parms): Just one level.
76 (template_parameter_lists_equivalent_p): Likewise.
77
78 2023-11-20 Jason Merrill <jason@redhat.com>
79
80 * cp-tree.h (DECL_TEMPLATE_PARM_CHECK): New.
81 (DECL_IMPLICIT_TEMPLATE_PARM_P): New.
82 (decl_template_parm_check): New.
83 * mangle.cc (write_closure_template_head): Use it.
84 * parser.cc (synthesize_implicit_template_parm): Likewise.
85 * pt.cc (template_parameters_equivalent_p): Likewise.
86
87 2023-11-19 Nathaniel Shead <nathanieloshead@gmail.com>
88
89 PR c++/99187
90 * cp-tree.h (enum cp_tree_index): Add CPTI_THREAD_ATEXIT.
91 (thread_atexit_node): New.
92 * decl.cc (get_thread_atexit_node): Cache in thread_atexit_node.
93
94 2023-11-19 David Malcolm <dmalcolm@redhat.com>
95
96 * mapper-client.cc: Include "rich-location.h".
97
98 2023-11-16 Jakub Jelinek <jakub@redhat.com>
99
100 PR c++/112365
101 * class.cc (layout_class_type): Don't
102 SET_DECL_FIELD_CXX_ZERO_WIDTH_BIT_FIELD on FIELD_DECLs with
103 error_mark_node type.
104
105 2023-11-16 Patrick Palka <ppalka@redhat.com>
106
107 PR c++/111703
108 PR c++/107939
109 * constexpr.cc (potential_constant_expression_1) <case CALL_EXPR>:
110 Fix FUNCTION_POINTER_TYPE_P test.
111
112 2023-11-16 Marek Polacek <polacek@redhat.com>
113
114 PR c++/112410
115 * parser.cc (cp_parser_direct_declarator): Maybe call
116 abort_fully_implicit_template if it turned out the parameter list was
117 ill-formed.
118
119 2023-11-15 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
120
121 * tree.cc (build_cplus_array_type): Revert using the macro
122 CAN_HAVE_LOCATION_P.
123
124 2023-11-15 Patrick Palka <ppalka@redhat.com>
125
126 PR c++/112515
127 * decl.cc (is_direct_enum_init): Check type-dependence of the
128 single element.
129
130 2023-11-15 Patrick Palka <ppalka@redhat.com>
131
132 PR c++/101043
133 * tree.cc (strip_typedefs_expr) <case TREE_LIST>: Handle
134 non-empty TREE_PURPOSE.
135
136 2023-11-15 Patrick Palka <ppalka@redhat.com>
137
138 PR c++/112427
139 * tree.cc (build_min_non_dep): Propagate TREE_SIDE_EFFECTS from
140 the original arguments.
141 (build_min_non_dep_call_vec): Likewise.
142 * typeck2.cc (build_m_component_ref): Use cp_convert, build2 and
143 cp_fully_fold instead of fold_build_pointer_plus and fold_convert.
144 Don't build the POINTER_PLUS_EXPR in a template context.
145
146 2023-11-15 Patrick Palka <ppalka@redhat.com>
147
148 PR c++/111703
149 PR c++/112269
150 * constexpr.cc (potential_constant_expression_1) <case VAR_DECL>:
151 Only consider var_in_maybe_constexpr_fn if 'now' is false.
152 <case INDIRECT_REF>: Likewise.
153
154 2023-11-15 Jakub Jelinek <jakub@redhat.com>
155
156 * typeck.cc: Implement C++26 P2864R2 - Remove Deprecated Arithmetic
157 Conversion on Enumerations From C++26.
158 (do_warn_enum_conversions): Return bool rather than void, add COMPLAIN
159 argument. Use pedwarn rather than warning_at for C++26 and remove
160 " is deprecated" part of the diagnostics in that case. For SFINAE
161 in C++26 return true on newly erroneous cases.
162 (cp_build_binary_op): For C++26 call do_warn_enum_conversions
163 unconditionally, pass complain argument to it and if it returns true,
164 return error_mark_node.
165 * call.cc (build_conditional_expr): Use pedwarn rather than warning_at
166 for C++26 and remove " is deprecated" part of the diagnostics in that
167 case and check for complain & tf_warning_or_error. Use emit_diagnostic
168 with cxx_dialect >= cxx26 ? DK_PEDWARN : DK_WARNING. For SFINAE in
169 C++26 return error_mark_node on newly erroneous cases.
170 (build_new_op): Use emit_diagnostic with cxx_dialect >= cxx26
171 ? DK_PEDWARN : DK_WARNING and complain & tf_warning_or_error check
172 for C++26. For SFINAE in C++26 return error_mark_node on newly
173 erroneous cases.
174
175 2023-11-14 Nathaniel Shead <nathanieloshead@gmail.com>
176
177 PR c++/103499
178 * module.cc (trees_out::decl_node): Write DECL_VINDEX for
179 virtual clones.
180 (trees_in::tree_node): Read DECL_VINDEX for virtual clones.
181
182 2023-11-14 Nathaniel Shead <nathanieloshead@gmail.com>
183
184 PR c++/106849
185 * name-lookup.cc (do_nonmember_using_decl): Handle
186 TEMPLATE_DECLs when checking module attachment.
187
188 2023-11-14 David Malcolm <dmalcolm@redhat.com>
189
190 * decl.cc (finish_function): Update call to
191 global_dc->m_option_enabled to use option_enabled_p.
192
193 2023-11-14 David Malcolm <dmalcolm@redhat.com>
194
195 * contracts.cc (build_comment): Use global_dc's file_cache.
196
197 2023-11-14 Jonathan Wakely <jwakely@redhat.com>
198
199 PR c++/111842
200 PR c++/112498
201 * call.cc (convert_like_internal): Use OPT_Wnarrowing for
202 pedwarns about illformed conversions involving extended
203 floating-point types. Clarify that ISO C++ requires these
204 diagnostics.
205
206 2023-11-14 Jakub Jelinek <jakub@redhat.com>
207
208 PR c/111309
209 * call.cc (magic_varargs_p): Return 4 for
210 BUILT_IN_{CLZ,CTZ,CLRSB,FFS,PARITY,POPCOUNT}G.
211 (build_over_call): Don't promote first argument of
212 BUILT_IN_{CLZ,CTZ,CLRSB,FFS,PARITY,POPCOUNT}G.
213 * cp-gimplify.cc (cp_gimplify_expr): For BUILT_IN_C{L,T}ZG use
214 c_gimplify_expr.
215
216 2023-11-10 Patrick Palka <ppalka@redhat.com>
217
218 PR c++/79620
219 * cp-tree.h (STRIP_REFERENCE_REF): Define.
220 * semantics.cc (outer_var_p): Assert REFERENCE_REF_P is false.
221 (finish_decltype_type): Look through implicit INDIRECT_REF when
222 deciding whether to call capture_decltype.
223
224 2023-11-10 Patrick Palka <ppalka@redhat.com>
225
226 PR c++/79378
227 PR c++/96917
228 * semantics.cc (finish_decltype_type): Handle an id-expression
229 naming a capture proxy specially.
230
231 2023-11-07 Kwok Cheung Yeung <kcy@codesourcery.com>
232
233 * cp-tree.h (cp_omp_declare_target_attr): Add indirect field.
234 * decl2.cc (cplus_decl_attributes): Add attribute for indirect
235 functions.
236 * parser.cc (cp_parser_omp_clause_name): Handle indirect clause.
237 (cp_parser_omp_clause_indirect): New.
238 (cp_parser_omp_all_clauses): Handle indirect clause.
239 (handle_omp_declare_target_clause): Add extra parameter. Add
240 indirect attribute for indirect functions.
241 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add indirect clause to mask.
242 (cp_parser_omp_declare_target): Handle indirect clause. Emit error
243 message if device_type or indirect clauses used alone. Emit error
244 if indirect clause used with device_type that is not 'any'.
245 (OMP_BEGIN_DECLARE_TARGET_CLAUSE_MASK): Add indirect clause to mask.
246 (cp_parser_omp_begin): Handle indirect clause.
247 * semantics.cc (finish_omp_clauses): Handle indirect clause.
248
249 2023-11-04 Jakub Jelinek <jakub@redhat.com>
250
251 * parser.h (struct cp_parser): Adjust comment on omp_attrs_forbidden_p
252 member.
253 * parser.cc (cp_parser_omp_section_scan): Allow __directive__ spelling.
254
255 2023-11-04 David Malcolm <dmalcolm@redhat.com>
256
257 * call.cc: Update for changes to diagnostic_context.
258 * class.cc: Likewise.
259 * decl.cc: Likewise.
260 * error.cc: Likewise.
261 * except.cc: Likewise.
262 * pt.cc: Likewise.
263
264 2023-11-02 Jason Merrill <jason@redhat.com>
265
266 * semantics.cc (nrv_data): Change visited to hash_set.
267 (finalize_nrv_r): Reorganize.
268
269 2023-11-02 Jason Merrill <jason@redhat.com>
270
271 PR c++/112301
272 PR c++/102191
273 PR c++/33799
274 * except.cc (maybe_splice_retval_cleanup): Clear
275 current_retval_sentinel when destroying retval.
276 * semantics.cc (nrv_data): Add in_nrv_cleanup.
277 (finalize_nrv): Set it.
278 (finalize_nrv_r): Fix handling of throwing cleanups.
279
280 2023-11-02 Jakub Jelinek <jakub@redhat.com>
281
282 PR c++/110342
283 * parser.cc: Implement C++26 P2361R6 - Unevaluated strings.
284 (uneval_string_attr): New enumerator.
285 (cp_parser_string_literal_common): Add UNEVAL argument. If true,
286 pass CPP_UNEVAL_STRING rather than CPP_STRING to
287 cpp_interpret_string_notranslate.
288 (cp_parser_string_literal, cp_parser_userdef_string_literal): Adjust
289 callers of cp_parser_string_literal_common.
290 (cp_parser_unevaluated_string_literal): New function.
291 (cp_parser_parenthesized_expression_list): Handle uneval_string_attr.
292 (cp_parser_linkage_specification): Use
293 cp_parser_unevaluated_string_literal for C++26.
294 (cp_parser_static_assert): Likewise.
295 (cp_parser_std_attribute): Use uneval_string_attr for standard
296 deprecated and nodiscard attributes.
297
298 2023-10-31 David Malcolm <dmalcolm@redhat.com>
299
300 * module.cc (ordinary_loc_of): Update for removal of
301 MACRO_MAP_EXPANSION_POINT_LOCATION.
302 (module_state::note_location): Update for renaming of field.
303 (module_state::write_macro_maps): Likewise.
304
305 2023-10-27 Patrick Palka <ppalka@redhat.com>
306
307 PR c++/111929
308 * init.cc (build_new_1): Remove unnecessary call to convert
309 on 'nelts'. Use build2 instead of fold_build2 for
310 'outer_nelts_checks'.
311
312 2023-10-27 Patrick Palka <ppalka@redhat.com>
313
314 * cp-tree.h (maybe_warn_unparenthesized_assignment): Declare.
315 * semantics.cc (is_assignment_op_expr_p): Generalize to return
316 true for any assignment operator expression, not just one that
317 has been resolved to an operator overload.
318 (maybe_warn_unparenthesized_assignment): Factored out from ...
319 (maybe_convert_cond): ... here.
320 (finish_parenthesized_expr): Mention
321 maybe_warn_unparenthesized_assignment.
322 * typeck.cc (convert_for_assignment): Replace -Wparentheses
323 warning logic with maybe_warn_unparenthesized_assignment.
324
325 2023-10-27 Lewis Hyatt <lhyatt@gmail.com>
326
327 PR preprocessor/87299
328 * parser.cc (cp_lexer_new_main): Call c_reset_target_pragmas ()
329 after preprocessing is complete, before starting compilation.
330
331 2023-10-26 liuhongt <hongtao.liu@intel.com>
332
333 * typeck.cc (build_vec_cmp): Pass type of arg0 to
334 truth_type_for.
335
336 2023-10-25 Jason Merrill <jason@redhat.com>
337
338 * cp-tree.def: Improve OFFSET_REF comment.
339 * cp-gimplify.cc (cp_fold_immediate): Add to comment.
340
341 2023-10-25 Thomas Schwinge <thomas@codesourcery.com>
342
343 * parser.cc (cp_parser_omp_clause_name): Return
344 'PRAGMA_OACC_CLAUSE_SELF' for "self".
345 (cp_parser_oacc_data_clause, OACC_UPDATE_CLAUSE_MASK): Adjust.
346 (cp_parser_oacc_all_clauses): Remove 'bool compute_p' formal
347 parameter, and instead locally determine whether we're called for
348 an OpenACC compute construct or OpenACC 'update' directive.
349 (cp_parser_oacc_compute): Adjust.
350
351 2023-10-25 Chung-Lin Tang <cltang@codesourcery.com>
352
353 * parser.cc (cp_parser_oacc_compute_clause_self): New function.
354 (cp_parser_oacc_all_clauses): Add new 'bool compute_p = false'
355 parameter, add parsing of self clause when compute_p is true.
356 (OACC_KERNELS_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_SELF.
357 (OACC_PARALLEL_CLAUSE_MASK): Likewise,
358 (OACC_SERIAL_CLAUSE_MASK): Likewise.
359 (cp_parser_oacc_compute): Adjust call to c_parser_oacc_all_clauses to
360 set compute_p argument to true.
361 * pt.cc (tsubst_omp_clauses): Add OMP_CLAUSE_SELF case.
362 * semantics.cc (c_finish_omp_clauses): Add OMP_CLAUSE_SELF case, merged
363 with OMP_CLAUSE_IF case.
364
365 2023-10-25 Marek Polacek <polacek@redhat.com>
366
367 PR c++/111895
368 * typeck.cc (build_static_cast_1): Call decay_conversion.
369
370 2023-10-24 Patrick Palka <ppalka@redhat.com>
371
372 PR c++/111929
373 * init.cc (build_new_1): Use convert, build2, build3 and
374 cp_fully_fold instead of fold_convert, size_binop and
375 fold_build3 when building up 'size'.
376
377 2023-10-24 Patrick Palka <ppalka@redhat.com>
378
379 PR c++/111919
380 * tree.cc (cp_stabilize_reference): Do nothing when
381 processing_template_decl.
382
383 2023-10-22 Patrick Palka <ppalka@redhat.com>
384
385 PR objc++/111920
386 * pt.cc (tsubst_expr) <case AT_ENCODE_EXPR>: Use tsubst instead
387 of tsubst_expr.
388
389 2023-10-20 Jason Merrill <jason@redhat.com>
390
391 * call.cc (implicit_conversion_1): Rename...
392 (implicit_conversion): ...to this. Remove the old wrapper.
393
394 2023-10-20 Jason Merrill <jason@redhat.com>
395
396 * call.cc (tourney): Only skip champ_compared_to_predecessor.
397
398 2023-10-20 Nathan Sidwell <nathan@acm.org>
399
400 PR c++/105322
401 * module.cc (trees_out::core_vals): Stream CONSTRUCTOR operands
402 after the type.
403 (trees_in::core_vals): Likewise.
404
405 2023-10-20 Patrick Palka <ppalka@redhat.com>
406
407 * cp-lang.cc (objcp_tsubst_copy_and_build): Rename to ...
408 (objcp_tsubst_expr): ... this.
409 * cp-objcp-common.h (objcp_tsubst_copy_and_build): Rename to ...
410 (objcp_tsubst_expr): ... this.
411 * cp-tree.h (tsubst_copy_and_build): Remove declaration.
412 * init.cc (maybe_instantiate_nsdmi_init): Use tsubst_expr
413 instead of tsubst_copy_and_build.
414 * pt.cc (expand_integer_pack): Likewise.
415 (instantiate_non_dependent_expr_internal): Likewise.
416 (instantiate_class_template): Use tsubst_stmt instead of
417 tsubst_expr for STATIC_ASSERT.
418 (tsubst_function_decl): Adjust tsubst_copy_and_build uses.
419 (tsubst_arg_types): Likewise.
420 (tsubst_exception_specification): Likewise.
421 (tsubst_tree_list): Likewise.
422 (tsubst): Likewise.
423 (tsubst_name): Likewise.
424 (tsubst_omp_clause_decl): Use tsubst_stmt instead of tsubst_expr.
425 (tsubst_omp_clauses): Likewise.
426 (tsubst_copy_asm_operands): Adjust tsubst_copy_and_build use.
427 (tsubst_omp_for_iterator): Use tsubst_stmt instead of tsubst_expr.
428 (tsubst_expr): Rename to ...
429 (tsubst_stmt): ... this.
430 <case CO_YIELD_EXPR, CO_AWAIT_EXPR>: Move to tsubst_expr.
431 (tsubst_omp_udr): Use tsubst_stmt instead of tsubst_expr.
432 (tsubst_non_call_postfix_expression): Adjust tsubst_copy_and_build
433 use.
434 (tsubst_lambda_expr): Likewise. Use tsubst_stmt instead of
435 tsubst_expr for the body of a lambda.
436 (tsubst_copy_and_build_call_args): Rename to ...
437 (tsubst_call_args): ... this. Adjust tsubst_copy_and_build use.
438 (tsubst_copy_and_build): Rename to tsubst_expr. Adjust
439 tsubst_copy_and_build and tsubst_copy_and_build_call_args use.
440 <case TRANSACTION_EXPR>: Use tsubst_stmt instead of tsubst_expr.
441 (maybe_instantiate_noexcept): Adjust tsubst_copy_and_build use.
442 (instantiate_body): Use tsubst_stmt instead of tsubst_expr for
443 substituting the function body.
444 (tsubst_initializer_list): Adjust tsubst_copy_and_build use.
445
446 2023-10-20 Patrick Palka <ppalka@redhat.com>
447
448 * cp-tree.h (enum tsubst_flags): Add tf_no_name_lookup.
449 * pt.cc (tsubst_pack_expansion): Use tsubst for substituting
450 BASES_TYPE.
451 (tsubst_decl) <case USING_DECL>: Use tsubst_name instead of
452 tsubst_copy.
453 (tsubst) <case TEMPLATE_TYPE_PARM>: Use tsubst_copy_and_build
454 instead of tsubst_copy for substituting
455 CLASS_PLACEHOLDER_TEMPLATE.
456 <case TYPENAME_TYPE>: Use tsubst_name instead of tsubst_copy for
457 substituting TYPENAME_TYPE_FULLNAME.
458 (tsubst_name): Define.
459 (tsubst_qualified_id): Use tsubst_name instead of tsubst_copy
460 for substituting the component name of a SCOPE_REF.
461 (tsubst_copy): Remove.
462 (tsubst_copy_and_build): Clear tf_no_name_lookup at the start,
463 and remember if it was set. Call maybe_dependent_member_ref if
464 tf_no_name_lookup was not set.
465 <case IDENTIFIER_NODE>: Don't do name lookup if tf_no_name_lookup
466 was set.
467 <case TEMPLATE_ID_EXPR>: If tf_no_name_lookup was set, use
468 tsubst_name instead of tsubst_copy_and_build to substitute the
469 template and don't finish the template-id.
470 <case BIT_NOT_EXPR>: Handle identifier and type operand (if
471 tf_no_name_lookup was set).
472 <case SCOPE_REF>: Avoid trying to resolve a SCOPE_REF if
473 tf_no_name_lookup was set by calling build_qualified_name directly
474 instead of tsubst_qualified_id.
475 <case SIZEOF_EXPR>: Handling of sizeof... copied from tsubst_copy.
476 <case CALL_EXPR>: Use tsubst_name instead of tsubst_copy to
477 substitute a TEMPLATE_ID_EXPR callee naming an unresolved template.
478 <case COMPONENT_REF>: Likewise to substitute the member.
479 <case FUNCTION_DECL>: Copied from tsubst_copy and merged with ...
480 <case VAR_DECL, PARM_DECL>: ... these. Initial handling copied
481 from tsubst_copy. Optimize local variable substitution by
482 trying retrieve_local_specialization before checking
483 uses_template_parms.
484 <case CONST_DECL>: Copied from tsubst_copy.
485 <case FIELD_DECL>: Likewise.
486 <case NAMESPACE_DECL>: Likewise.
487 <case OVERLOAD>: Likewise.
488 <case TEMPLATE_DECL>: Likewise.
489 <case TEMPLATE_PARM_INDEX>: Likewise.
490 <case TYPE_DECL>: Likewise.
491 <case CLEANUP_POINT_EXPR>: Likewise.
492 <case OFFSET_REF>: Likewise.
493 <case EXPR_PACK_EXPANSION>: Likewise.
494 <case NONTYPE_ARGUMENT_PACK>: Likewise.
495 <case *_CST>: Likewise.
496 <case *_*_FOLD_EXPR>: Likewise.
497 <case DEBUG_BEGIN_STMT>: Likewise.
498 <case CO_AWAIT_EXPR>: Likewise.
499 <case TRAIT_EXPR>: Use tsubst and tsubst_copy_and_build instead
500 of tsubst_copy.
501 <default>: Copied from tsubst_copy.
502 (tsubst_initializer_list): Use tsubst and tsubst_copy_and_build
503 instead of tsubst_copy.
504
505 2023-10-20 Patrick Palka <ppalka@redhat.com>
506
507 PR c++/106086
508 * parser.cc (cp_parser_postfix_expression): Consolidate three
509 calls to finish_call_expr, one to build_new_method_call and
510 one to build_min_nt_call_vec into one call to finish_call_expr.
511 Don't call maybe_generic_this_capture here.
512 * pt.cc (tsubst_copy_and_build) <case CALL_EXPR>: Remove
513 COMPONENT_REF callee handling.
514 (type_dependent_expression_p): Use t_d_object_e_p instead of
515 t_d_e_p for COMPONENT_REF and OFFSET_REF.
516 * semantics.cc (finish_call_expr): In the type-dependent case,
517 call maybe_generic_this_capture here instead.
518
519 2023-10-20 Patrick Palka <ppalka@redhat.com>
520
521 * call.cc (build_new_method_call): Remove calls to
522 build_non_dependent_expr and/or make_args_non_dependent.
523 * coroutines.cc (finish_co_return_stmt): Likewise.
524 * cp-tree.h (build_non_dependent_expr): Remove.
525 (make_args_non_dependent): Remove.
526 * decl2.cc (grok_array_decl): Remove calls to
527 build_non_dependent_expr and/or make_args_non_dependent.
528 (build_offset_ref_call_from_tree): Likewise.
529 * init.cc (build_new): Likewise.
530 * pt.cc (make_args_non_dependent): Remove.
531 (test_build_non_dependent_expr): Remove.
532 (cp_pt_cc_tests): Adjust.
533 * semantics.cc (finish_expr_stmt): Remove calls to
534 build_non_dependent_expr and/or make_args_non_dependent.
535 (finish_for_expr): Likewise.
536 (finish_call_expr): Likewise.
537 (finish_omp_atomic): Likewise.
538 * typeck.cc (finish_class_member_access_expr): Likewise.
539 (build_x_indirect_ref): Likewise.
540 (build_x_binary_op): Likewise.
541 (build_x_array_ref): Likewise.
542 (build_x_vec_perm_expr): Likewise.
543 (build_x_shufflevector): Likewise.
544 (build_x_unary_op): Likewise.
545 (cp_build_addressof): Likewise.
546 (build_x_conditional_expr): Likewise.
547 (build_x_compound_expr): Likewise.
548 (build_static_cast): Likewise.
549 (build_x_modify_expr): Likewise.
550 (check_return_expr): Likewise.
551 * typeck2.cc (build_x_arrow): Likewise.
552
553 2023-10-20 Patrick Palka <ppalka@redhat.com>
554
555 * class.cc (instantiate_type): Remove NON_DEPENDENT_EXPR
556 handling.
557 * constexpr.cc (cxx_eval_constant_expression): Likewise.
558 (potential_constant_expression_1): Likewise.
559 * coroutines.cc (coro_validate_builtin_call): Don't
560 expect ALIGNOF_EXPR to be wrapped in NON_DEPENDENT_EXPR.
561 * cp-objcp-common.cc (cp_common_init_ts): Remove
562 NON_DEPENDENT_EXPR handling.
563 * cp-tree.def (NON_DEPENDENT_EXPR): Remove.
564 * cp-tree.h (build_non_dependent_expr): Temporarily redefine as
565 the identity function.
566 * cvt.cc (maybe_warn_nodiscard): Handle type-dependent and
567 variable callee of CALL_EXPR.
568 * cxx-pretty-print.cc (cxx_pretty_printer::expression): Remove
569 NON_DEPENDENT_EXPR handling.
570 * error.cc (dump_decl): Likewise.
571 (dump_expr): Likewise.
572 * expr.cc (mark_use): Likewise.
573 (mark_exp_read): Likewise.
574 * pt.cc (build_non_dependent_expr): Remove.
575 * tree.cc (lvalue_kind): Remove NON_DEPENDENT_EXPR handling.
576 (cp_stabilize_reference): Likewise.
577 * typeck.cc (warn_for_null_address): Likewise.
578 (cp_build_binary_op): Handle type-dependent SIZEOF_EXPR operands.
579 (cp_build_unary_op) <case TRUTH_NOT_EXPR>: Don't fold inside a
580 template.
581
582 2023-10-20 Alexandre Oliva <oliva@adacore.com>
583
584 * decl.cc (push_throw_library_fn): Mark with ECF_XTHROW.
585 * except.cc (build_throw): Likewise __cxa_throw,
586 _ITM_cxa_throw, __cxa_rethrow.
587
588 2023-10-20 Nathaniel Shead <nathanieloshead@gmail.com>
589
590 PR c++/101631
591 PR c++/102286
592 * call.cc (build_over_call): Fold more indirect refs for trivial
593 assignment op.
594 * class.cc (type_has_non_deleted_trivial_default_ctor): Create.
595 * constexpr.cc (cxx_eval_call_expression): Start lifetime of
596 union member before entering constructor.
597 (cxx_eval_component_reference): Check against first member of
598 value-initialised union.
599 (cxx_eval_store_expression): Activate member for
600 value-initialised union. Check for accessing inactive union
601 member indirectly.
602 * cp-tree.h (type_has_non_deleted_trivial_default_ctor):
603 Forward declare.
604
605 2023-10-20 Nathaniel Shead <nathanieloshead@gmail.com>
606
607 * constexpr.cc (is_std_source_location_current): New.
608 (cxx_eval_constant_expression): Only ignore cast from void* for
609 specific cases and improve other diagnostics.
610
611 2023-10-19 Marek Polacek <polacek@redhat.com>
612
613 * cp-gimplify.cc (cp_fold_r): Don't call maybe_constant_value.
614
615 2023-10-19 Jason Merrill <jason@redhat.com>
616
617 * typeck2.cc (check_narrowing): Adjust.
618
619 2023-10-19 Jason Merrill <jason@redhat.com>
620
621 * parser.cc (cp_parser_primary_expression): Use G_.
622 (cp_parser_using_enum): Likewise.
623 * decl.cc (identify_goto): Likewise.
624
625 2023-10-18 Jason Merrill <jason@redhat.com>
626
627 * typeck2.cc (check_narrowing): Use permerror.
628
629 2023-10-17 Marek Polacek <polacek@redhat.com>
630
631 PR c++/111840
632 * parser.cc (cp_parser_simple_declaration): Do cp_parser_error
633 for FUNCTION_DECLs.
634
635 2023-10-17 Marek Polacek <polacek@redhat.com>
636
637 PR c++/111660
638 * cp-gimplify.cc (cp_fold_immediate_r) <case COND_EXPR>: Don't
639 handle it here.
640 (cp_fold_r): Handle COND_EXPR here.
641
642 2023-10-17 Jason Merrill <jason@redhat.com>
643
644 * mangle.cc (abi_check): New.
645 (write_prefix, write_unqualified_name, write_discriminator)
646 (write_type, write_member_name, write_expression)
647 (write_template_arg, write_template_param): Use it.
648 (start_mangling): Assign from {}.
649 * cp-tree.h: Update comment.
650
651 2023-10-17 Nathaniel Shead <nathanieloshead@gmail.com>
652
653 * constexpr.cc (cxx_eval_dynamic_cast_fn): Add missing
654 auto_diagnostic_group.
655 (cxx_eval_call_expression): Likewise.
656 (diag_array_subscript): Likewise.
657 (outside_lifetime_error): Likewise.
658 (potential_constant_expression_1): Likewise.
659
660 2023-10-16 Jason Merrill <jason@redhat.com>
661
662 * parser.cc (cp_parser_fold_expression): Track location range.
663 * semantics.cc (finish_unary_fold_expr)
664 (finish_left_unary_fold_expr, finish_right_unary_fold_expr)
665 (finish_binary_fold_expr): Add location parm.
666 * constraint.cc (finish_shorthand_constraint): Pass it.
667 * pt.cc (convert_generic_types_to_packs): Likewise.
668 * cp-tree.h: Adjust.
669
670 2023-10-16 Marek Polacek <polacek@redhat.com>
671
672 PR c++/111272
673 * constexpr.cc (explain_invalid_constexpr_fn): Also check the body of
674 a constructor in C++14 and up.
675
676 2023-10-14 Jakub Jelinek <jakub@redhat.com>
677
678 PR c/102989
679 * module.cc (trees_out::start, trees_in::start): Remove
680 TREE_INT_CST_OFFSET_NUNITS handling.
681
682 2023-10-10 Jason Merrill <jason@redhat.com>
683
684 PR c++/109422
685 * mangle.cc (write_template_param): Also mangle level.
686
687 2023-10-08 David Malcolm <dmalcolm@redhat.com>
688
689 * module.cc (module_state::read_location): Update for renaming of
690 get_combined_adhoc_loc.
691
692 2023-10-03 David Malcolm <dmalcolm@redhat.com>
693
694 * error.cc (print_instantiation_partial_context_line): Call
695 diagnostic_show_locus.
696
697 2023-10-03 David Malcolm <dmalcolm@redhat.com>
698
699 * error.cc: Update for "m_" prefixes to text_info fields.
700
701 2023-09-30 Eugene Rozenfeld <erozen@microsoft.com>
702
703 * Make-lang.in: Make create_fdas_for_cc1plus target not .PHONY
704
705 2023-09-28 Richard Sandiford <richard.sandiford@arm.com>
706
707 * constexpr.cc (cxx_fold_indirect_ref): Remove unused variables.
708
709 2023-09-22 Jason Merrill <jason@redhat.com>
710
711 PR c++/111357
712 * pt.cc (expand_integer_pack): Use IMPLICIT_CONV_EXPR.
713
714 2023-09-22 Jason Merrill <jason@redhat.com>
715
716 * constexpr.cc (free_constructor): Handle null ce->value.
717
718 2023-09-22 Jason Merrill <jason@redhat.com>
719
720 PR c++/111529
721 * parser.cc (cp_parser_lambda_declarator_opt): Don't suggest
722 -std=c++14 for lambda templates.
723 * pt.cc (tsubst_expr): Move ANNOTATE_EXPR handling...
724 (tsubst_copy_and_build): ...here.
725
726 2023-09-22 Patrick Palka <ppalka@redhat.com>
727
728 PR c++/111493
729 * decl2.cc (grok_array_decl): Guard diagnostic and backward
730 compatibility fallback code paths with tf_error.
731
732 2023-09-22 Patrick Palka <ppalka@redhat.com>
733
734 PR c++/111485
735 * pt.cc (is_compatible_template_arg): New parameter 'args'.
736 Add the outer template arguments 'args' to 'new_args'.
737 (convert_template_argument): Pass 'args' to
738 is_compatible_template_arg.
739
740 2023-09-20 Jakub Jelinek <jakub@redhat.com>
741
742 * parser.cc (cp_parser_postfix_expression): Parse
743 __builtin_classify_type call with typename as argument.
744 * pt.cc (tsubst_copy_and_build): Handle __builtin_classify_type
745 with dependent typename as argument.
746
747 2023-09-20 Patrick Palka <ppalka@redhat.com>
748
749 PR c++/111471
750 * cxx-pretty-print.cc (cxx_pretty_printer::expression)
751 <case VAR_DECL>: Handle class NTTP objects by printing
752 their type and value.
753 <case VIEW_CONVERT_EXPR>: Strip const VIEW_CONVERT_EXPR
754 wrappers for class NTTPs.
755 (pp_cxx_template_argument_list): Don't handle class NTTP
756 objects here.
757
758 2023-09-20 Patrick Palka <ppalka@redhat.com>
759
760 * pt.cc (tsubst_function_decl): Don't bother computing 'argvec'
761 when 'lambda_fntype' is set.
762 (tsubst_template_decl): Make sure we return a TEMPLATE_DECL
763 during specialization lookup. In the non-class non-function
764 template case, use tsubst_decl directly with use_spec_table=false,
765 update DECL_TI_ARGS and call register_specialization like
766 tsubst_decl would have done if use_spec_table=true.
767
768 2023-09-20 Jakub Jelinek <jakub@redhat.com>
769
770 PR c++/111392
771 * parser.h (struct cp_lexer): Add in_omp_decl_attribute member.
772 * cp-tree.h (cp_maybe_parse_omp_decl): Declare.
773 * parser.cc (cp_parser_handle_statement_omp_attributes): Diagnose
774 omp::decl attribute on statements. Adjust diagnostic wording for
775 omp::decl.
776 (cp_parser_omp_directive_args): Add DECL_P argument, set TREE_PUBLIC
777 to it on the DEFERRED_PARSE tree.
778 (cp_parser_omp_sequence_args): Adjust caller.
779 (cp_parser_std_attribute): Handle omp::decl attribute.
780 (cp_parser_omp_var_list): If parser->lexer->in_omp_decl_attribute
781 don't expect any arguments, instead create clause or TREE_LIST for
782 that decl.
783 (cp_parser_late_parsing_omp_declare_simd): Adjust diagnostic wording
784 for omp::decl.
785 (cp_maybe_parse_omp_decl): New function.
786 (cp_parser_omp_declare_target): If
787 parser->lexer->in_omp_decl_attribute and first token isn't name or
788 comma invoke cp_parser_omp_var_list.
789 * decl2.cc (cplus_decl_attributes): Adjust diagnostic wording for
790 omp::decl. Handle omp::decl on declarations.
791 * name-lookup.cc (finish_using_directive): Adjust diagnostic wording
792 for omp::decl.
793
794 2023-09-19 Ben Boeckel <ben.boeckel@kitware.com>
795
796 * mapper-client.cc, mapper-client.h (open_module_client): Accept
797 dependency tracking and track module mapper files as
798 dependencies.
799 * module.cc (make_mapper, get_mapper): Pass the dependency
800 tracking class down.
801
802 2023-09-19 Ben Boeckel <ben.boeckel@kitware.com>
803
804 * module.cc (do_import): Report imported CMI files as
805 dependencies.
806
807 2023-09-19 Ben Boeckel <ben.boeckel@kitware.com>
808
809 * module.cc (preprocessed_module): Pass whether the module is
810 exported to dependency tracking.
811
812 2023-09-19 Javier Martinez <javier.martinez.bugzilla@gmail.com>
813
814 * class.cc (propagate_class_warmth_attribute): New function.
815 (check_bases_and_members): propagate hot and cold attributes
816 to all FUNCTION_DECL when the record is marked hot or cold.
817 * cp-tree.h (maybe_propagate_warmth_attributes): New function.
818 * decl2.cc (maybe_propagate_warmth_attributes): New function.
819 * method.cc (lazily_declare_fn): propagate hot and cold
820 attributes to lazily declared functions when the record is
821 marked hot or cold.
822
823 2023-09-19 Patrick Palka <ppalka@redhat.com>
824
825 * ptree.cc (cxx_print_type): Remove TYPE_LANG_SPECIFIC
826 test guarding TYPE_TEMPLATE_INFO.
827
828 2023-09-19 Jason Merrill <jason@redhat.com>
829
830 DR 2799
831 * class.cc (add_implicit_default_ctor): Split out...
832 (add_implicitly_declared_members): ...from here.
833 Also call it when inheriting a default ctor.
834
835 2023-09-19 Marek Polacek <polacek@redhat.com>
836
837 * call.cc (build_over_call): Set ADDR_EXPR_DENOTES_CALL_P. Don't handle
838 immediate_invocation_p here.
839 * constexpr.cc (cxx_eval_call_expression): Use mce_true for
840 DECL_IMMEDIATE_FUNCTION_P.
841 (cxx_eval_conditional_expression): Call cp_fold_immediate.
842 * cp-gimplify.cc (enum fold_flags): Add ff_fold_immediate.
843 (maybe_replace_decl): Make static.
844 (cp_fold_r): Expand immediate invocations.
845 (cp_fold_immediate_r): New.
846 (cp_fold_immediate): New.
847 * cp-tree.h (ADDR_EXPR_DENOTES_CALL_P): Define.
848 (cp_fold_immediate): Declare.
849 * tree.cc (bot_replace): Don't handle immediate invocations here.
850
851 2023-09-19 Patrick Palka <ppalka@redhat.com>
852
853 PR c++/111419
854 * cvt.cc (convert_to_void) <case INDIRECT_REF>: Only call
855 complete_type if the type is volatile.
856 <case VAR_DECL>: Likewise.
857
858 2023-09-19 Patrick Palka <ppalka@redhat.com>
859
860 PR c++/99631
861 * semantics.cc (finish_decltype_type): For an NTTP object,
862 return its type modulo cv-quals.
863
864 2023-09-18 Patrick Palka <ppalka@redhat.com>
865
866 PR c++/89231
867 * pt.cc (try_class_unification): Strengthen TI_TEMPLATE equality
868 test by not calling most_general_template. Only unify the
869 innermost levels of template arguments.
870 (unify) <case CLASS_TYPE>: Only unify the innermost levels of
871 template arguments, and only if the template is primary.
872
873 2023-09-18 Patrick Palka <ppalka@redhat.com>
874
875 PR c++/63198
876 PR c++/18474
877 * semantics.cc (maybe_convert_cond): Look through implicit
878 INDIRECT_REF when deciding whether to issue a -Wparentheses
879 warning, and consider templated assignment expressions as well.
880 (finish_parenthesized_expr): Look through implicit INDIRECT_REF
881 when suppressing -Wparentheses warning.
882 * typeck.cc (build_x_modify_expr): Check simple assignments
883 ahead time too, not just compound assignments. Give the second
884 operand of MODOP_EXPR a non-null type so that it's not considered
885 always instantiation-dependent. Don't call suppress_warning.
886
887 2023-09-18 Patrick Palka <ppalka@redhat.com>
888
889 PR c++/108347
890 * pt.cc (unify): Return unify_success for identical dependent
891 DECL_P 'arg' and 'parm'.
892 <case CONST_DECL>: Remove handling.
893
894 2023-09-18 Patrick Palka <ppalka@redhat.com>
895
896 * call.cc (add_template_candidate_real): Check arity even
897 when there are no explicit template arguments. Combine the
898 two adjacent '!obj' tests into one.
899
900 2023-09-18 Patrick Palka <ppalka@redhat.com>
901
902 * pt.cc (register_specialization): Remove now-unnecessary
903 early exit for FUNCTION_DECL partial instantiation.
904 (tsubst_template_decl): Pass use_spec_table=false to
905 tsubst_function_decl. Set DECL_TI_ARGS of a non-lambda
906 FUNCTION_DECL specialization to the full set of arguments.
907 Simplify register_specialization call accordingly.
908
909 2023-09-18 Jason Merrill <jason@redhat.com>
910
911 * class.cc (check_subobject_offset): Use similar_type_p.
912
913 2023-09-12 Jason Merrill <jason@redhat.com>
914
915 PR c++/111357
916 * pt.cc (expand_integer_pack): Convert argument to int.
917
918 2023-09-12 Jason Merrill <jason@redhat.com>
919
920 PR c++/107198
921 * typeck2.cc (process_init_constructor_array): Use VEC_INIT_EXPR
922 regardless of seen_error.
923
924 2023-09-08 Patrick Palka <ppalka@redhat.com>
925
926 PR c++/99599
927 * pt.cc (check_non_deducible_conversions): Add bool parameter
928 passed down to check_non_deducible_conversion.
929 (fn_type_unification): Call check_non_deducible_conversions
930 an extra time before satisfaction with noninst_only_p=true.
931 (conversion_may_instantiate_p): Define.
932 (check_non_deducible_conversion): Add bool parameter controlling
933 whether to compute only conversions that are guaranteed to
934 not induce template instantiation.
935
936 2023-09-07 Sandra Loosemore <sandra@codesourcery.com>
937
938 PR c++/111274
939 * parser.cc (fixup_blocks_walker): Check for null BIND_EXPR_BLOCK.
940
941 2023-09-06 Jason Merrill <jason@redhat.com>
942
943 * class.cc (check_subobject_offset): Check
944 same_type_ignoring_top_level_qualifiers_p.
945
946 2023-09-05 Marek Polacek <polacek@redhat.com>
947
948 PR c++/91483
949 * constexpr.cc (verify_constant_explain_r): New.
950 (verify_constant): Call it.
951
952 2023-09-05 Jakub Jelinek <jakub@redhat.com>
953
954 PR c++/52953
955 * name-lookup.cc (check_local_shadow): Don't punt early for
956 DECL_EXTERNAL decls, instead just disable the shadowing of namespace
957 decls check for those and emit a pedwarn rather than error_at or
958 permerror for those. Formatting fix.
959
960 2023-09-05 Jakub Jelinek <jakub@redhat.com>
961
962 PR c++/52953
963 * name-lookup.h (struct cp_binding_level): Add artificial bit-field.
964 Formatting fixes.
965 * name-lookup.cc (check_local_shadow): Skip artificial bindings when
966 checking if parameter scope is parent scope. Don't special case
967 FUNCTION_NEEDS_BODY_BLOCK. Diagnose the in_function_try_handler
968 cases in the b->kind == sk_function_parms test and verify no
969 non-artificial intervening scopes. Add missing auto_diagnostic_group.
970 * decl.cc (begin_function_body): Set
971 current_binding_level->artificial.
972 * semantics.cc (begin_function_try_block): Likewise.
973
974 2023-09-05 Patrick Palka <ppalka@redhat.com>
975
976 * parser.cc (cp_parser_parenthesized_expression_list_elt): Pass
977 nullptr as non_constant_p to cp_parser_braced_list if our
978 non_constant_p is null.
979 (cp_parser_initializer_list): Likewise to
980 cp_parser_initializer_clause. Avoid inspecting
981 clause_non_constant_p if it's uninitialized.
982
983 2023-09-05 Patrick Palka <ppalka@redhat.com>
984
985 * call.cc (build_user_type_conversion): Free allocated
986 conversions.
987 (build_converted_constant_expr_internal): Use
988 conversion_obstack_sentinel instead.
989 (perform_dguide_overload_resolution): Likewise.
990 (build_new_function_call): Likewise.
991 (build_operator_new_call): Free allocated conversions.
992 (build_op_call): Use conversion_obstack_sentinel instead.
993 (build_conditional_expr): Use conversion_obstack_sentinel
994 instead, and hoist it out to the outermost scope.
995 (build_new_op): Use conversion_obstack_sentinel instead
996 and set it up before the first goto. Remove second unneeded goto.
997 (build_op_subscript): Use conversion_obstack_sentinel instead.
998 (ref_conv_binds_to_temporary): Likewise.
999 (build_new_method_call): Likewise.
1000 (can_convert_arg): Likewise.
1001 (can_convert_arg_bad): Likewise.
1002 (perform_implicit_conversion_flags): Likewise.
1003 (perform_direct_initialization_if_possible): Likewise.
1004 (initialize_reference): Likewise.
1005
1006 2023-09-01 Jakub Jelinek <jakub@redhat.com>
1007
1008 PR c++/111069
1009 * cp-tree.h (determine_local_discriminator): Add NAME argument with
1010 NULL_TREE default.
1011 (struct cp_decomp): New type.
1012 (cp_finish_decl): Add DECOMP argument defaulted to nullptr.
1013 (cp_maybe_mangle_decomp): Remove declaration.
1014 (cp_finish_decomp): Add cp_decomp * argument, remove tree and unsigned
1015 args.
1016 (cp_convert_range_for): Likewise.
1017 * decl.cc (determine_local_discriminator): Add NAME argument, use it
1018 if non-NULL, otherwise compute it the old way.
1019 (maybe_commonize_var): Don't return early for structured bindings.
1020 (cp_finish_decl): Add DECOMP argument, if non-NULL, call
1021 cp_maybe_mangle_decomp.
1022 (cp_maybe_mangle_decomp): Make it static with a forward declaration.
1023 Call determine_local_discriminator. Replace FIRST and COUNT arguments
1024 with DECOMP argument.
1025 (cp_finish_decomp): Replace FIRST and COUNT arguments with DECOMP
1026 argument.
1027 * mangle.cc (find_decomp_unqualified_name): Remove.
1028 (write_unqualified_name): Don't call find_decomp_unqualified_name.
1029 (mangle_decomp): Handle mangling of static function/block scope
1030 structured bindings. Don't call decl_mangling_context twice. Call
1031 check_abi_tags, call write_abi_tags for abi version >= 19 and emit
1032 -Wabi warnings if needed.
1033 (write_guarded_var_name): Handle structured bindings.
1034 (mangle_ref_init_variable): Use write_guarded_var_name.
1035 * parser.cc (cp_parser_range_for): Adjust do_range_for_auto_deduction
1036 and cp_convert_range_for callers.
1037 (do_range_for_auto_deduction): Replace DECOMP_FIRST_NAME and
1038 DECOMP_CNT arguments with DECOMP. Adjust cp_finish_decomp caller.
1039 (cp_convert_range_for): Replace DECOMP_FIRST_NAME and
1040 DECOMP_CNT arguments with DECOMP. Don't call cp_maybe_mangle_decomp,
1041 adjust cp_finish_decl and cp_finish_decomp callers.
1042 (cp_parser_decomposition_declaration): Don't call
1043 cp_maybe_mangle_decomp, adjust cp_finish_decl and cp_finish_decomp
1044 callers.
1045 (cp_convert_omp_range_for): Adjust do_range_for_auto_deduction
1046 and cp_finish_decomp callers.
1047 (cp_finish_omp_range_for): Don't call cp_maybe_mangle_decomp,
1048 adjust cp_finish_decl and cp_finish_decomp callers.
1049 * pt.cc (tsubst_omp_for_iterator): Adjust tsubst_decomp_names
1050 caller.
1051 (tsubst_decomp_names): Replace FIRST and CNT arguments with DECOMP.
1052 (tsubst_expr): Don't call cp_maybe_mangle_decomp, adjust
1053 tsubst_decomp_names, cp_finish_decl, cp_finish_decomp and
1054 cp_convert_range_for callers.
1055
1056 2023-08-30 Marek Polacek <polacek@redhat.com>
1057
1058 PR c++/91319
1059 * parser.cc (cp_parser_initializer_list): Set CONSTRUCTOR_IS_DIRECT_INIT
1060 when the designated initializer is of the .x{} form.
1061
1062 2023-08-30 Marek Polacek <polacek@redhat.com>
1063
1064 PR c++/111173
1065 * decl.cc (grokdeclarator): Disallow constinit on functions.
1066
1067 2023-08-29 Marek Polacek <polacek@redhat.com>
1068
1069 * call.cc (convert_like_internal): Show where the conversion function
1070 was declared.
1071 (maybe_show_nonconverting_candidate): New.
1072 * cp-tree.h (maybe_show_nonconverting_candidate): Declare.
1073 * typeck.cc (convert_for_assignment): Call it.
1074
1075 2023-08-25 Sandra Loosemore <sandra@codesourcery.com>
1076
1077 * cp-tree.h (cp_convert_omp_range_for): Adjust declaration.
1078 * parser.cc (struct omp_for_parse_data): New.
1079 (cp_parser_postfix_expression): Diagnose calls to OpenMP runtime
1080 in intervening code.
1081 (check_omp_intervening_code): New.
1082 (cp_parser_statement_seq_opt): Special-case nested loops, blocks,
1083 and other constructs for OpenMP loops.
1084 (cp_parser_iteration_statement): Reject loops in intervening code.
1085 (cp_parser_omp_for_loop_init): Expand comments and tweak the
1086 interface slightly to better distinguish input/output parameters.
1087 (cp_convert_omp_range_for): Likewise.
1088 (cp_parser_omp_loop_nest): New, split from cp_parser_omp_for_loop
1089 and largely rewritten. Add more comments.
1090 (insert_structured_blocks): New.
1091 (find_structured_blocks): New.
1092 (struct sit_data, substitute_in_tree_walker, substitute_in_tree):
1093 New.
1094 (fixup_blocks_walker): New.
1095 (cp_parser_omp_for_loop): Rewrite to use recursive descent instead
1096 of a loop. Add logic to reshuffle the bits of code collected
1097 during parsing so intervening code gets moved to the loop body.
1098 (cp_parser_omp_loop): Remove call to finish_omp_for_block, which
1099 is now redundant.
1100 (cp_parser_omp_simd): Likewise.
1101 (cp_parser_omp_for): Likewise.
1102 (cp_parser_omp_distribute): Likewise.
1103 (cp_parser_oacc_loop): Likewise.
1104 (cp_parser_omp_taskloop): Likewise.
1105 (cp_parser_pragma): Reject OpenMP pragmas in intervening code.
1106 * parser.h (struct cp_parser): Add omp_for_parse_state field.
1107 * pt.cc (tsubst_omp_for_iterator): Adjust call to
1108 cp_convert_omp_range_for.
1109 * semantics.cc (finish_omp_for): Try harder to preserve location
1110 of loop variable init expression for use in diagnostics.
1111 (struct fofb_data, finish_omp_for_block_walker): New.
1112 (finish_omp_for_block): Allow variables to be bound in a BIND_EXPR
1113 nested inside BIND instead of directly in BIND itself.
1114
1115 2023-08-25 Sandra Loosemore <sandra@codesourcery.com>
1116
1117 * constexpr.cc (cxx_eval_constant_expression): Handle
1118 OMP_STRUCTURED_BLOCK.
1119 * pt.cc (tsubst_expr): Likewise.
1120
1121 2023-08-25 Uros Bizjak <ubizjak@gmail.com>
1122
1123 * call.cc (build_conditional_expr):
1124 Rename TRUE/FALSE to true/false.
1125 (build_new_op): Ditto.
1126
1127 2023-08-22 Jason Merrill <jason@redhat.com>
1128
1129 * pt.cc (outer_template_args): Handle non-template argument.
1130 * constraint.cc (maybe_substitute_reqs_for): Pass decl to it.
1131 * cp-tree.h (outer_template_args): Adjust.
1132
1133 2023-08-22 Jason Merrill <jason@redhat.com>
1134
1135 PR c++/109751
1136 * cp-tree.h (member_like_constrained_friend_p): Declare.
1137 * decl.cc (member_like_constrained_friend_p): New.
1138 (function_requirements_equivalent_p): Check it.
1139 (duplicate_decls): Check it.
1140 (grokfndecl): Check friend template constraints.
1141 * mangle.cc (decl_mangling_context): Check it.
1142 (write_unqualified_name): Check it.
1143 * pt.cc (uses_outer_template_parms_in_constraints): Fix for friends.
1144 (tsubst_friend_function): Don't check satisfaction.
1145
1146 2023-08-22 Tobias Burnus <tobias@codesourcery.com>
1147
1148 * parser.cc (cp_parser_omp_clause_defaultmap): Parse
1149 'all' as category.
1150
1151 2023-08-15 Chung-Lin Tang <cltang@codesourcery.com>
1152 Thomas Schwinge <thomas@codesourcery.com>
1153
1154 * parser.cc (OACC_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
1155
1156 2023-08-14 gnaggnoyil <gnaggnoyil@gmail.com>
1157
1158 DR 2386
1159 PR c++/110216
1160 * decl.cc (get_tuple_size): Update implementation for DR 2386.
1161
1162 2023-08-14 Jason Merrill <jason@redhat.com>
1163
1164 * parser.cc (cp_parser_simple_type_specifier): Handle -std=c++14
1165 -fconcepts.
1166
1167 2023-08-12 Patrick Palka <ppalka@redhat.com>
1168 Jason Merrill <jason@redhat.com>
1169
1170 PR c++/106604
1171 * decl.cc (redeclaration_error_message): Remove special handling
1172 for deduction guides.
1173 (grokfndecl): Give deduction guides a dummy DECL_INITIAL.
1174
1175 2023-08-11 Patrick Palka <ppalka@redhat.com>
1176
1177 PR c++/110927
1178 * parser.cc (cp_parser_type_requirement): Pass
1179 check_dependency_p=true instead of =false.
1180
1181 2023-08-11 Patrick Palka <ppalka@redhat.com>
1182
1183 PR c++/71954
1184 * decl.cc (grokdeclarator): Pass 'dname' instead of
1185 'unqualified_id' as the name when building the VAR_DECL for a
1186 static data member. Call check_explicit_specialization for a
1187 TEMPLATE_ID_EXPR such member.
1188 * pt.cc (finish_member_template_decl): Return NULL_TREE
1189 instead of 'decl' when DECL_TEMPLATE_SPECIALIZATION is not
1190 set.
1191
1192 2023-08-11 Patrick Palka <ppalka@redhat.com>
1193
1194 * ptree.cc (cxx_print_decl): Check for DECL_LANG_SPECIFIC and
1195 TS_DECL_COMMON only when necessary. Print DECL_TEMPLATE_INFO
1196 for all decls that have it, not just VAR_DECL or FUNCTION_DECL.
1197 Also print DECL_USE_TEMPLATE.
1198 (cxx_print_type): Print TYPE_TEMPLATE_INFO.
1199 <case BOUND_TEMPLATE_TEMPLATE_PARM>: Don't print TYPE_TI_ARGS
1200 anymore.
1201 <case TEMPLATE_TYPE/TEMPLATE_PARM>: Print TEMPLATE_TYPE_PARM_INDEX
1202 instead of printing the index, level and original level
1203 individually.
1204
1205 2023-08-08 Marek Polacek <polacek@redhat.com>
1206
1207 * parser.cc (cp_parser_postfix_expression): Adjust the call to
1208 cp_parser_braced_list.
1209 (cp_parser_postfix_open_square_expression): Likewise.
1210 (cp_parser_new_initializer): Likewise.
1211 (cp_parser_assignment_expression): Adjust the call to
1212 cp_parser_initializer_clause.
1213 (cp_parser_lambda_introducer): Adjust the call to cp_parser_initializer.
1214 (cp_parser_range_for): Adjust the call to cp_parser_braced_list.
1215 (cp_parser_jump_statement): Likewise.
1216 (cp_parser_mem_initializer): Likewise.
1217 (cp_parser_template_argument): Likewise.
1218 (cp_parser_default_argument): Adjust the call to cp_parser_initializer.
1219 (cp_parser_initializer): Handle null is_direct_init and non_constant_p
1220 arguments.
1221 (cp_parser_initializer_clause): Handle null non_constant_p argument.
1222 (cp_parser_braced_list): Likewise.
1223 (cp_parser_initializer_list): Likewise.
1224 (cp_parser_member_declaration): Adjust the call to
1225 cp_parser_initializer_clause and cp_parser_initializer.
1226 (cp_parser_yield_expression): Adjust the call to cp_parser_braced_list.
1227 (cp_parser_functional_cast): Likewise.
1228 (cp_parser_late_parse_one_default_arg): Adjust the call to
1229 cp_parser_initializer.
1230 (cp_parser_omp_for_loop_init): Likewise.
1231 (cp_parser_omp_declare_reduction_exprs): Likewise.
1232
1233 2023-08-08 Nathaniel Shead <nathanieloshead@gmail.com>
1234
1235 PR c++/100482
1236 * parser.cc (cp_parser_decltype_expr): Report errors raised by
1237 finish_id_expression.
1238
1239 2023-08-04 Tamar Christina <tamar.christina@arm.com>
1240
1241 * cp-tree.h (RANGE_FOR_NOVECTOR): New.
1242 (cp_convert_range_for, finish_while_stmt_cond, finish_do_stmt,
1243 finish_for_cond): Add novector param.
1244 * init.cc (build_vec_init): Default novector to false.
1245 * method.cc (build_comparison_op): Likewise.
1246 * parser.cc (cp_parser_statement): Likewise.
1247 (cp_parser_for, cp_parser_c_for, cp_parser_range_for,
1248 cp_convert_range_for, cp_parser_iteration_statement,
1249 cp_parser_omp_for_loop, cp_parser_pragma): Support novector.
1250 (cp_parser_pragma_novector): New.
1251 * pt.cc (tsubst_expr): Likewise.
1252 * semantics.cc (finish_while_stmt_cond, finish_do_stmt,
1253 finish_for_cond): Likewise.
1254
1255 2023-08-01 Lewis Hyatt <lhyatt@gmail.com>
1256
1257 * parser.cc (c_init_preprocess): New function.
1258 (maybe_read_tokens_for_pragma_lex): New function.
1259 (pragma_lex): Support preprocess-only mode.
1260 (pragma_lex_discard_to_eol): New function.
1261
1262 2023-07-31 Chung-Lin Tang <cltang@codesourcery.com>
1263
1264 * parser.cc (cp_parser_oacc_host_data): Add checking requiring OpenACC
1265 host_data construct to have an use_device clause.
1266
1267 2023-07-28 Ng YongXiang <yongxiangng@gmail.com>
1268
1269 PR c++/110057
1270 PR ipa/83054
1271 * init.cc (build_vec_delete_1): Devirtualize array destruction.
1272
1273 2023-07-27 Patrick Palka <ppalka@redhat.com>
1274
1275 PR c++/110197
1276 * constexpr.cc (cxx_eval_array_reference): Allow synthesizing an
1277 empty subobject even if CONSTRUCTOR_NO_CLEARING is set.
1278 (cxx_eval_bare_aggregate): Set 'no_slot' to true more generally
1279 whenever new_ctx.ctor is set to NULL_TREE by init_subob_ctx,
1280 i.e. whenever initializing an subobject of empty type.
1281 (cxx_eval_vec_init_1): Define 'no_slot' as above and use it
1282 accordingly.
1283
1284 2023-07-27 Nathaniel Shead <nathanieloshead@gmail.com>
1285
1286 PR c++/103497
1287 * pt.cc (type_uses_auto): Check inside parameter packs.
1288
1289 2023-07-26 Patrick Palka <ppalka@redhat.com>
1290
1291 PR c++/110566
1292 PR c++/108179
1293 * pt.cc (reduce_template_parm_level): Set DECL_TEMPLATE_INFO
1294 on the DECL_TEMPLATE_RESULT of the new ttp.
1295 (add_defaults_to_ttp): Make a copy of the original ttp's
1296 DECL_TEMPLATE_RESULT, and update this copy's DECL_TEMPLATE_INFO
1297 as well.
1298 (coerce_template_template_parms): Make sure 'scope_args' has
1299 the right amount of levels for the ttp argument.
1300 (most_general_template): Handle template template parameters.
1301 (rewrite_template_parm): Set DECL_TEMPLATE_RESULT on the
1302 DECL_TEMPLATE_RESULT of the new ttp.
1303
1304 2023-07-26 Patrick Palka <ppalka@redhat.com>
1305
1306 PR c++/110566
1307 PR c++/108179
1308 * pt.cc (coerce_template_template_parms): Simplify by using
1309 DECL_INNERMOST_TEMPLATE_PARMS and removing redundant asserts.
1310 Always pass the parameters of the most general template to
1311 coerce_template_parms.
1312
1313 2023-07-26 Patrick Palka <ppalka@redhat.com>
1314
1315 PR c++/110809
1316 * pt.cc (unify) <case INTEGER_CST>: Generalize to handle
1317 REAL_CST as well.
1318
1319 2023-07-26 Marek Polacek <polacek@redhat.com>
1320
1321 * parser.cc (cp_parser_constant_expression): Allow non_constant_p to be
1322 nullptr even when allow_non_constant_p is true. Don't call
1323 _rvalue_constant_expression when not necessary. Move local variable
1324 declarations closer to their first use.
1325 (cp_parser_static_assert): Don't pass a dummy down to
1326 cp_parser_constant_expression.
1327
1328 2023-07-26 Jason Merrill <jason@redhat.com>
1329
1330 PR c++/106310
1331 * parser.cc (cp_parser_template_name): Skip non-member
1332 lookup after the template keyword.
1333 (cp_parser_lookup_name): Pass down template_keyword_p.
1334
1335 2023-07-26 Nathaniel Shead <nathanieloshead@gmail.com>
1336
1337 PR c++/96630
1338 PR c++/98675
1339 PR c++/70331
1340 * constexpr.cc (constexpr_global_ctx::is_outside_lifetime): New
1341 function.
1342 (constexpr_global_ctx::get_value): Don't return expired values.
1343 (constexpr_global_ctx::get_value_ptr): Likewise.
1344 (constexpr_global_ctx::remove_value): Mark value outside
1345 lifetime.
1346 (outside_lifetime_error): New function.
1347 (cxx_eval_call_expression): No longer track save_exprs.
1348 (cxx_eval_loop_expr): Likewise.
1349 (cxx_eval_constant_expression): Add checks for outside lifetime
1350 values. Remove local variables at end of bind exprs, and
1351 temporaries after cleanup points.
1352
1353 2023-07-26 Nathaniel Shead <nathanieloshead@gmail.com>
1354
1355 PR c++/110619
1356 * cp-gimplify.cc (cp_genericize_r): Transform RETURN_EXPRs to
1357 not return dangling pointers.
1358 * cp-tree.h (RETURN_EXPR_LOCAL_ADDR_P): New flag.
1359 (check_return_expr): Add a new parameter.
1360 * semantics.cc (finish_return_stmt): Set flag on RETURN_EXPR
1361 when referring to dangling pointer.
1362 * typeck.cc (check_return_expr): Disable transformation of
1363 dangling pointers, instead pass this information to caller.
1364
1365 2023-07-26 Nathaniel Shead <nathanieloshead@gmail.com>
1366
1367 * constexpr.cc (modifying_const_object_error): Find the source
1368 location of the const object's declaration.
1369 (cxx_eval_constant_expression): Update input_location to the
1370 location of the currently evaluated expression, if possible.
1371
1372 2023-07-25 Marek Polacek <polacek@redhat.com>
1373
1374 PR c++/108960
1375 * pt.cc (lookup_and_finish_template_variable): Don't clear tf_partial
1376 here.
1377 (instantiate_template): Reset all complain flags except
1378 tf_warning_or_error.
1379
1380 2023-07-25 Marek Polacek <polacek@redhat.com>
1381
1382 PR c++/110382
1383 * constexpr.cc (cxx_eval_array_reference): Create a new constructor
1384 only when we don't already have a matching one. Clear the object
1385 when the type is non-scalar.
1386
1387 2023-07-21 Marek Polacek <polacek@redhat.com>
1388
1389 PR c++/110106
1390 * constexpr.cc (potential_constant_expression_1): Try to complete the
1391 type when !processing_template_decl.
1392
1393 2023-07-20 Marek Polacek <polacek@redhat.com>
1394
1395 PR c++/110114
1396 * call.cc (implicit_conversion_1): Return early if the type isn't
1397 complete.
1398
1399 2023-07-19 Marek Polacek <polacek@redhat.com>
1400
1401 PR c++/110745
1402 * error.cc (dump_simple_decl): Print base class name.
1403
1404 2023-07-19 Marek Polacek <polacek@redhat.com>
1405
1406 PR c++/110064
1407 * typeck2.cc (process_init_constructor_record): Don't emit
1408 -Wmissing-field-initializers for empty classes.
1409
1410 2023-07-19 Patrick Palka <ppalka@redhat.com>
1411
1412 * pt.cc (type_unification_real): Test for PARM_DECL instead
1413 of TEMPLATE_PARM_INDEX to distinguish a type vs non-type
1414 template parameter pack.
1415 (type_targs_deducible_from): Likewise.
1416
1417 2023-07-19 Patrick Palka <ppalka@redhat.com>
1418
1419 * pt.cc (tsubst_function_decl): Add defaulted 'use_spec_table'
1420 flag parameter. Don't look up or insert into the specializations
1421 table if 'use_spec_table' is false.
1422 (tsubst_decl): Add defaulted 'use_spec_table' flag parameter.
1423 Check for error_mark_node.
1424 <case FUNCTION_DECL>: Pass 'use_spec_table' to
1425 tsubst_function_decl.
1426 <case TYPE/VAR_DECL>: Don't call coerce_template_parms.
1427 Don't look up or insert into the specializations table if
1428 'use_spec_table' is false. Exit earlier if the substituted
1429 type is erroneous and we're not complaining, and do so for
1430 alias specializations as well.
1431 (instantiate_template): Pass false as 'use_spec_table'
1432 to tsubst_decl. Call register_specialization afterwards.
1433
1434 2023-07-18 Jason Merrill <jason@redhat.com>
1435
1436 * constexpr.cc (cxx_eval_bit_cast): Check that the result of
1437 native_interpret_aggregate doesn't need more evaluation.
1438
1439 2023-07-18 Patrick Palka <ppalka@redhat.com>
1440
1441 * call.cc (add_template_conv_candidate): Don't check for
1442 non-empty 'candidates' here.
1443 (build_op_call): Check it here, before we've considered any
1444 conversion functions.
1445
1446 2023-07-18 Patrick Palka <ppalka@redhat.com>
1447
1448 PR c++/110535
1449 * call.cc (add_conv_candidate): Check constraints.
1450
1451 2023-07-17 Jason Merrill <jason@redhat.com>
1452
1453 * constexpr.cc (cxx_eval_call_expression): Only cache
1454 reduced_constant_expression_p results.
1455 (reduced_constant_expression_p): Handle CONSTRUCTOR of scalar type.
1456 (cxx_eval_constant_expression): Fold vectors here.
1457 (cxx_eval_bare_aggregate): Not here.
1458
1459 2023-07-15 Patrick Palka <ppalka@redhat.com>
1460
1461 PR c++/110441
1462 * call.cc (keep_unused_object_arg): Use cp_build_compound_expr
1463 instead of building a COMPOUND_EXPR directly.
1464
1465 2023-07-15 Patrick Palka <ppalka@redhat.com>
1466
1467 PR c++/110524
1468 * mangle.cc (write_expression): Handle TEMPLATE_ID_EXPR
1469 whose template is already an IDENTIFIER_NODE.
1470
1471 2023-07-14 Nathaniel Shead <nathanieloshead@gmail.com>
1472
1473 * constexpr.cc (cxx_eval_constant_expression): Pass t to get_value.
1474
1475 2023-07-14 Jason Merrill <jason@redhat.com>
1476
1477 PR c++/110344
1478 * constexpr.cc (cxx_eval_constant_expression): Move P2738 handling
1479 after heap handling.
1480 * name-lookup.cc (get_cxx_dialect_name): Add C++26.
1481
1482 2023-07-14 Marek Polacek <polacek@redhat.com>
1483 Jason Merrill <jason@redhat.com>
1484
1485 PR c++/109876
1486 * decl.cc (cp_finish_decl): Set TREE_CONSTANT when initializing
1487 an object of empty class type.
1488 * pt.cc (value_dependent_expression_p) <case VAR_DECL>: Treat a
1489 constexpr-declared non-constant variable as value-dependent.
1490
1491 2023-07-11 Patrick Palka <ppalka@redhat.com>
1492
1493 PR c++/110580
1494 * pt.cc (lookup_template_variable): Pass all levels of arguments
1495 to coerce_template_parms, and use the parameters from the most
1496 general template.
1497
1498 2023-07-10 Patrick Palka <ppalka@redhat.com>
1499
1500 PR c++/110523
1501 * pt.cc (redeclare_class_template): Relax the ttp DECL_CONTEXT
1502 assert, and downgrade it to a checking assert.
1503
1504 2023-06-30 Patrick Palka <ppalka@redhat.com>
1505
1506 * cp-tree.h (TEMPLATE_PARM_DESCENDANTS): Harden.
1507 (TEMPLATE_TYPE_DESCENDANTS): Define.
1508 (TEMPLATE_TEMPLATE_PARM_SIMPLE_P): Define.
1509 * pt.cc (reduce_template_parm_level): Revert
1510 r14-418-g0bc2a1dc327af9 change.
1511 (process_template_parm): Set TEMPLATE_TEMPLATE_PARM_SIMPLE_P
1512 appropriately.
1513 (uses_outer_template_parms): Determine the outer depth of
1514 a template template parm without relying on DECL_CONTEXT.
1515 (tsubst) <case TEMPLATE_TEMPLATE_PARM>: Cache lowering a
1516 simple template template parm. Consistently use 'code'.
1517
1518 2023-06-29 Patrick Palka <ppalka@redhat.com>
1519
1520 PR c++/110468
1521 * init.cc (maybe_instantiate_nsdmi_init): Mask out all
1522 tsubst flags except for tf_warning_or_error.
1523
1524 2023-06-29 Patrick Palka <ppalka@redhat.com>
1525
1526 PR c++/110463
1527 * cp-gimplify.cc (cp_fold) <case CONSTRUCTOR>: Propagate
1528 CONSTRUCTOR_MUTABLE_POISON.
1529
1530 2023-06-29 Patrick Palka <ppalka@redhat.com>
1531
1532 * cp-tree.h (tree_template_info::partial): New data member.
1533 (TI_PARTIAL_INFO): New tree accessor.
1534 (most_specialized_partial_spec): Add defaulted bool parameter.
1535 * module.cc (trees_out::core_vals) <case TEMPLATE_INFO>: Stream
1536 TI_PARTIAL_INFO.
1537 (trees_in::core_vals) <case TEMPLATE_INFO>: Likewise.
1538 * parser.cc (specialization_of): Adjust after making
1539 most_specialized_partial_spec return TEMPLATE_INFO instead
1540 of TREE_LIST.
1541 * pt.cc (process_partial_specialization): Set TI_PARTIAL_INFO
1542 of 'decl' to point back to the partial TEMPLATE_DECL. Likewise
1543 (and pass rechecking=true to most_specialization_partial_spec).
1544 (instantiate_class_template): Likewise.
1545 (instantiate_template): Set TI_PARTIAL_INFO to the result of
1546 most_specialization_partial_spec after forming a variable
1547 template specialization.
1548 (most_specialized_partial_spec): Add 'rechecking' parameter.
1549 Exit early if the template is not primary. Use the TI_PARTIAL_INFO
1550 of the corresponding TEMPLATE_INFO as a cache unless 'rechecking'
1551 is true. Don't bother setting TREE_TYPE of each TREE_LIST.
1552 (instantiate_decl): Adjust after making
1553 most_specialized_partial_spec return TEMPLATE_INFO instead of
1554 TREE_LIST.
1555 * ptree.cc (cxx_print_xnode) <case TEMPLATE_INFO>: Dump
1556 TI_PARTIAL_INFO.
1557
1558 2023-06-29 Eugene Rozenfeld <erozen@microsoft.com>
1559
1560 * Make-lang.in: Pass correct stage cc1plus when processing
1561 profile data collected while building target libraries
1562
1563 2023-06-28 Patrick Palka <ppalka@redhat.com>
1564
1565 PR c++/89442
1566 PR c++/107437
1567 * cp-tree.h (lookup_template_variable): Add complain parameter.
1568 * parser.cc (cp_parser_template_id): Pass tf_warning_or_error
1569 to lookup_template_variable.
1570 * pt.cc (lookup_template_variable): Add complain parameter.
1571 Coerce template arguments here ...
1572 (finish_template_variable): ... instead of here.
1573 (lookup_and_finish_template_variable): Check for error_mark_node
1574 result from lookup_template_variable.
1575 (tsubst_copy) <case TEMPLATE_ID_EXPR>: Pass complain to
1576 lookup_template_variable.
1577 (instantiate_template): Use build2 instead of
1578 lookup_template_variable to build a TEMPLATE_ID_EXPR
1579 for most_specialized_partial_spec.
1580
1581 2023-06-28 Marek Polacek <polacek@redhat.com>
1582
1583 PR c++/110175
1584 * typeck.cc (cp_build_unary_op): Check tf_warning before warning.
1585
1586 2023-06-28 Jason Merrill <jason@redhat.com>
1587
1588 PR c++/110334
1589 * cp-tree.h (clone_attrs): Declare.
1590 * method.cc (implicitly_declare_fn): Use it for inherited
1591 constructor.
1592 * optimize.cc (clone_attrs): New.
1593 (maybe_clone_body): Use it.
1594
1595 2023-06-28 Jason Merrill <jason@redhat.com>
1596
1597 PR c++/110344
1598 * constexpr.cc (cxx_eval_constant_expression): In C++26, allow cast
1599 from void* to the type of a pointed-to object.
1600
1601 2023-06-23 David Malcolm <dmalcolm@redhat.com>
1602
1603 PR c++/110164
1604 * cp-name-hint.h (maybe_suggest_missing_header): New decl.
1605 * decl.cc: Define INCLUDE_MEMORY. Add include of
1606 "cp/cp-name-hint.h".
1607 (start_decl_1): Call maybe_suggest_missing_header.
1608 * name-lookup.cc (maybe_suggest_missing_header): Remove "static".
1609
1610 2023-06-16 Alex Coplan <alex.coplan@arm.com>
1611
1612 * parser.cc (cp_parser_enum_specifier): Don't reject
1613 elaborated-type-specifier with enum-base, instead emit new
1614 Welaborated-enum-base warning.
1615
1616 2023-06-14 Jason Merrill <jason@redhat.com>
1617
1618 DR 2327
1619 PR c++/86521
1620 * call.cc (joust_maybe_elide_copy): Don't change cand.
1621 (joust): Move the elided tiebreaker later.
1622
1623 2023-06-13 David Malcolm <dmalcolm@redhat.com>
1624
1625 PR c/84890
1626 * name-lookup.cc (missing_std_header::~missing_std_header): Reword
1627 note to avoid negative tone of "forgetting".
1628
1629 2023-06-13 Jason Merrill <jason@redhat.com>
1630
1631 * tree.cc (build_target_expr): Check TYPE_HAS_MUTABLE_P.
1632
1633 2023-06-12 Tobias Burnus <tobias@codesourcery.com>
1634
1635 * parser.cc (cp_parser_omp_clause_map): Reword error message for
1636 clearness especially with 'omp target (enter/exit) data.'
1637 * semantics.cc (handle_omp_array_sections): Handle
1638 GOMP_MAP_{ALWAYS_,}PRESENT_{TO,TOFROM,FROM,ALLOC} enum values.
1639
1640 2023-06-12 Jason Merrill <jason@redhat.com>
1641
1642 PR c++/105838
1643 * call.cc (convert_like_internal) [ck_list]: Use
1644 maybe_init_list_as_array.
1645 * constexpr.cc (cxx_eval_vec_init_1): Init might have
1646 a different type.
1647 * tree.cc (build_vec_init_elt): Likewise.
1648 * init.cc (build_vec_init): Handle from_array from a
1649 TARGET_EXPR. Retain TARGET_EXPR of a different type.
1650
1651 2023-06-11 Patrick Palka <ppalka@redhat.com>
1652
1653 PR c++/110122
1654 * constexpr.cc (cxx_eval_call_expression): Synthesize defaulted
1655 functions needed for constant evaluation.
1656 (instantiate_cx_fn_r): Likewise.
1657
1658 2023-06-11 Patrick Palka <ppalka@redhat.com>
1659
1660 PR c++/110122
1661 * pt.cc (lookup_template_class): Extend shortcut for looking up the
1662 current class scope to consider outer class scopes too, and use
1663 current_nonlambda_class_type instead of current_class_type. Only
1664 call coerce_template_parms when specializing a primary template.
1665
1666 2023-06-10 Nathan Sidwell <nathan@acm.org>
1667
1668 PR c++/61663
1669 * pt.cc (maybe_adjust_types_for_deduction): Implement DR976.
1670
1671 2023-06-09 Jason Merrill <jason@redhat.com>
1672
1673 PR c++/110185
1674 PR c++/58487
1675 * method.cc (build_comparison_op): Give retval a name.
1676 * typeck.cc (check_return_expr): Fix for nameless variables.
1677
1678 2023-06-09 Jason Merrill <jason@redhat.com>
1679
1680 * parser.cc (cp_parser_simple_type_specifier): Check for auto
1681 in template argument.
1682 (cp_parser_template_type_arg): Remove auto checking.
1683
1684 2023-06-09 Jason Merrill <jason@redhat.com>
1685
1686 PR c++/110102
1687 * call.cc (maybe_init_list_as_array): Check that the element type is
1688 copyable.
1689
1690 2023-06-07 Jason Merrill <jason@redhat.com>
1691
1692 PR c++/58487
1693 PR c++/53637
1694 * cp-tree.h (INIT_EXPR_NRV_P): New.
1695 * semantics.cc (finalize_nrv_r): Check it.
1696 * name-lookup.h (decl_in_scope_p): Declare.
1697 * name-lookup.cc (decl_in_scope_p): New.
1698 * typeck.cc (check_return_expr): Allow non-NRV
1699 returns if the NRV is no longer in scope.
1700
1701 2023-06-07 Jason Merrill <jason@redhat.com>
1702
1703 PR c++/58487
1704 * typeck.cc (want_nrvo_p): New.
1705 (check_return_expr): Handle -Wnrvo.
1706
1707 2023-06-07 Jason Merrill <jason@redhat.com>
1708
1709 PR c++/51571
1710 PR c++/92407
1711 * decl.cc (finish_function): Simplify NRV handling.
1712 * except.cc (maybe_set_retval_sentinel): Also set if NRV.
1713 (maybe_splice_retval_cleanup): Don't add the cleanup region
1714 if we don't need it.
1715 * semantics.cc (nrv_data): Add simple field.
1716 (finalize_nrv): Set it.
1717 (finalize_nrv_r): Check it and retval sentinel.
1718 * cp-tree.h (finalize_nrv): Adjust declaration.
1719 * typeck.cc (check_return_expr): Remove named_labels check.
1720
1721 2023-06-07 Jason Merrill <jason@redhat.com>
1722
1723 PR c++/92407
1724 * typeck.cc (check_return_expr): Prevent NRV in the presence of
1725 named labels.
1726
1727 2023-06-07 Jason Merrill <jason@redhat.com>
1728
1729 PR c++/33799
1730 * except.cc (maybe_splice_retval_cleanup): Change
1731 recognition of function body and try scopes.
1732 * semantics.cc (do_poplevel): Call it after poplevel.
1733 (at_try_scope): New.
1734 * cp-tree.h (maybe_splice_retval_cleanup): Adjust.
1735
1736 2023-06-07 Jason Merrill <jason@redhat.com>
1737
1738 * semantics.cc (finalize_nrv_r): [RETURN_EXPR]: Only replace the
1739 INIT_EXPR.
1740
1741 2023-06-06 Kwok Cheung Yeung <kcy@codesourcery.com>
1742 Tobias Burnus <tobias@codesourcery.com>
1743
1744 * parser.cc (cp_parser_omp_clause_defaultmap,
1745 cp_parser_omp_clause_map): Parse 'present'.
1746 (cp_parser_omp_clause_from_to): New; parse to/from
1747 clauses with optional 'present' modifier.
1748 (cp_parser_omp_all_clauses): Update call.
1749 (cp_parser_omp_target_data, cp_parser_omp_target_enter_data,
1750 cp_parser_omp_target_exit_data): Handle new enum value for
1751 'present' mapping.
1752 * semantics.cc (finish_omp_target): Likewise.
1753
1754 2023-06-04 Jason Merrill <jason@redhat.com>
1755
1756 PR c++/97720
1757 * cp-tree.h (enum cp_tree_index): Add CPTI_CALL_TERMINATE_FN.
1758 (call_terminate_fn): New macro.
1759 * cp-gimplify.cc (gimplify_must_not_throw_expr): Use it.
1760 * except.cc (init_exception_processing): Set it.
1761 (cp_protect_cleanup_actions): Return it.
1762
1763 2023-06-03 Patrick Palka <ppalka@redhat.com>
1764
1765 PR c++/109923
1766 * pt.cc (is_specialization_of_friend): Fix overbroad check for
1767 a non-template member function of a class template.
1768
1769 2023-06-03 Patrick Palka <ppalka@redhat.com>
1770
1771 * pt.cc (iterative_hash_template_arg): Don't hash
1772 TEMPLATE_TEMPLATE_PARM specially.
1773
1774 2023-06-03 Patrick Palka <ppalka@redhat.com>
1775
1776 * class.cc (build_base_path): Check in_template_context instead
1777 of in_template_function.
1778 (resolves_to_fixed_type_p): Likewise.
1779 * cp-tree.h (in_template_context): Define.
1780 (in_template_function): Remove.
1781 * decl.cc (cp_make_fname_decl): Check current_function_decl
1782 and in_template_context instead of in_template_function.
1783 * decl2.cc (mark_used): Check in_template_context instead of
1784 in_template_function.
1785 * pt.cc (in_template_function): Remove.
1786 * semantics.cc (enforce_access): Check in_template_context
1787 instead of current_template_parms directly.
1788
1789 2023-06-03 Patrick Palka <ppalka@redhat.com>
1790
1791 PR c++/70790
1792 * mangle.cc (write_expression): Handle NOEXCEPT_EXPR.
1793
1794 2023-06-02 Jason Merrill <jason@redhat.com>
1795
1796 DR 2735
1797 PR c++/109247
1798 * call.cc (sfk_copy_or_move): New.
1799 (joust): Add tiebreaker for explicit conv and copy ctor.
1800
1801 2023-06-02 Jason Merrill <jason@redhat.com>
1802
1803 PR c++/110070
1804 PR c++/105838
1805 * call.cc (maybe_init_list_as_array): Set DECL_MERGEABLE.
1806 (convert_like_internal) [ck_list]: Set it.
1807 (set_up_extended_ref_temp): Copy it.
1808 * tree.cc (handle_no_unique_addr_attribute): Set it.
1809
1810 2023-06-01 Jason Merrill <jason@redhat.com>
1811
1812 * typeck2.cc (check_narrowing): Check flag_permissive.
1813
1814 2023-05-30 Tobias Burnus <tobias@codesourcery.com>
1815
1816 PR c/109999
1817 * parser.cc (cp_parser_oacc_all_clauses,
1818 cp_parser_omp_all_clauses): Improve error wording.
1819
1820 2023-05-19 Andrew Pinski <apinski@marvell.com>
1821
1822 PR driver/33980
1823 * lang-specs.h ("@c++-header"): Add %w after
1824 the --output-pch.
1825 ("@c++-system-header"): Likewise.
1826 ("@c++-user-header"): Likewise.
1827
1828 2023-05-19 Patrick Palka <ppalka@redhat.com>
1829
1830 * constraint.cc (normalize_concept_check): Avoid having to do
1831 two norm_cache lookups. Remove unnecessary early exit for an
1832 ill-formed concept definition.
1833
1834 2023-05-19 Patrick Palka <ppalka@redhat.com>
1835
1836 PR c++/97340
1837 * pt.cc (lookup_and_finish_template_variable): Don't call
1838 convert_from_reference.
1839 (tsubst_copy_and_build) <case TEMPLATE_ID_EXPR>: Call
1840 convert_from_reference on the result of
1841 lookup_and_finish_template_variable.
1842
1843 2023-05-18 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
1844
1845 * call.cc (promoted_arithmetic_type_p): Use _P defines from tree.h.
1846 (build_conditional_expr): Ditto.
1847 (convert_like_internal): Ditto.
1848 (convert_arg_to_ellipsis): Ditto.
1849 (build_over_call): Ditto.
1850 (compare_ics): Ditto.
1851 * class.cc (is_empty_base_ref): Ditto.
1852 * coroutines.cc (rewrite_param_uses): Ditto.
1853 * cp-tree.h (DECL_DISCRIMINATOR_P): Ditto.
1854 (ARITHMETIC_TYPE_P): Ditto.
1855 * cvt.cc (ocp_convert): Ditto.
1856 * cxx-pretty-print.cc (pp_cxx_template_argument_list): Ditto.
1857 * decl.cc (layout_var_decl): Ditto.
1858 (get_tuple_size): Ditto.
1859 * error.cc (dump_simple_decl): Ditto.
1860 * lambda.cc (start_lambda_scope): Ditto.
1861 * mangle.cc (write_template_arg): Ditto.
1862 * method.cc (spaceship_comp_cat): Ditto.
1863 * module.cc (node_template_info): Ditto.
1864 (trees_out::start): Ditto.
1865 (trees_out::decl_node): Ditto.
1866 (trees_in::read_var_def): Ditto.
1867 (set_instantiating_module): Ditto.
1868 * name-lookup.cc (maybe_record_mergeable_decl): Ditto.
1869 (consider_decl): Ditto.
1870 (maybe_add_fuzzy_decl): Ditto.
1871 * pt.cc (convert_nontype_argument): Ditto.
1872 * semantics.cc (handle_omp_array_sections_1): Ditto.
1873 (finish_omp_clauses): Ditto.
1874 (finish_omp_target_clauses_r): Ditto.
1875 (is_this_parameter): Ditto.
1876 * tree.cc (build_cplus_array_type): Ditto.
1877 (is_this_expression): Ditto.
1878 * typeck.cc (do_warn_enum_conversions): Ditto.
1879 * typeck2.cc (store_init_value): Ditto.
1880 (check_narrowing): Ditto.
1881
1882 2023-05-17 Jakub Jelinek <jakub@redhat.com>
1883
1884 PR c++/109868
1885 * init.cc (build_zero_init_1): Don't initialize zero-width bitfields.
1886 For unions only initialize the first FIELD_DECL.
1887
1888 2023-05-16 Marek Polacek <polacek@redhat.com>
1889
1890 PR c++/109774
1891 * typeck.cc (check_return_expr): In a template, return only after
1892 suppressing -Wdangling-reference.
1893
1894 2023-05-16 Patrick Palka <ppalka@redhat.com>
1895
1896 PR c++/109871
1897 * call.cc (add_list_candidates): Check for invalid designated
1898 initialization sooner and even for types that have a list
1899 constructor.
1900
1901 2023-05-11 Patrick Palka <ppalka@redhat.com>
1902
1903 PR c++/109745
1904 * typeck2.cc (poison_mutable_constructors): Define.
1905 (store_init_value): Use it instead of setting
1906 CONSTRUCTOR_MUTABLE_POISON directly.
1907
1908 2023-05-11 Patrick Palka <ppalka@redhat.com>
1909 Jonathan Wakely <jwakely@redhat.com>
1910
1911 PR c++/83258
1912 PR c++/80488
1913 PR c++/97700
1914 * pt.cc (convert_nontype_argument_function): Remove linkage
1915 requirement for C++17 and later.
1916 (invalid_tparm_referent_p) <case ADDR_EXPR>: Restrict
1917 DECL_ARTIFICIAL rejection test to VAR_DECL.
1918
1919 2023-05-10 Marek Polacek <polacek@redhat.com>
1920
1921 PR c++/109680
1922 * method.cc (build_trait_object): New.
1923 (assignable_expr): Use it.
1924 (ref_xes_from_temporary): Likewise.
1925 (is_convertible_helper): Likewise. Check FUNC_OR_METHOD_TYPE_P.
1926
1927 2023-05-10 Jason Merrill <jason@redhat.com>
1928
1929 * call.cc (convert_like_internal): Share ck_ref_bind handling
1930 between all bad conversions.
1931
1932 2023-05-10 Jason Merrill <jason@redhat.com>
1933
1934 DR 2543
1935 * constexpr.cc (cxx_eval_outermost_constant_expr): Preserve
1936 TARGET_EXPR flags.
1937 (potential_constant_expression_1): Check TARGET_EXPR_ELIDING_P.
1938 * typeck2.cc (store_init_value): Diagnose constinit sooner.
1939
1940 2023-05-10 Jason Merrill <jason@redhat.com>
1941
1942 * constexpr.cc (cxx_eval_outermost_constant_expr): Always check
1943 for address of immediate fn.
1944 (maybe_constant_init_1): Evaluate PTRMEM_CST.
1945
1946 2023-05-10 Jakub Jelinek <jakub@redhat.com>
1947
1948 PR c++/109756
1949 * parser.cc (cp_parser_std_attribute): For unknown attributes with
1950 arguments set TREE_VALUE (attribute) to error_mark_node after skipping
1951 the balanced tokens.
1952 (cp_parser_std_attribute_list): If ... is used after attribute without
1953 arguments, diagnose it and return error_mark_node. If
1954 TREE_VALUE (attribute) is error_mark_node, don't call
1955 make_pack_expansion nor return early error_mark_node.
1956
1957 2023-05-09 Patrick Palka <ppalka@redhat.com>
1958
1959 PR c++/109752
1960 * constraint.cc (satisfaction_cache::satisfaction_cache): In the
1961 unexpected case of evaluating an atom for the first time noisily,
1962 remove the cache slot that we inserted.
1963
1964 2023-05-09 Patrick Palka <ppalka@redhat.com>
1965
1966 PR c++/109761
1967 * parser.cc (cp_parser_class_specifier): Don't pass a class
1968 context to noexcept_override_late_checks.
1969 (noexcept_override_late_checks): Remove 'type' parameter
1970 and use DECL_CONTEXT of 'fndecl' instead.
1971
1972 2023-05-09 Jakub Jelinek <jakub@redhat.com>
1973
1974 PR c++/109756
1975 * cp-gimplify.cc (process_stmt_assume_attribute): Diagnose pack
1976 expansion of assume attribute.
1977
1978 2023-05-08 Patrick Palka <ppalka@redhat.com>
1979
1980 PR c++/106214
1981 PR c++/93107
1982 * pt.cc (do_auto_deduction): Move up resolve_nondeduced_context
1983 calls to happen before do_class_deduction. Add some
1984 error_mark_node tests.
1985
1986 2023-05-07 Patrick Palka <ppalka@redhat.com>
1987
1988 PR c++/85979
1989 * cxx-pretty-print.cc (cxx_pretty_printer::unary_expression)
1990 <case ALIGNOF_EXPR>: Consider ALIGNOF_EXPR_STD_P.
1991 * error.cc (dump_expr) <case ALIGNOF_EXPR>: Likewise.
1992
1993 2023-05-07 Patrick Palka <ppalka@redhat.com>
1994
1995 DR 2256
1996 PR c++/103091
1997 * decl.cc (decl_jump_unsafe): Return bool instead of int.
1998 Don't consider TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
1999 (check_previous_goto_1): Simplify now that decl_jump_unsafe
2000 returns bool instead of int.
2001 (check_goto): Likewise.
2002
2003 2023-05-07 Patrick Palka <ppalka@redhat.com>
2004
2005 * pt.cc (instantiate_alias_template): Exit early upon
2006 error from coerce_template_parms. Remove dependence test
2007 guarding constraints_satisfied_p.
2008
2009 2023-05-07 Patrick Palka <ppalka@redhat.com>
2010
2011 * cp-tree.h (PLACEHOLDER_TYPE_CONSTRAINTS_INFO): Harden via
2012 TEMPLATE_TYPE_PARM_CHECK.
2013 (TPARMS_PRIMARY_TEMPLATE): Harden via TREE_VEC_CHECK.
2014 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Harden via
2015 TEMPLATE_TEMPLATE_PARM_CHECK.
2016 * cxx-pretty-print.cc (cxx_pretty_printer::simple_type_specifier):
2017 Guard PLACEHOLDER_TYPE_CONSTRAINTS access.
2018 * error.cc (dump_type) <case TEMPLATE_TYPE_PARM>: Use separate
2019 variable to store CLASS_PLACEHOLDER_TEMPLATE result.
2020 * pt.cc (outer_template_args): Use strip_innermost_template_args.
2021 (any_type_dependent_arguments_p): Exit early if
2022 !processing_template_decl. Use range-based for.
2023 (any_dependent_template_arguments_p): Likewise.
2024
2025 2023-05-07 Patrick Palka <ppalka@redhat.com>
2026
2027 PR c++/98283
2028 * pt.cc (tsubst_copy_and_build) <case COMPONENT_REF>: Propagate
2029 REF_PARENTHESIZED_P more generally via force_paren_expr.
2030 * semantics.cc (force_paren_expr): Document default argument.
2031
2032 2023-05-07 Patrick Palka <ppalka@redhat.com>
2033
2034 PR c++/109651
2035 * pt.cc (coerce_template_args_for_ttp): Mention we can hit the
2036 current_template_parms fallback when level-lowering a bound ttp.
2037 (tsubst_template_decl): Add lambda_tparms parameter. Prefer to
2038 use lambda_tparms instead of substituting DECL_TEMPLATE_PARMS.
2039 (tsubst_decl) <case TEMPLATE_DECL>: Pass NULL_TREE as lambda_tparms
2040 to tsubst_template_decl.
2041 (tsubst_lambda_expr): For a generic lambda, substitute
2042 DECL_TEMPLATE_PARMS and set current_template_parms to it
2043 before substituting the function type. Pass the substituted
2044 DECL_TEMPLATE_PARMS as lambda_tparms to tsubst_template_decl.
2045
2046 2023-05-07 Patrick Palka <ppalka@redhat.com>
2047
2048 PR c++/109480
2049 * semantics.cc (enforce_access): Check current_template_parms
2050 instead of processing_template_decl when deciding whether to
2051 defer the access check.
2052
2053 2023-05-07 Patrick Palka <ppalka@redhat.com>
2054
2055 PR c++/109480
2056 * constexpr.cc (potential_constant_expression_1) <case CALL_EXPR>:
2057 Reorganize to call get_fns sooner. Remove special handling of
2058 the object argument of a non-static member function call. Remove
2059 dead store to 'fun'.
2060
2061 2023-05-05 Jason Merrill <jason@redhat.com>
2062
2063 Revert:
2064 2023-04-27 Jason Merrill <jason@redhat.com>
2065
2066 PR c++/61445
2067 * pt.cc (instantiate_decl): Assert !defer_ok for local
2068 class members.
2069
2070 2023-05-03 Jason Merrill <jason@redhat.com>
2071
2072 PR c++/91618
2073 PR c++/109649
2074 * friend.cc (do_friend): Don't call check_explicit_specialization if
2075 DECL_TEMPLATE_INFO is already set.
2076 * decl2.cc (check_classfn): Set DECL_TEMPLATE_INFO.
2077 * name-lookup.cc (set_decl_namespace): Likewise.
2078
2079 2023-05-03 Jakub Jelinek <jakub@redhat.com>
2080
2081 * cp-gimplify.cc (cp_fold_data): Move definition earlier.
2082 (cp_gimplify_expr): Pass address of ff_genericize | ff_mce_false
2083 constructed data rather than &pset to cp_walk_tree with cp_fold_r.
2084
2085 2023-05-03 Jason Merrill <jason@redhat.com>
2086
2087 * pt.cc (reduce_template_parm_level): Fix comparison of
2088 template template parm to cached version.
2089
2090 2023-05-02 Jason Merrill <jason@redhat.com>
2091
2092 * pt.cc (instantiate_class_template): Skip the RECORD_TYPE
2093 of a class template.
2094 (tsubst_template_decl): Clear CLASSTYPE_USE_TEMPLATE.
2095
2096 2023-05-02 Jason Merrill <jason@redhat.com>
2097
2098 * name-lookup.cc (pop_from_top_level): Don't
2099 invalidate_class_lookup_cache.
2100
2101 2023-05-02 Jason Merrill <jason@redhat.com>
2102
2103 PR c++/109678
2104 * cp-tree.h (lookup_base): Add offset parm.
2105 * constexpr.cc (cxx_fold_indirect_ref_1): Pass it.
2106 * search.cc (struct lookup_base_data_s): Add offset.
2107 (dfs_lookup_base): Handle it.
2108 (lookup_base): Pass it.
2109
2110 2023-05-02 Jason Merrill <jason@redhat.com>
2111
2112 PR c++/109678
2113 * constexpr.cc (cxx_fold_indirect_ref_1): Handle empty base first.
2114
2115 2023-05-01 Jason Merrill <jason@redhat.com>
2116
2117 PR c++/109666
2118 * name-lookup.cc (maybe_push_to_top_level)
2119 (maybe_pop_from_top_level): Split out...
2120 * pt.cc (instantiate_body): ...from here.
2121 * init.cc (maybe_instantiate_nsdmi_init): Use them.
2122 * name-lookup.h: Declare them..
2123
2124 2023-04-28 Eugene Rozenfeld <erozen@microsoft.com>
2125
2126 * Make-lang.in: Merge perf data collected when compiling cc1plus and runtime libraries
2127
2128 2023-04-27 Jason Merrill <jason@redhat.com>
2129
2130 * call.cc (print_conversion_rejection): Use iloc_sentinel.
2131
2132 2023-04-27 Jason Merrill <jason@redhat.com>
2133
2134 PR c++/61445
2135 * pt.cc (instantiate_decl): Assert !defer_ok for local
2136 class members.
2137
2138 2023-04-26 Jason Merrill <jason@redhat.com>
2139
2140 * init.cc (nsdmi_inst): Remove.
2141 (maybe_instantiate_nsdmi_init): Use DECL_INITIAL instead.
2142
2143 2023-04-26 Jason Merrill <jason@redhat.com>
2144
2145 PR c++/109241
2146 * pt.cc (instantiate_class_template): Do partially instantiate.
2147 (tsubst_expr): Do call complete_type for partial instantiations.
2148
2149 2023-04-26 Jason Merrill <jason@redhat.com>
2150
2151 PR c++/69836
2152 * pt.cc (regenerate_decl_from_template): Skip unique friends.
2153
2154 2023-04-26 Patrick Palka <ppalka@redhat.com>
2155
2156 * pt.cc (most_specialized_partial_spec): Exit early when
2157 DECL_TEMPLATE_SPECIALIZATIONS is empty. Move local variable
2158 declarations closer to their first use. Remove redundant
2159 flag_concepts test. Remove redundant forward declaration.
2160
2161 2023-04-25 Patrick Palka <ppalka@redhat.com>
2162
2163 PR c++/108975
2164 * pt.cc (value_dependent_expression_p) <case VAR_DECL>:
2165 Suppress conservative early exit for reference variables
2166 when DECL_HAS_VALUE_EXPR_P.
2167
2168 2023-04-25 Tobias Burnus <tobias@codesourcery.com>
2169
2170 * parser.cc (cp_parser_omp_scan_loop_body): Handle
2171 zero exec statements before/after 'omp scan'.
2172
2173 2023-04-24 Patrick Palka <ppalka@redhat.com>
2174
2175 * cp-tree.h (cp_expr_location): Define here.
2176 * tree.cc (cp_expr_location): Don't define here.
2177
2178 2023-04-21 Jason Merrill <jason@redhat.com>
2179
2180 PR c++/108099
2181 * decl.cc (grokdeclarator): Don't clear typedef_decl after 'unsigned
2182 typedef' pedwarn. Use c_common_signed_or_unsigned_type. Also
2183 handle 'signed typedef'.
2184
2185 2023-04-21 Patrick Palka <ppalka@redhat.com>
2186
2187 * tree.cc (cp_walk_subtrees): Avoid repeatedly dereferencing tp.
2188 <case DECLTYPE_TYPE>: Use cp_unevaluated and WALK_SUBTREE.
2189 <case ALIGNOF_EXPR etc>: Likewise.
2190
2191 2023-04-20 Patrick Palka <ppalka@redhat.com>
2192
2193 * pt.cc (tsubst) <case TEMPLATE_TYPE_PARM>: Don't recurse when
2194 level lowering a cv-qualified type template parameter. Remove
2195 recursive loop breaker in the level lowering case for constrained
2196 autos. Use the TEMPLATE_PARM_DESCENDANTS cache in this case as
2197 well.
2198
2199 2023-04-20 Patrick Palka <ppalka@redhat.com>
2200
2201 * constraint.cc (diagnose_trait_expr): Convert a TREE_VEC
2202 of arguments into a TREE_LIST for sake of pretty printing.
2203 * cxx-pretty-print.cc (pp_cxx_trait): Handle TREE_VEC
2204 instead of TREE_LIST of trailing variadic trait arguments.
2205 * method.cc (constructible_expr): Likewise.
2206 (is_xible_helper): Likewise.
2207 * parser.cc (cp_parser_trait): Represent trailing variadic trait
2208 arguments as a TREE_VEC instead of TREE_LIST.
2209 * pt.cc (value_dependent_expression_p): Handle TREE_VEC
2210 instead of TREE_LIST of trailing variadic trait arguments.
2211 * semantics.cc (finish_type_pack_element): Likewise.
2212 (check_trait_type): Likewise.
2213
2214 2023-04-20 Patrick Palka <ppalka@redhat.com>
2215
2216 * tree.cc (strip_typedefs): Move TREE_LIST handling to
2217 strip_typedefs_expr. Dispatch to strip_typedefs_expr for
2218 non-type 't'.
2219 <case TYPENAME_TYPE>: Remove manual dispatching to
2220 strip_typedefs_expr.
2221 <case TRAIT_TYPE>: Likewise.
2222 (strip_typedefs_expr): Replaces calls to strip_typedefs_expr
2223 with strip_typedefs throughout. Don't dispatch to strip_typedefs
2224 for type 't'.
2225 <case TREE_LIST>: Replace this with the better version from
2226 strip_typedefs.
2227
2228 2023-04-19 Patrick Palka <ppalka@redhat.com>
2229 Jonathan Wakely <jwakely@redhat.com>
2230
2231 PR c++/100157
2232 * cp-trait.def (TYPE_PACK_ELEMENT): Define.
2233 * cp-tree.h (finish_trait_type): Add complain parameter.
2234 * cxx-pretty-print.cc (pp_cxx_trait): Handle
2235 CPTK_TYPE_PACK_ELEMENT.
2236 * parser.cc (cp_parser_constant_expression): Document default
2237 arguments.
2238 (cp_parser_trait): Handle CPTK_TYPE_PACK_ELEMENT. Pass
2239 tf_warning_or_error to finish_trait_type.
2240 * pt.cc (tsubst) <case TRAIT_TYPE>: Handle non-type first
2241 argument. Pass complain to finish_trait_type.
2242 * semantics.cc (finish_type_pack_element): Define.
2243 (finish_trait_type): Add complain parameter. Handle
2244 CPTK_TYPE_PACK_ELEMENT.
2245 * tree.cc (strip_typedefs): Handle non-type first argument.
2246 Pass tf_warning_or_error to finish_trait_type.
2247 * typeck.cc (structural_comptypes) <case TRAIT_TYPE>: Use
2248 cp_tree_equal instead of same_type_p for the first argument.
2249
2250 2023-04-19 Patrick Palka <ppalka@redhat.com>
2251
2252 PR c++/109556
2253 * pt.cc (try_class_unification): Don't ggc_free the copy of
2254 'targs'.
2255
2256 2023-04-19 Jason Merrill <jason@redhat.com>
2257
2258 PR c++/108099
2259 * decl.cc (grokdeclarator): Keep typedef_decl for __int128_t.
2260
2261 2023-04-17 Patrick Palka <ppalka@redhat.com>
2262
2263 PR c++/109531
2264 * pt.cc (tsubst) <case BOUND_TEMPLATE_TEMPLATE_PARM>:
2265 In the level-lowering case just use lookup_template_class
2266 to rebuild the bound ttp.
2267
2268 2023-04-15 Jason Merrill <jason@redhat.com>
2269
2270 PR c++/109357
2271 * constexpr.cc (cxx_eval_constant_expression) [TARGET_EXPR]:
2272 Check for complex initializer.
2273
2274 2023-04-13 Patrick Palka <ppalka@redhat.com>
2275
2276 PR c++/109420
2277 * decl.cc (make_typename_type): Also ignore non-types during the
2278 lookup if tag_type corresponds to an elaborated-type-specifier.
2279 * pt.cc (tsubst) <case TYPENAME_TYPE>: Pass class_type or
2280 enum_type as tag_type to make_typename_type accordingly instead
2281 of always passing typename_type.
2282
2283 2023-04-13 Jason Merrill <jason@redhat.com>
2284
2285 PR c++/109277
2286 * semantics.cc (check_trait_type): Handle incomplete type directly.
2287 * typeck2.cc (cxx_incomplete_type_diagnostic): Remove assert.
2288
2289 2023-04-13 Jason Merrill <jason@redhat.com>
2290
2291 * typeck2.cc (cxx_incomplete_type_diagnostic): Return bool.
2292 * cp-tree.h (cxx_incomplete_type_diagnostic): Adjust.
2293
2294 2023-04-12 Jakub Jelinek <jakub@redhat.com>
2295
2296 * Make-lang.in (s-cp-module-version): New target.
2297 (cp/module.o): Depend on it.
2298 (MODULE_VERSION): Remove variable.
2299 (CFLAGS-cp/module.o): For -DMODULE_VERSION= argument just
2300 cat s-cp-module-version.
2301
2302 2023-04-09 Iain Sandoe <iain@sandoe.co.uk>
2303
2304 * coroutines.cc (coro_rewrite_function_body): Ensure that added
2305 bind expressions have scope blocks.
2306
2307 2023-04-04 Jason Merrill <jason@redhat.com>
2308
2309 PR c++/107484
2310 * decl2.cc (find_last_decl): Return early if DECL_USE_TEMPLATE.
2311
2312 2023-04-03 Patrick Palka <ppalka@redhat.com>
2313
2314 PR c++/109300
2315 * decl.cc (cp_finish_decl): Diagnose ordinary auto deduction
2316 with no initializer, instead of asserting.
2317
2318 2023-04-01 Patrick Palka <ppalka@redhat.com>
2319
2320 PR c++/109160
2321 * cp-tree.h (do_auto_deduction): Add defaulted tmpl parameter.
2322 * pt.cc (convert_template_argument): Pass 'in_decl' as 'tmpl' to
2323 do_auto_deduction.
2324 (tsubst_decl) <case VAR_/TYPE_DECL>: Pass 'tmpl' instead of 't' as
2325 'in_decl' to coerce_template_parms.
2326 (unify) <case TEMPLATE_PARM_INDEX>: Pass TPARMS_PRIMARY_TEMPLATE
2327 as 'tmpl' to do_auto_deduction.
2328 (do_auto_deduction): Document default arguments. Rename local
2329 variable 'tmpl' to 'ctmpl'. Use 'tmpl' to obtain a full set of
2330 template arguments for satisfaction in the adc_unify case.
2331
2332 2023-04-01 Patrick Palka <ppalka@redhat.com>
2333
2334 PR c++/53164
2335 PR c++/105848
2336 * pt.cc (invalid_tparm_referent_p): Accept ADDR_EXPR of
2337 FUNCTION_DECL.
2338 (instantiate_class_template): Call mark_template_arguments_used.
2339 (tsubst_copy_and_build) <case CALL_EXPR>: Revert r13-995 change.
2340 (mark_template_arguments_used): Define.
2341 (instantiate_body): Call mark_template_arguments_used.
2342
2343 2023-04-01 Iain Sandoe <iain@sandoe.co.uk>
2344
2345 PR c++/101118
2346 * coroutines.cc (flatten_await_stmt): Use the current count of
2347 promoted temporaries to build a unique name for the frame entries.
2348
2349 2023-03-30 Jason Merrill <jason@redhat.com>
2350
2351 PR c++/105452
2352 * search.cc (type_context_for_name_lookup): New.
2353 (accessible_p): Handle anonymous union.
2354 * init.cc (maybe_instantiate_nsdmi_init): Use
2355 type_context_for_name_lookup.
2356 * parser.cc (cp_parser_class_specifier): Likewise.
2357 * cp-tree.h (type_context_for_name_lookup): Declare.
2358
2359 2023-03-30 Jason Merrill <jason@redhat.com>
2360
2361 PR c++/105221
2362 * pt.cc (unify) [FUNCTION_TYPE]: Handle function pointer
2363 conversions.
2364
2365 2023-03-30 Jakub Jelinek <jakub@redhat.com>
2366
2367 PR c++/109319
2368 * decl2.cc (grok_array_decl): After emitting a pedwarn for
2369 -Wcomma-subscript, if processing_template_decl set orig_index_exp
2370 to compound expr from orig_index_exp_list.
2371
2372 2023-03-30 Jason Merrill <jason@redhat.com>
2373
2374 PR c++/107897
2375 PR c++/108887
2376 * decl2.cc (record_mangling): Use symtab_node::reset.
2377
2378 2023-03-30 Jakub Jelinek <jakub@redhat.com>
2379
2380 PR c++/109278
2381 * call.cc (convert_like_internal): If pedwarn for extended float
2382 type conversions doesn't report anything, avoid calling
2383 maybe_inform_about_fndecl_for_bogus_argument_init.
2384
2385 2023-03-29 Jason Merrill <jason@redhat.com>
2386
2387 PR c++/109321
2388 PR c++/109320
2389 * pt.cc (alias_ctad_tweaks): Rewrite deduced args.
2390 (type_targs_deducible_from): Handle null pack deduction.
2391
2392 2023-03-28 David Malcolm <dmalcolm@redhat.com>
2393
2394 PR c/107002
2395 * parser.cc (cp_parser_binary_expression): Update for new param of
2396 check_for_xor_used_as_pow.
2397
2398 2023-03-28 Jakub Jelinek <jakub@redhat.com>
2399
2400 PR c++/109309
2401 * contracts.cc: Include intl.h.
2402 (check_postcondition_result): Don't form diagnostics from two halves
2403 of an English message to allow translations.
2404
2405 2023-03-24 Patrick Palka <ppalka@redhat.com>
2406
2407 PR c++/106969
2408 * parser.cc (cp_parser_class_specifier): Clear current_class_ptr
2409 and current_class_ref sooner, before parsing a class definition.
2410
2411 2023-03-24 Jason Merrill <jason@redhat.com>
2412
2413 PR c++/105481
2414 * pt.cc (type_unification_real): Adjust for partial ordering.
2415
2416 2023-03-23 Jason Merrill <jason@redhat.com>
2417
2418 PR c++/105996
2419 * typeck.cc (build_ptrmemfunc): Drop 0-offset optimization
2420 and location wrappers.
2421
2422 2023-03-23 Marek Polacek <polacek@redhat.com>
2423
2424 PR c++/107532
2425 * call.cc (class_has_reference_member_p): New.
2426 (class_has_reference_member_p_r): New.
2427 (reference_like_class_p): Don't look for a specific constructor.
2428 Use a DFS walk with class_has_reference_member_p_r.
2429
2430 2023-03-23 Jason Merrill <jason@redhat.com>
2431
2432 PR c++/109241
2433 * pt.cc (find_parameter_packs_r): Handle null TREE_BINFO.
2434
2435 2023-03-22 Jason Merrill <jason@redhat.com>
2436
2437 PR c++/108390
2438 * pt.cc (unify): Use fold of build_nop instead of fold_convert.
2439
2440 2023-03-22 Jason Merrill <jason@redhat.com>
2441
2442 PR c++/108795
2443 * semantics.cc (finish_id_expression_1): Check scope before
2444 returning id_expression.
2445
2446 2023-03-22 Alex Coplan <alex.coplan@arm.com>
2447
2448 PR c++/109177
2449 * call.cc (build_over_call): Use make_temp_override to suppress
2450 both unavailable and deprecated warnings when calling
2451 build_addr_func.
2452
2453 2023-03-21 Jason Merrill <jason@redhat.com>
2454
2455 PR c++/106890
2456 * init.cc (maybe_instantiate_nsdmi_init): Don't leave
2457 current_function_decl set to a constructor.
2458
2459 2023-03-20 Marek Polacek <polacek@redhat.com>
2460
2461 PR c++/109159
2462 * call.cc (add_template_candidate_real): Add explicit decls to the
2463 set of candidates when the initializer is a braced-init-list.
2464
2465 2023-03-20 Jakub Jelinek <jakub@redhat.com>
2466
2467 PR c++/109164
2468 * cp-tree.h (var_needs_tls_wrapper): Declare.
2469 * decl2.cc (var_needs_tls_wrapper): No longer static.
2470 * decl.cc (cp_finish_decl): Clear TREE_READONLY on TLS variables
2471 for which a TLS wrapper will be needed.
2472
2473 2023-03-17 Jason Merrill <jason@redhat.com>
2474
2475 PR c++/108975
2476 * lambda.cc (prune_lambda_captures): Don't bother in a template.
2477
2478 2023-03-17 Jason Merrill <jason@redhat.com>
2479
2480 PR c++/109172
2481 * except.cc (build_throw): Check dtor access.
2482
2483 2023-03-17 Jason Merrill <jason@redhat.com>
2484
2485 PR c++/69410
2486 * friend.cc (do_friend): Handle namespace as scope argument.
2487 * decl.cc (grokdeclarator): Pass down in_namespace.
2488
2489 2023-03-16 Jason Merrill <jason@redhat.com>
2490
2491 PR c++/105809
2492 * init.cc (get_nsdmi): Split out...
2493 (maybe_instantiate_nsdmi_init): ...this function.
2494 * cp-tree.h: Declare it.
2495 * pt.cc (tsubst_expr): Use it.
2496
2497 2023-03-16 Jason Merrill <jason@redhat.com>
2498
2499 PR c++/108242
2500 * pt.cc (tsubst_expr) [TAG_DEFN]: Handle partial instantiation.
2501
2502 2023-03-16 Jason Merrill <jason@redhat.com>
2503
2504 PR c++/101869
2505 * semantics.cc (finish_qualified_id_expr): Don't try to build a
2506 pointer-to-member if the scope is an enumeration.
2507
2508 2023-03-16 Patrick Palka <ppalka@redhat.com>
2509
2510 PR c++/109030
2511 * constexpr.cc (maybe_constant_init_1): For an unevaluated
2512 non-manifestly-constant operand, don't constant evaluate
2513 and instead call fold_to_constant as in maybe_constant_value.
2514
2515 2023-03-16 Patrick Palka <ppalka@redhat.com>
2516
2517 PR c++/100288
2518 * constraint.cc (satisfaction_cache::get): Relax overly strict
2519 checking assert in the constraint recursion case.
2520
2521 2023-03-16 Jason Merrill <jason@redhat.com>
2522
2523 PR c++/105406
2524 * coroutines.cc (build_co_await): Handle lvalue 'o'.
2525
2526 2023-03-15 Jason Merrill <jason@redhat.com>
2527
2528 PR c++/103871
2529 PR c++/98056
2530 * typeck.cc (cp_build_modify_expr): Allow array initialization of
2531 DECL_ARTIFICIAL variable.
2532
2533 2023-03-15 Marek Polacek <polacek@redhat.com>
2534
2535 PR c++/107280
2536 * constexpr.cc (cxx_eval_store_expression): Strip location wrappers.
2537
2538 2023-03-15 Jason Merrill <jason@redhat.com>
2539
2540 PR c++/58538
2541 * semantics.cc (check_template_template_default_arg): Check
2542 maybe_get_template_decl_from_type_decl.
2543
2544 2023-03-15 Jason Merrill <jason@redhat.com>
2545
2546 PR c++/108179
2547 PR c++/104107
2548 PR c++/95036
2549 * pt.cc (coerce_template_template_parms): Use args from
2550 DECL_CONTEXT (arg_tmpl) instead of outer_args.
2551
2552 2023-03-15 Jason Merrill <jason@redhat.com>
2553
2554 PR c++/108179
2555 * pt.cc (coerce_template_template_parms): Take the arg and parm
2556 templates directly.
2557 (coerce_template_template_parm): Adjust.
2558 (template_template_parm_bindings_ok_p): Adjust.
2559 (convert_template_argument): Adjust.
2560
2561 2023-03-14 Patrick Palka <ppalka@redhat.com>
2562
2563 PR c++/96830
2564 * pt.cc (push_inline_template_parms_recursive): Set
2565 TEMPLATE_PARMS_CONSTRAINTS.
2566 (push_template_decl): For an out-of-line declaration, verify
2567 constraints for each enclosing template scope match those of the
2568 original template declaratation.
2569
2570 2023-03-14 Patrick Palka <ppalka@redhat.com>
2571
2572 PR c++/96830
2573 * pt.cc (redeclare_class_template): Add missing "of" in
2574 constraint mismatch diagnostic.
2575 (tsubst_friend_class): For an already declared class template,
2576 substitute and pass the friend declaration's constraints to
2577 redeclare_class_template instead of passing the existing
2578 template's constraints.
2579
2580 2023-03-14 Jason Merrill <jason@redhat.com>
2581
2582 PR c++/108468
2583 * pt.cc (unify_pack_expansion): Check that TPARMS_PRIMARY_TEMPLATE
2584 is non-null.
2585
2586 2023-03-14 Jason Merrill <jason@redhat.com>
2587
2588 PR c++/107310
2589 * cp-gimplify.cc (genericize_if_stmt): Restore folding
2590 of constant conditions.
2591
2592 2023-03-14 Jakub Jelinek <jakub@redhat.com>
2593
2594 PR c++/109096
2595 * tree.cc (record_has_unique_obj_representations): Ignore unnamed
2596 bitfields.
2597
2598 2023-03-13 Jason Merrill <jason@redhat.com>
2599
2600 PR c++/107128
2601 * parser.cc (cp_parser_set_decl_spec_type): Use
2602 redefined_builtin_type for extended_float_type_p.
2603
2604 2023-03-13 Marek Polacek <polacek@redhat.com>
2605
2606 PR c++/107532
2607 * call.cc (reference_like_class_p): Check for std::span.
2608
2609 2023-03-10 Jakub Jelinek <jakub@redhat.com>
2610
2611 PR c++/107558
2612 * decl.cc (cp_finish_decl): Don't clear TREE_READONLY on
2613 automatic non-aggregate variables just because of
2614 -fmerge-all-constants.
2615
2616 2023-03-10 Jakub Jelinek <jakub@redhat.com>
2617
2618 PR c++/109039
2619 * class.cc (end_of_class): For bit-fields, instead of computing
2620 offset as sum of byte_position (field) and DECL_SIZE_UNIT (field),
2621 compute it as sum of bit_position (field) and DECL_SIZE (field)
2622 divided by BITS_PER_UNIT rounded up.
2623
2624 2023-03-10 Jason Merrill <jason@redhat.com>
2625
2626 PR c++/108972
2627 * lambda.cc (compare_lambda_template_head): Check more
2628 for error_mark_node.
2629
2630 2023-03-10 Jason Merrill <jason@redhat.com>
2631
2632 PR c++/108566
2633 * mangle.cc (anon_aggr_naming_decl): New.
2634 (write_unqualified_name): Use it.
2635
2636 2023-03-10 Jakub Jelinek <jakub@redhat.com>
2637
2638 PR c/108079
2639 * decl.cc (poplevel): Suppress OPT_Wunused_variable warning
2640 after diagnosing it.
2641
2642 2023-03-10 Jason Merrill <jason@redhat.com>
2643
2644 PR c++/108099
2645 * decl.cc (grokdeclarator): Handle non-typedef typedef_decl.
2646
2647 2023-03-10 Jason Merrill <jason@redhat.com>
2648
2649 PR c++/108542
2650 * class.cc (instantiate_type): Strip location wrapper.
2651
2652 2023-03-09 Jason Merrill <jason@redhat.com>
2653
2654 PR c++/108773
2655 * init.cc (find_allocator_temps_r): New.
2656 (combine_allocator_temps): Replace find_allocator_temp.
2657 (build_vec_init): Adjust.
2658
2659 2023-03-09 Jason Merrill <jason@redhat.com>
2660
2661 DR 2664
2662 PR c++/102529
2663 * pt.cc (alias_ctad_tweaks): Continue after deduction failure.
2664
2665 2023-03-09 Jason Merrill <jason@redhat.com>
2666 Michael Spertus <mike@spertus.com>
2667
2668 PR c++/105841
2669 * pt.cc (corresponding_template_parameter_list): Split out...
2670 (corresponding_template_parameter): ...from here.
2671 (find_template_parameters): Factor out...
2672 (find_template_parameter_info::find_in): ...this function.
2673 (find_template_parameter_info::find_in_recursive): New.
2674 (find_template_parameter_info::found): New.
2675 (alias_ctad_tweaks): Only add parms used in the deduced args.
2676
2677 2023-03-09 Jason Merrill <jason@redhat.com>
2678
2679 * cp-trait.def (IS_DEDUCIBLE): Add space to name.
2680
2681 2023-03-09 Jason Merrill <jason@redhat.com>
2682
2683 PR c++/105841
2684 * cp-trait.def (IS_DEDUCIBLE): New.
2685 * cxx-pretty-print.cc (pp_cxx_trait): Handle non-type.
2686 * parser.cc (cp_parser_trait): Likewise.
2687 * tree.cc (cp_tree_equal): Likewise.
2688 * pt.cc (tsubst_copy_and_build): Likewise.
2689 (type_targs_deducible_from): New.
2690 (alias_ctad_tweaks): Use it.
2691 * semantics.cc (trait_expr_value): Handle CPTK_IS_DEDUCIBLE.
2692 (finish_trait_expr): Likewise.
2693 * constraint.cc (diagnose_trait_expr): Likewise.
2694 * cp-tree.h (type_targs_deducible_from): Declare.
2695
2696 2023-03-07 Jason Merrill <jason@redhat.com>
2697
2698 PR c++/108526
2699 PR c++/106651
2700 * pt.cc (tsubst_function_decl): Don't replace the closure
2701 parameter if DECL_STATIC_FUNCTION_P.
2702
2703 2023-03-07 Marek Polacek <polacek@redhat.com>
2704
2705 PR c++/107532
2706 * call.cc (reference_like_class_p): New.
2707 (do_warn_dangling_reference): Add new bool parameter. See through
2708 reference_like_class_p.
2709
2710 2023-03-07 Jakub Jelinek <jakub@redhat.com>
2711
2712 PR c++/109042
2713 * rtti.cc (emit_support_tinfo_1): Don't assert that last
2714 unemitted_tinfo_decls element is tinfo, instead pop from it only in
2715 that case.
2716 * decl2.cc (c_parse_final_cleanups): Don't call emit_tinfo_decl
2717 for unemitted_tinfO_decls which have already non-NULL DECL_INITIAL.
2718
2719 2023-03-07 Marek Polacek <polacek@redhat.com>
2720
2721 PR c++/109030
2722 * constexpr.cc (cxx_eval_call_expression): Relax assert.
2723
2724 2023-03-07 Marek Polacek <polacek@redhat.com>
2725
2726 PR c++/107939
2727 * constexpr.cc (potential_constant_expression_1) <case CALL_EXPR>: Pass
2728 'any' when recursing on a VAR_DECL and not a pointer to function.
2729
2730 2023-03-04 Jakub Jelinek <jakub@redhat.com>
2731
2732 PR c++/108702
2733 * constexpr.cc: Include toplev.h.
2734 (cxx_eval_constant_expression) <case DECL_EXPR>: When seeing a local
2735 static initialized by constant expression outside of a constexpr
2736 function which has been deferred by make_rtl_for_nonlocal_decl,
2737 call rest_of_decl_compilation on it.
2738
2739 2023-03-03 Patrick Palka <ppalka@redhat.com>
2740
2741 PR c++/108998
2742 * pt.cc (el_data::skipped_trees): New data member.
2743 (extract_locals_r): Push to skipped_trees any unevaluated
2744 contexts that we skipped over.
2745 (extract_local_specs): For the second walk, start from each
2746 tree in skipped_trees.
2747
2748 2023-03-03 Alexandre Oliva <oliva@adacore.com>
2749
2750 * typeck.cc (cp_build_binary_op): Suppress redundant warning
2751 for pfn null test in pmfn test with vbit-in-delta.
2752
2753 2023-03-02 Jakub Jelinek <jakub@redhat.com>
2754
2755 PR target/108883
2756 * cp-tree.h (enum cp_tree_index): Remove CPTI_FALLBACK_DFLOAT*_TYPE
2757 enumerators.
2758 (fallback_dfloat32_type, fallback_dfloat64_type,
2759 fallback_dfloat128_type): Remove.
2760 * rtti.cc (emit_support_tinfo_1): If not emitted already, call
2761 emit_tinfo_decl and remove from unemitted_tinfo_decls right away.
2762 (emit_support_tinfos): Move &dfloat*_type_node from fundamentals array
2763 into new fundamentals_with_fallback array. Call emit_support_tinfo_1
2764 on elements of that array too, with the difference that if
2765 the type is NULL, use a fallback REAL_TYPE for it temporarily.
2766 Drop the !targetm.decimal_float_supported_p () handling. Call
2767 targetm.emit_support_tinfos at the end.
2768 * mangle.cc (write_builtin_type): Remove references to
2769 fallback_dfloat*_type. Handle bfloat16_type_node mangling.
2770
2771 2023-03-02 Patrick Palka <ppalka@redhat.com>
2772
2773 PR c++/108243
2774 PR c++/97553
2775 * cp-gimplify.cc (cp_fully_fold): Add an internal overload that
2776 additionally takes and propagate an mce_value parameter, and
2777 define the existing public overload in terms of it.
2778 (cp_fully_fold_init): Pass mce_false to cp_fully_fold.
2779
2780 2023-03-02 Patrick Palka <ppalka@redhat.com>
2781
2782 PR c++/108243
2783 * constexpr.cc (maybe_constant_init_1): Override
2784 manifestly_const_eval to true if is_static.
2785
2786 2023-03-02 Jakub Jelinek <jakub@redhat.com>
2787
2788 PR debug/108716
2789 * cp-gimplify.cc (cp_genericize_r) <case USING_STMT>: Set
2790 DECL_SOURCE_LOCATION on IMPORTED_DECL to expression location
2791 of USING_STMT or input_location.
2792
2793 2023-03-02 Marek Polacek <polacek@redhat.com>
2794
2795 PR c++/106259
2796 * parser.cc (class_decl_loc_t::diag_mismatched_tags): If the first
2797 lookup of SPEC didn't find anything, try to look for
2798 most_general_template.
2799
2800 2023-03-02 Jakub Jelinek <jakub@redhat.com>
2801
2802 PR c++/105839
2803 * parser.cc (cp_convert_omp_range_for): Allow in assert
2804 decomp_first_name without DECL_HAS_VALUE_EXPR_P if it has
2805 error_mark_node type.
2806 (cp_finish_omp_range_for): Don't set DECL_HAS_VALUE_EXPR_P back
2807 on decls which have error_mark_node type.
2808
2809 2023-03-01 Marek Polacek <polacek@redhat.com>
2810
2811 PR c++/107574
2812 * constexpr.cc (cxx_eval_constant_expression): Emit an error when
2813 a PTRMEM_CST cannot be evaluated.
2814
2815 2023-03-01 Patrick Palka <ppalka@redhat.com>
2816
2817 * pt.cc (tsubst_scope): Define.
2818 (tsubst_decl) <case USING_DECL>: Call tsubst_scope instead of
2819 calling tsubst_scope with tf_qualifying_scope set.
2820 (tsubst_qualified_id): Call tsubst_scope instead of
2821 calling tsubst with tf_qualifying_scope set.
2822 (tsubst_copy): Immediately delegate to tsubst for all TYPE_P
2823 trees. Remove tf_qualifying_scope manipulation.
2824 <case SCOPE_REF>: Call tsubst_scope instead of calling
2825 tsubst with tf_qualifying_scope set.
2826
2827 2023-03-01 Patrick Palka <ppalka@redhat.com>
2828 Jason Merrill <jason@redhat.com>
2829
2830 PR c++/108219
2831 PR c++/108218
2832 * constexpr.cc (fold_to_constant): Define.
2833 (maybe_constant_value): Move up early exit test for unevaluated
2834 operands. Try reducing an unevaluated operand to a constant via
2835 fold_to_constant.
2836 (fold_non_dependent_expr_template): Add early exit test for
2837 CONSTANT_CLASS_P nodes. Try reducing an unevaluated operand
2838 to a constant via fold_to_constant.
2839 * cp-tree.h (fold_to_constant): Declare.
2840
2841 2023-03-01 Jakub Jelinek <jakub@redhat.com>
2842
2843 PR c++/108606
2844 * constexpr.cc (potential_constant_expression_1) <case DECL_EXPR>:
2845 Only recurse on DECL_INITIAL (tmp) if tmp is a VAR_DECL, otherwise
2846 just return true.
2847
2848 2023-02-28 Patrick Palka <ppalka@redhat.com>
2849
2850 PR c++/108848
2851 * pt.cc (finish_template_variable): Move dependence check
2852 to here from ...
2853 (lookup_and_finish_template_variable): ... here.
2854 * semantics.cc (finish_id_expression_1): Call
2855 finish_template_variable sooner, before (and regardless of) the
2856 type_dependent_expression_p test.
2857
2858 2023-02-28 Marek Polacek <polacek@redhat.com>
2859
2860 PR c++/108550
2861 * pt.cc (lookup_and_finish_template_variable): Clear tf_partial.
2862
2863 2023-02-20 Marek Polacek <polacek@redhat.com>
2864
2865 PR c++/101073
2866 * constexpr.cc (cxx_eval_call_expression): Replace shortcutting trivial
2867 constructor/op= with a checking assert.
2868
2869 2023-02-20 Marek Polacek <polacek@redhat.com>
2870
2871 PR c++/108829
2872 * pt.cc (prepend_one_capture): Set LAMBDA_CAPTURE_EXPLICIT_P.
2873 (tsubst_lambda_expr): Pass LAMBDA_CAPTURE_EXPLICIT_P to
2874 prepend_one_capture.
2875
2876 2023-02-18 Jason Merrill <jason@redhat.com>
2877
2878 DR 2518
2879 PR c++/52809
2880 PR c++/53638
2881 PR c++/87389
2882 PR c++/89741
2883 PR c++/92099
2884 PR c++/104041
2885 PR c++/104691
2886 * semantics.cc (finish_static_assert): Don't diagnose in
2887 template context.
2888
2889 2023-02-17 Patrick Palka <ppalka@redhat.com>
2890
2891 PR c++/108243
2892 PR c++/97553
2893 * cp-gimplify.cc (enum fold_flags): Define.
2894 (fold_flags_t): Declare.
2895 (cp_fold_data::genericize): Replace this data member with ...
2896 (cp_fold_data::fold_flags): ... this.
2897 (cp_fold_r): Adjust use of cp_fold_data and calls to cp_fold.
2898 (cp_fold_function): Likewise.
2899 (cp_fold_maybe_rvalue): Add an internal overload that
2900 additionally takes and propagates a fold_flags_t parameter, and
2901 define the existing public overload in terms of it.
2902 (cp_fold_rvalue): Likewise.
2903 (cp_fully_fold_init): Adjust use of cp_fold_data.
2904 (fold_cache): Replace with ...
2905 (fold_caches): ... this 2-element array of caches.
2906 (get_fold_cache): Define.
2907 (clear_fold_cache): Adjust.
2908 (cp_fold): Add fold_flags_t parameter. Use get_fold_cache.
2909 Pass flags to calls to cp_fold, cp_fold_rvalue and
2910 cp_fold_maybe_rvalue.
2911 <case CALL_EXPR>: If ff_mce_false is set, fold
2912 __builtin_is_constant_evaluated to false and pass mce_false to
2913 maybe_constant_value.
2914
2915 2023-02-17 Patrick Palka <ppalka@redhat.com>
2916
2917 * constexpr.cc (constexpr_call::manifestly_const_eval): Give
2918 it type int instead of bool.
2919 (constexpr_ctx::manifestly_const_eval): Give it type mce_value
2920 instead of bool.
2921 (cxx_eval_builtin_function_call): Adjust after making
2922 manifestly_const_eval tri-state.
2923 (cxx_eval_call_expression): Likewise.
2924 (cxx_eval_binary_expression): Likewise.
2925 (cxx_eval_conditional_expression): Likewise.
2926 (cxx_eval_constant_expression): Likewise.
2927 (cxx_eval_outermost_constant_expr): Likewise.
2928 (cxx_constant_value): Likewise.
2929 (cxx_constant_dtor): Likewise.
2930 (maybe_constant_value): Give manifestly_const_eval parameter
2931 type mce_value instead of bool and adjust accordingly.
2932 (fold_non_dependent_expr_template): Adjust call
2933 to cxx_eval_outermost_constant_expr.
2934 (fold_non_dependent_expr): Likewise.
2935 (maybe_constant_init_1): Likewise.
2936 * constraint.cc (satisfy_atom): Adjust call to
2937 maybe_constant_value.
2938 * cp-tree.h (enum class mce_value): Define.
2939 (maybe_constant_value): Adjust manifestly_const_eval parameter
2940 type and default argument.
2941 * decl.cc (compute_array_index_type_loc): Adjust call to
2942 maybe_constant_value.
2943 * pt.cc (convert_nontype_argument): Likewise.
2944
2945 2023-02-16 Patrick Palka <ppalka@redhat.com>
2946
2947 PR c++/107773
2948 * cp-tree.h (enum tsubst_flags): New flag tf_qualifying_scope.
2949 * decl.cc (make_typename_type): Use lookup_member instead of
2950 lookup_field. If tf_qualifying_scope is set, pass want_type=true
2951 instead of =false to lookup_member. Generalize format specifier
2952 in diagnostic to handle both type and non-type bindings.
2953 * pt.cc (tsubst_aggr_type_1): Clear tf_qualifying_scope. Tidy
2954 the function.
2955 (tsubst_decl) <case USING_DECL>: Set tf_qualifying_scope when
2956 substituting USING_DECL_SCOPE.
2957 (tsubst): Clear tf_qualifying_scope right away and remember if
2958 it was set. Do the same for tf_tst_ok sooner.
2959 <case TYPENAME_TYPE>: Set tf_qualifying_scope when substituting
2960 TYPE_CONTEXT. Pass tf_qualifying_scope to make_typename_type
2961 if it was set.
2962 (tsubst_qualified_id): Set tf_qualifying_scope when substituting
2963 the scope.
2964 (tsubst_copy): Clear tf_qualifying_scope and remember if it was
2965 set.
2966 <case SCOPE_REF>: Set tf_qualifying_scope when substituting the
2967 scope.
2968 <case *_TYPE>: Pass tf_qualifying_scope to tsubst if it was set.
2969 * search.cc (lookup_member): Document default argument.
2970
2971 2023-02-16 Patrick Palka <ppalka@redhat.com>
2972
2973 * cp-tree.h: Mechanically drop static from static inline
2974 functions via s/^static inline/inline/g.
2975
2976 2023-02-15 Marek Polacek <polacek@redhat.com>
2977
2978 PR c++/106675
2979 * call.cc (joust_maybe_elide_copy): Return false for ck_ambig.
2980
2981 2023-02-10 Marek Polacek <polacek@redhat.com>
2982
2983 PR c++/107079
2984 * call.cc (set_up_extended_ref_temp): Pass var to maybe_constant_init.
2985
2986 2023-02-09 Tobias Burnus <tobias@codesourcery.com>
2987
2988 * parser.cc (cp_parser_omp_allocate): Parse align
2989 clause and check for restrictions.
2990
2991 2023-02-09 Jakub Jelinek <jakub@redhat.com>
2992
2993 PR c++/108698
2994 * mangle.cc (write_expression, write_template_arg): Handle
2995 EXCESS_PRECISION_EXPR with REAL_CST operand as
2996 write_template_arg_literal on fold_convert of the REAL_CST
2997 to EXCESS_PRECISION_EXPR type.
2998
2999 2023-02-06 Patrick Palka <ppalka@redhat.com>
3000
3001 PR c++/107461
3002 * cp-tree.h (call_expr_dependent_name): Declare.
3003 * pt.cc (iterative_hash_template_arg) <case CALL_EXPR>: Use
3004 call_expr_dependent_name instead of dependent_name.
3005 * tree.cc (call_expr_dependent_name): Define.
3006 (called_fns_equal): Adjust to take two CALL_EXPRs instead of
3007 CALL_EXPR_FNs thereof. Use call_expr_dependent_name instead
3008 of dependent_name.
3009 (cp_tree_equal) <case CALL_EXPR>: Adjust call to called_fns_equal.
3010
3011 2023-02-03 Marek Polacek <polacek@redhat.com>
3012
3013 PR c++/108158
3014 * constexpr.cc (cxx_eval_array_reference): Don't replace
3015 new_ctx.object.
3016
3017 2023-02-03 Patrick Palka <ppalka@redhat.com>
3018
3019 PR c++/107461
3020 * semantics.cc (finish_call_expr): Strip ADDR_EXPR from
3021 the selected callee during overload set pruning.
3022
3023 2023-02-03 Patrick Palka <ppalka@redhat.com>
3024
3025 PR c++/96745
3026 * class.cc (check_methods): Diagnose an unviable OVERLOAD
3027 set for CLASSTYPE_DESTRUCTOR differently from an ambiguous one.
3028 Then prune the OVERLOAD to a single function.
3029 (check_bases_and_members): Handle CLASSTYPE_DESTRUCTOR being
3030 an OVERLOAD when calling deduce_noexcept_on_destructor.
3031 Document why it has to be called before check_methods.
3032
3033 2023-02-03 Patrick Palka <ppalka@redhat.com>
3034
3035 PR c++/108579
3036 * class.cc (check_methods): Swap order of constraints_satisfied_p
3037 and copy/move_fn_p tests.
3038
3039 2023-02-01 Marek Polacek <polacek@redhat.com>
3040
3041 PR c++/107755
3042 * call.cc (build_new_op): Don't call warn_logical_operator when
3043 processing a template.
3044
3045 2023-02-01 Jakub Jelinek <jakub@redhat.com>
3046
3047 PR c++/108607
3048 * constexpr.cc (cxx_eval_constant_expression): Handle OMP_*
3049 and OACC_* constructs as non-constant.
3050 (potential_constant_expression_1): Handle OMP_SCAN and OMP_SCOPE.
3051
3052 2023-02-01 Jason Merrill <jason@redhat.com>
3053
3054 * class.cc (note_name_declared_in_class): Change from permerror to
3055 -Wchanges-meaning pedwarn, forcing -pedantic-errors for most cases.
3056
3057 2023-01-31 Jason Merrill <jason@redhat.com>
3058
3059 PR c++/108559
3060 * cp-gimplify.cc (any_non_eliding_target_exprs): New.
3061 (cp_genericize_init): Check it.
3062
3063 2023-01-31 Marek Polacek <polacek@redhat.com>
3064
3065 PR c++/107593
3066 PR c++/108597
3067 * cp-tree.h (instantiation_dependent_expression_p): Don't
3068 declare here.
3069
3070 2023-01-26 Marek Polacek <polacek@redhat.com>
3071
3072 PR c++/105300
3073 * parser.cc: Remove unnecessary forward declarations.
3074 (cp_parser_string_literal): New wrapper.
3075 (cp_parser_string_literal_common): Renamed from
3076 cp_parser_string_literal. Add a bool parameter. Give an error when
3077 UDLs are not permitted.
3078 (cp_parser_userdef_string_literal): New wrapper.
3079 (finish_userdef_string_literal): Renamed from
3080 cp_parser_userdef_string_literal.
3081 (cp_parser_primary_expression): Call cp_parser_userdef_string_literal
3082 instead of cp_parser_string_literal.
3083 (cp_parser_linkage_specification): Move a variable declaration closer
3084 to its first use.
3085 (cp_parser_static_assert): Likewise.
3086 (cp_parser_operator): Call cp_parser_userdef_string_literal instead of
3087 cp_parser_string_literal.
3088 (cp_parser_asm_definition): Move a variable declaration closer to its
3089 first use.
3090 (cp_parser_asm_specification_opt): Move variable declarations closer to
3091 their first use.
3092 (cp_parser_asm_operand_list): Likewise.
3093 (cp_parser_asm_clobber_list): Likewise.
3094
3095 2023-01-26 Jakub Jelinek <jakub@redhat.com>
3096
3097 PR c++/108503
3098 * parser.cc (cp_convert_omp_range_for): If cp_finish_decomp has been
3099 called in !processing_template_decl with processing_template_decl
3100 temporarily set, clear DECL_HAS_VALUE_EXPR_P on the vars temporarily.
3101 (cp_finish_omp_range_for): And set it back again here.
3102
3103 2023-01-25 Jakub Jelinek <jakub@redhat.com>
3104
3105 PR c++/108525
3106 * mangle.cc (write_closure_type_name): Don't assume all
3107 lambda operator() fns are methods.
3108
3109 2023-01-24 Jason Merrill <jason@redhat.com>
3110
3111 PR c++/108504
3112 * parser.cc (cp_lexer_new_main): Pass C_LEX_STRING_NO_JOIN for first
3113 token, too.
3114
3115 2023-01-24 Jason Merrill <jason@redhat.com>
3116
3117 PR c++/108526
3118 * pt.cc (tsubst_function_decl): Handle static lambda.
3119
3120 2023-01-24 Jakub Jelinek <jakub@redhat.com>
3121
3122 PR c++/108474
3123 * cp-gimplify.cc (cp_fold_r): Revert 2023-01-19 changes.
3124
3125 2023-01-24 Jason Merrill <jason@redhat.com>
3126
3127 PR c++/107303
3128 PR c++/107329
3129 * cp-gimplify.cc (cp_fold_r) [TARGET_EXPR]: In case of double
3130 TARGET_EXPR, keep the outer one instead of the inner one.
3131 (maybe_replace_decl): New.
3132
3133 2023-01-23 Jason Merrill <jason@redhat.com>
3134
3135 PR c++/107267
3136 * cp-gimplify.cc (cp_gimplify_init_expr): Allow unexpected elision
3137 of trivial types.
3138
3139 2023-01-23 Marek Polacek <polacek@redhat.com>
3140
3141 PR c++/107797
3142 * cvt.cc (ocp_convert): copy_warning when creating a new
3143 COMPOUND_EXPR.
3144 * init.cc (build_new_1): Suppress -Wunused-value on
3145 compiler-generated COMPOUND_EXPRs.
3146
3147 2023-01-23 Jason Merrill <jason@redhat.com>
3148
3149 PR c++/108195
3150 * call.cc (build_user_type_conversion_1): Check whether the
3151 iterators also find a list ctor.
3152
3153 2023-01-23 Jason Merrill <jason@redhat.com>
3154
3155 PR c++/108496
3156 * decl.cc (grokdeclarator): Check whether DECL_RESULT is already
3157 set.
3158
3159 2023-01-23 Jason Merrill <jason@redhat.com>
3160
3161 PR c++/53288
3162 DR 1299
3163 * call.cc (extend_ref_init_temps_1): Handle ptrmem expression.
3164
3165 2023-01-19 Jakub Jelinek <jakub@redhat.com>
3166
3167 PR c++/108437
3168 * cp-tree.h (keep_unused_object_arg): Declare.
3169 * call.cc (keep_unused_object_arg): No longer static.
3170 * tree.cc (build_min_non_dep_op_overload): Handle ARRAY_REF
3171 with overload being static member function.
3172
3173 2023-01-19 Jakub Jelinek <jakub@redhat.com>
3174
3175 PR c++/53932
3176 * cp-gimplify.cc (cp_fold_r): During cp_fully_fold_init replace
3177 DECL_ANON_UNION_VAR_P VAR_DECLs with their corresponding
3178 DECL_VALUE_EXPR.
3179
3180 2023-01-16 Jakub Jelinek <jakub@redhat.com>
3181
3182 PR c++/105593
3183 * decl.cc (cp_finish_decl): Check warning_enabled_at
3184 at the DECL_SOURCE_LOCATION (decl) for OPT_Winit_self instead
3185 of warn_init_self.
3186
3187 2023-01-14 Jakub Jelinek <jakub@redhat.com>
3188
3189 PR c++/108365
3190 * typeck.cc (cp_build_binary_op): Use may_shorten_divmod for integral
3191 division or modulo.
3192
3193 2023-01-13 Jakub Jelinek <jakub@redhat.com>
3194
3195 PR c++/108285
3196 * cvt.cc (cp_convert_and_check): For EXCESS_PRECISION_EXPR
3197 use its operand except that for warning purposes use the original
3198 EXCESS_PRECISION_EXPR.
3199 * call.cc (convert_like_internal): Only look through
3200 EXCESS_PRECISION_EXPR when calling cp_convert, not when calling
3201 cp_convert_and_check.
3202
3203 2023-01-09 Jakub Jelinek <jakub@redhat.com>
3204
3205 PR c++/105838
3206 PR c++/108047
3207 PR c++/108266
3208 * call.cc (maybe_init_list_as_range): Always return NULL_TREE if
3209 processing_template_decl.
3210
3211 2023-01-05 Patrick Palka <ppalka@redhat.com>
3212
3213 PR c++/108275
3214 * parser.cc (cp_parser_class_head): Use dk_deferred instead of
3215 dk_no_check when parsing the class name.
3216
3217 2023-01-05 Jakub Jelinek <jakub@redhat.com>
3218
3219 PR c++/108286
3220 * semantics.cc (finish_omp_target_clauses): Ignore clauses other than
3221 OMP_CLAUSE_MAP.
3222
3223 2023-01-04 Patrick Palka <ppalka@redhat.com>
3224
3225 PR c++/108282
3226 * decl2.cc (mark_single_function): Ignore mark_used failure
3227 only in a non-SFINAE context rather than in a SFINAE one.
3228
3229 2023-01-04 Jakub Jelinek <jakub@redhat.com>
3230
3231 PR c++/108206
3232 * decl.cc (merge_default_template_args): Return false if either
3233 new_parm or old_parm are erroneous.
3234
3235 \f
3236 Copyright (C) 2023 Free Software Foundation, Inc.
3237
3238 Copying and distribution of this file, with or without modification,
3239 are permitted in any medium without royalty provided the copyright
3240 notice and this notice are preserved.