]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/cp/ChangeLog
c++: NTTP constraint depending on outer parms [PR109160]
[thirdparty/gcc.git] / gcc / cp / ChangeLog
CommitLineData
d20a6a33
GA
12023-03-30 Jason Merrill <jason@redhat.com>
2
3 PR c++/105452
4 * search.cc (type_context_for_name_lookup): New.
5 (accessible_p): Handle anonymous union.
6 * init.cc (maybe_instantiate_nsdmi_init): Use
7 type_context_for_name_lookup.
8 * parser.cc (cp_parser_class_specifier): Likewise.
9 * cp-tree.h (type_context_for_name_lookup): Declare.
10
112023-03-30 Jason Merrill <jason@redhat.com>
12
13 PR c++/105221
14 * pt.cc (unify) [FUNCTION_TYPE]: Handle function pointer
15 conversions.
16
172023-03-30 Jakub Jelinek <jakub@redhat.com>
18
19 PR c++/109319
20 * decl2.cc (grok_array_decl): After emitting a pedwarn for
21 -Wcomma-subscript, if processing_template_decl set orig_index_exp
22 to compound expr from orig_index_exp_list.
23
242023-03-30 Jason Merrill <jason@redhat.com>
25
26 PR c++/107897
27 PR c++/108887
28 * decl2.cc (record_mangling): Use symtab_node::reset.
29
302023-03-30 Jakub Jelinek <jakub@redhat.com>
31
32 PR c++/109278
33 * call.cc (convert_like_internal): If pedwarn for extended float
34 type conversions doesn't report anything, avoid calling
35 maybe_inform_about_fndecl_for_bogus_argument_init.
36
00908886
GA
372023-03-29 Jason Merrill <jason@redhat.com>
38
39 PR c++/109321
40 PR c++/109320
41 * pt.cc (alias_ctad_tweaks): Rewrite deduced args.
42 (type_targs_deducible_from): Handle null pack deduction.
43
579cdc1e
GA
442023-03-28 David Malcolm <dmalcolm@redhat.com>
45
46 PR c/107002
47 * parser.cc (cp_parser_binary_expression): Update for new param of
48 check_for_xor_used_as_pow.
49
502023-03-28 Jakub Jelinek <jakub@redhat.com>
51
52 PR c++/109309
53 * contracts.cc: Include intl.h.
54 (check_postcondition_result): Don't form diagnostics from two halves
55 of an English message to allow translations.
56
13ec81eb
GA
572023-03-24 Patrick Palka <ppalka@redhat.com>
58
59 PR c++/106969
60 * parser.cc (cp_parser_class_specifier): Clear current_class_ptr
61 and current_class_ref sooner, before parsing a class definition.
62
632023-03-24 Jason Merrill <jason@redhat.com>
64
65 PR c++/105481
66 * pt.cc (type_unification_real): Adjust for partial ordering.
67
ec92be4a
GA
682023-03-23 Jason Merrill <jason@redhat.com>
69
70 PR c++/105996
71 * typeck.cc (build_ptrmemfunc): Drop 0-offset optimization
72 and location wrappers.
73
742023-03-23 Marek Polacek <polacek@redhat.com>
75
76 PR c++/107532
77 * call.cc (class_has_reference_member_p): New.
78 (class_has_reference_member_p_r): New.
79 (reference_like_class_p): Don't look for a specific constructor.
80 Use a DFS walk with class_has_reference_member_p_r.
81
822023-03-23 Jason Merrill <jason@redhat.com>
83
84 PR c++/109241
85 * pt.cc (find_parameter_packs_r): Handle null TREE_BINFO.
86
50bd9c41
GA
872023-03-22 Jason Merrill <jason@redhat.com>
88
89 PR c++/108390
90 * pt.cc (unify): Use fold of build_nop instead of fold_convert.
91
922023-03-22 Jason Merrill <jason@redhat.com>
93
94 PR c++/108795
95 * semantics.cc (finish_id_expression_1): Check scope before
96 returning id_expression.
97
982023-03-22 Alex Coplan <alex.coplan@arm.com>
99
100 PR c++/109177
101 * call.cc (build_over_call): Use make_temp_override to suppress
102 both unavailable and deprecated warnings when calling
103 build_addr_func.
104
03178527
GA
1052023-03-21 Jason Merrill <jason@redhat.com>
106
107 PR c++/106890
108 * init.cc (maybe_instantiate_nsdmi_init): Don't leave
109 current_function_decl set to a constructor.
110
582f246b
GA
1112023-03-20 Marek Polacek <polacek@redhat.com>
112
113 PR c++/109159
114 * call.cc (add_template_candidate_real): Add explicit decls to the
115 set of candidates when the initializer is a braced-init-list.
116
1172023-03-20 Jakub Jelinek <jakub@redhat.com>
118
119 PR c++/109164
120 * cp-tree.h (var_needs_tls_wrapper): Declare.
121 * decl2.cc (var_needs_tls_wrapper): No longer static.
122 * decl.cc (cp_finish_decl): Clear TREE_READONLY on TLS variables
123 for which a TLS wrapper will be needed.
124
454a4d50
GA
1252023-03-17 Jason Merrill <jason@redhat.com>
126
127 PR c++/108975
128 * lambda.cc (prune_lambda_captures): Don't bother in a template.
129
1302023-03-17 Jason Merrill <jason@redhat.com>
131
132 PR c++/109172
133 * except.cc (build_throw): Check dtor access.
134
1352023-03-17 Jason Merrill <jason@redhat.com>
136
137 PR c++/69410
138 * friend.cc (do_friend): Handle namespace as scope argument.
139 * decl.cc (grokdeclarator): Pass down in_namespace.
140
5c389a5c
GA
1412023-03-16 Jason Merrill <jason@redhat.com>
142
143 PR c++/105809
144 * init.cc (get_nsdmi): Split out...
145 (maybe_instantiate_nsdmi_init): ...this function.
146 * cp-tree.h: Declare it.
147 * pt.cc (tsubst_expr): Use it.
148
1492023-03-16 Jason Merrill <jason@redhat.com>
150
151 PR c++/108242
152 * pt.cc (tsubst_expr) [TAG_DEFN]: Handle partial instantiation.
153
1542023-03-16 Jason Merrill <jason@redhat.com>
155
156 PR c++/101869
157 * semantics.cc (finish_qualified_id_expr): Don't try to build a
158 pointer-to-member if the scope is an enumeration.
159
1602023-03-16 Patrick Palka <ppalka@redhat.com>
161
162 PR c++/109030
163 * constexpr.cc (maybe_constant_init_1): For an unevaluated
164 non-manifestly-constant operand, don't constant evaluate
165 and instead call fold_to_constant as in maybe_constant_value.
166
1672023-03-16 Patrick Palka <ppalka@redhat.com>
168
169 PR c++/100288
170 * constraint.cc (satisfaction_cache::get): Relax overly strict
171 checking assert in the constraint recursion case.
172
1732023-03-16 Jason Merrill <jason@redhat.com>
174
175 PR c++/105406
176 * coroutines.cc (build_co_await): Handle lvalue 'o'.
177
39b1814c
GA
1782023-03-15 Jason Merrill <jason@redhat.com>
179
180 PR c++/103871
181 PR c++/98056
182 * typeck.cc (cp_build_modify_expr): Allow array initialization of
183 DECL_ARTIFICIAL variable.
184
1852023-03-15 Marek Polacek <polacek@redhat.com>
186
187 PR c++/107280
188 * constexpr.cc (cxx_eval_store_expression): Strip location wrappers.
189
1902023-03-15 Jason Merrill <jason@redhat.com>
191
192 PR c++/58538
193 * semantics.cc (check_template_template_default_arg): Check
194 maybe_get_template_decl_from_type_decl.
195
1962023-03-15 Jason Merrill <jason@redhat.com>
197
198 PR c++/108179
199 PR c++/104107
200 PR c++/95036
201 * pt.cc (coerce_template_template_parms): Use args from
202 DECL_CONTEXT (arg_tmpl) instead of outer_args.
203
2042023-03-15 Jason Merrill <jason@redhat.com>
205
206 PR c++/108179
207 * pt.cc (coerce_template_template_parms): Take the arg and parm
208 templates directly.
209 (coerce_template_template_parm): Adjust.
210 (template_template_parm_bindings_ok_p): Adjust.
211 (convert_template_argument): Adjust.
212
fd42a8fa
GA
2132023-03-14 Patrick Palka <ppalka@redhat.com>
214
215 PR c++/96830
216 * pt.cc (push_inline_template_parms_recursive): Set
217 TEMPLATE_PARMS_CONSTRAINTS.
218 (push_template_decl): For an out-of-line declaration, verify
219 constraints for each enclosing template scope match those of the
220 original template declaratation.
221
2222023-03-14 Patrick Palka <ppalka@redhat.com>
223
224 PR c++/96830
225 * pt.cc (redeclare_class_template): Add missing "of" in
226 constraint mismatch diagnostic.
227 (tsubst_friend_class): For an already declared class template,
228 substitute and pass the friend declaration's constraints to
229 redeclare_class_template instead of passing the existing
230 template's constraints.
231
2322023-03-14 Jason Merrill <jason@redhat.com>
233
234 PR c++/108468
235 * pt.cc (unify_pack_expansion): Check that TPARMS_PRIMARY_TEMPLATE
236 is non-null.
237
2382023-03-14 Jason Merrill <jason@redhat.com>
239
240 PR c++/107310
241 * cp-gimplify.cc (genericize_if_stmt): Restore folding
242 of constant conditions.
243
2442023-03-14 Jakub Jelinek <jakub@redhat.com>
245
246 PR c++/109096
247 * tree.cc (record_has_unique_obj_representations): Ignore unnamed
248 bitfields.
249
a9835599
GA
2502023-03-13 Jason Merrill <jason@redhat.com>
251
252 PR c++/107128
253 * parser.cc (cp_parser_set_decl_spec_type): Use
254 redefined_builtin_type for extended_float_type_p.
255
2562023-03-13 Marek Polacek <polacek@redhat.com>
257
258 PR c++/107532
259 * call.cc (reference_like_class_p): Check for std::span.
260
c8065441
GA
2612023-03-10 Jakub Jelinek <jakub@redhat.com>
262
263 PR c++/107558
264 * decl.cc (cp_finish_decl): Don't clear TREE_READONLY on
265 automatic non-aggregate variables just because of
266 -fmerge-all-constants.
267
2682023-03-10 Jakub Jelinek <jakub@redhat.com>
269
270 PR c++/109039
271 * class.cc (end_of_class): For bit-fields, instead of computing
272 offset as sum of byte_position (field) and DECL_SIZE_UNIT (field),
273 compute it as sum of bit_position (field) and DECL_SIZE (field)
274 divided by BITS_PER_UNIT rounded up.
275
2762023-03-10 Jason Merrill <jason@redhat.com>
277
278 PR c++/108972
279 * lambda.cc (compare_lambda_template_head): Check more
280 for error_mark_node.
281
2822023-03-10 Jason Merrill <jason@redhat.com>
283
284 PR c++/108566
285 * mangle.cc (anon_aggr_naming_decl): New.
286 (write_unqualified_name): Use it.
287
2882023-03-10 Jakub Jelinek <jakub@redhat.com>
289
290 PR c/108079
291 * decl.cc (poplevel): Suppress OPT_Wunused_variable warning
292 after diagnosing it.
293
2942023-03-10 Jason Merrill <jason@redhat.com>
295
296 PR c++/108099
297 * decl.cc (grokdeclarator): Handle non-typedef typedef_decl.
298
2992023-03-10 Jason Merrill <jason@redhat.com>
300
301 PR c++/108542
302 * class.cc (instantiate_type): Strip location wrapper.
303
da2b9c6e
GA
3042023-03-09 Jason Merrill <jason@redhat.com>
305
306 PR c++/108773
307 * init.cc (find_allocator_temps_r): New.
308 (combine_allocator_temps): Replace find_allocator_temp.
309 (build_vec_init): Adjust.
310
3112023-03-09 Jason Merrill <jason@redhat.com>
312
313 DR 2664
314 PR c++/102529
315 * pt.cc (alias_ctad_tweaks): Continue after deduction failure.
316
3172023-03-09 Jason Merrill <jason@redhat.com>
318 Michael Spertus <mike@spertus.com>
319
320 PR c++/105841
321 * pt.cc (corresponding_template_parameter_list): Split out...
322 (corresponding_template_parameter): ...from here.
323 (find_template_parameters): Factor out...
324 (find_template_parameter_info::find_in): ...this function.
325 (find_template_parameter_info::find_in_recursive): New.
326 (find_template_parameter_info::found): New.
327 (alias_ctad_tweaks): Only add parms used in the deduced args.
328
3292023-03-09 Jason Merrill <jason@redhat.com>
330
331 * cp-trait.def (IS_DEDUCIBLE): Add space to name.
332
3332023-03-09 Jason Merrill <jason@redhat.com>
334
335 PR c++/105841
336 * cp-trait.def (IS_DEDUCIBLE): New.
337 * cxx-pretty-print.cc (pp_cxx_trait): Handle non-type.
338 * parser.cc (cp_parser_trait): Likewise.
339 * tree.cc (cp_tree_equal): Likewise.
340 * pt.cc (tsubst_copy_and_build): Likewise.
341 (type_targs_deducible_from): New.
342 (alias_ctad_tweaks): Use it.
343 * semantics.cc (trait_expr_value): Handle CPTK_IS_DEDUCIBLE.
344 (finish_trait_expr): Likewise.
345 * constraint.cc (diagnose_trait_expr): Likewise.
346 * cp-tree.h (type_targs_deducible_from): Declare.
347
af320a16
GA
3482023-03-07 Jason Merrill <jason@redhat.com>
349
350 PR c++/108526
351 PR c++/106651
352 * pt.cc (tsubst_function_decl): Don't replace the closure
353 parameter if DECL_STATIC_FUNCTION_P.
354
3552023-03-07 Marek Polacek <polacek@redhat.com>
356
357 PR c++/107532
358 * call.cc (reference_like_class_p): New.
359 (do_warn_dangling_reference): Add new bool parameter. See through
360 reference_like_class_p.
361
3622023-03-07 Jakub Jelinek <jakub@redhat.com>
363
364 PR c++/109042
365 * rtti.cc (emit_support_tinfo_1): Don't assert that last
366 unemitted_tinfo_decls element is tinfo, instead pop from it only in
367 that case.
368 * decl2.cc (c_parse_final_cleanups): Don't call emit_tinfo_decl
369 for unemitted_tinfO_decls which have already non-NULL DECL_INITIAL.
370
3712023-03-07 Marek Polacek <polacek@redhat.com>
372
373 PR c++/109030
374 * constexpr.cc (cxx_eval_call_expression): Relax assert.
375
3762023-03-07 Marek Polacek <polacek@redhat.com>
377
378 PR c++/107939
379 * constexpr.cc (potential_constant_expression_1) <case CALL_EXPR>: Pass
380 'any' when recursing on a VAR_DECL and not a pointer to function.
381
2858bf16
GA
3822023-03-04 Jakub Jelinek <jakub@redhat.com>
383
384 PR c++/108702
385 * constexpr.cc: Include toplev.h.
386 (cxx_eval_constant_expression) <case DECL_EXPR>: When seeing a local
387 static initialized by constant expression outside of a constexpr
388 function which has been deferred by make_rtl_for_nonlocal_decl,
389 call rest_of_decl_compilation on it.
390
2aa6673e
GA
3912023-03-03 Patrick Palka <ppalka@redhat.com>
392
393 PR c++/108998
394 * pt.cc (el_data::skipped_trees): New data member.
395 (extract_locals_r): Push to skipped_trees any unevaluated
396 contexts that we skipped over.
397 (extract_local_specs): For the second walk, start from each
398 tree in skipped_trees.
399
4002023-03-03 Alexandre Oliva <oliva@adacore.com>
401
402 * typeck.cc (cp_build_binary_op): Suppress redundant warning
403 for pfn null test in pmfn test with vbit-in-delta.
404
14db9ed5
GA
4052023-03-02 Jakub Jelinek <jakub@redhat.com>
406
407 PR target/108883
408 * cp-tree.h (enum cp_tree_index): Remove CPTI_FALLBACK_DFLOAT*_TYPE
409 enumerators.
410 (fallback_dfloat32_type, fallback_dfloat64_type,
411 fallback_dfloat128_type): Remove.
412 * rtti.cc (emit_support_tinfo_1): If not emitted already, call
413 emit_tinfo_decl and remove from unemitted_tinfo_decls right away.
414 (emit_support_tinfos): Move &dfloat*_type_node from fundamentals array
415 into new fundamentals_with_fallback array. Call emit_support_tinfo_1
416 on elements of that array too, with the difference that if
417 the type is NULL, use a fallback REAL_TYPE for it temporarily.
418 Drop the !targetm.decimal_float_supported_p () handling. Call
419 targetm.emit_support_tinfos at the end.
420 * mangle.cc (write_builtin_type): Remove references to
421 fallback_dfloat*_type. Handle bfloat16_type_node mangling.
422
4232023-03-02 Patrick Palka <ppalka@redhat.com>
424
425 PR c++/108243
426 PR c++/97553
427 * cp-gimplify.cc (cp_fully_fold): Add an internal overload that
428 additionally takes and propagate an mce_value parameter, and
429 define the existing public overload in terms of it.
430 (cp_fully_fold_init): Pass mce_false to cp_fully_fold.
431
4322023-03-02 Patrick Palka <ppalka@redhat.com>
433
434 PR c++/108243
435 * constexpr.cc (maybe_constant_init_1): Override
436 manifestly_const_eval to true if is_static.
437
4382023-03-02 Jakub Jelinek <jakub@redhat.com>
439
440 PR debug/108716
441 * cp-gimplify.cc (cp_genericize_r) <case USING_STMT>: Set
442 DECL_SOURCE_LOCATION on IMPORTED_DECL to expression location
443 of USING_STMT or input_location.
444
4452023-03-02 Marek Polacek <polacek@redhat.com>
446
447 PR c++/106259
448 * parser.cc (class_decl_loc_t::diag_mismatched_tags): If the first
449 lookup of SPEC didn't find anything, try to look for
450 most_general_template.
451
4522023-03-02 Jakub Jelinek <jakub@redhat.com>
453
454 PR c++/105839
455 * parser.cc (cp_convert_omp_range_for): Allow in assert
456 decomp_first_name without DECL_HAS_VALUE_EXPR_P if it has
457 error_mark_node type.
458 (cp_finish_omp_range_for): Don't set DECL_HAS_VALUE_EXPR_P back
459 on decls which have error_mark_node type.
460
c88a7c63
GA
4612023-03-01 Marek Polacek <polacek@redhat.com>
462
463 PR c++/107574
464 * constexpr.cc (cxx_eval_constant_expression): Emit an error when
465 a PTRMEM_CST cannot be evaluated.
466
4672023-03-01 Patrick Palka <ppalka@redhat.com>
468
469 * pt.cc (tsubst_scope): Define.
470 (tsubst_decl) <case USING_DECL>: Call tsubst_scope instead of
471 calling tsubst_scope with tf_qualifying_scope set.
472 (tsubst_qualified_id): Call tsubst_scope instead of
473 calling tsubst with tf_qualifying_scope set.
474 (tsubst_copy): Immediately delegate to tsubst for all TYPE_P
475 trees. Remove tf_qualifying_scope manipulation.
476 <case SCOPE_REF>: Call tsubst_scope instead of calling
477 tsubst with tf_qualifying_scope set.
478
4792023-03-01 Patrick Palka <ppalka@redhat.com>
480 Jason Merrill <jason@redhat.com>
481
482 PR c++/108219
483 PR c++/108218
484 * constexpr.cc (fold_to_constant): Define.
485 (maybe_constant_value): Move up early exit test for unevaluated
486 operands. Try reducing an unevaluated operand to a constant via
487 fold_to_constant.
488 (fold_non_dependent_expr_template): Add early exit test for
489 CONSTANT_CLASS_P nodes. Try reducing an unevaluated operand
490 to a constant via fold_to_constant.
491 * cp-tree.h (fold_to_constant): Declare.
492
4932023-03-01 Jakub Jelinek <jakub@redhat.com>
494
495 PR c++/108606
496 * constexpr.cc (potential_constant_expression_1) <case DECL_EXPR>:
497 Only recurse on DECL_INITIAL (tmp) if tmp is a VAR_DECL, otherwise
498 just return true.
499
6f9e2f14
GA
5002023-02-28 Patrick Palka <ppalka@redhat.com>
501
502 PR c++/108848
503 * pt.cc (finish_template_variable): Move dependence check
504 to here from ...
505 (lookup_and_finish_template_variable): ... here.
506 * semantics.cc (finish_id_expression_1): Call
507 finish_template_variable sooner, before (and regardless of) the
508 type_dependent_expression_p test.
509
5102023-02-28 Marek Polacek <polacek@redhat.com>
511
512 PR c++/108550
513 * pt.cc (lookup_and_finish_template_variable): Clear tf_partial.
514
65c64105
GA
5152023-02-20 Marek Polacek <polacek@redhat.com>
516
517 PR c++/101073
518 * constexpr.cc (cxx_eval_call_expression): Replace shortcutting trivial
519 constructor/op= with a checking assert.
520
5212023-02-20 Marek Polacek <polacek@redhat.com>
522
523 PR c++/108829
524 * pt.cc (prepend_one_capture): Set LAMBDA_CAPTURE_EXPLICIT_P.
525 (tsubst_lambda_expr): Pass LAMBDA_CAPTURE_EXPLICIT_P to
526 prepend_one_capture.
527
0263e9d5
GA
5282023-02-18 Jason Merrill <jason@redhat.com>
529
530 DR 2518
531 PR c++/52809
532 PR c++/53638
533 PR c++/87389
534 PR c++/89741
535 PR c++/92099
536 PR c++/104041
537 PR c++/104691
538 * semantics.cc (finish_static_assert): Don't diagnose in
539 template context.
540
7814ce44
GA
5412023-02-17 Patrick Palka <ppalka@redhat.com>
542
543 PR c++/108243
544 PR c++/97553
545 * cp-gimplify.cc (enum fold_flags): Define.
546 (fold_flags_t): Declare.
547 (cp_fold_data::genericize): Replace this data member with ...
548 (cp_fold_data::fold_flags): ... this.
549 (cp_fold_r): Adjust use of cp_fold_data and calls to cp_fold.
550 (cp_fold_function): Likewise.
551 (cp_fold_maybe_rvalue): Add an internal overload that
552 additionally takes and propagates a fold_flags_t parameter, and
553 define the existing public overload in terms of it.
554 (cp_fold_rvalue): Likewise.
555 (cp_fully_fold_init): Adjust use of cp_fold_data.
556 (fold_cache): Replace with ...
557 (fold_caches): ... this 2-element array of caches.
558 (get_fold_cache): Define.
559 (clear_fold_cache): Adjust.
560 (cp_fold): Add fold_flags_t parameter. Use get_fold_cache.
561 Pass flags to calls to cp_fold, cp_fold_rvalue and
562 cp_fold_maybe_rvalue.
563 <case CALL_EXPR>: If ff_mce_false is set, fold
564 __builtin_is_constant_evaluated to false and pass mce_false to
565 maybe_constant_value.
566
5672023-02-17 Patrick Palka <ppalka@redhat.com>
568
569 * constexpr.cc (constexpr_call::manifestly_const_eval): Give
570 it type int instead of bool.
571 (constexpr_ctx::manifestly_const_eval): Give it type mce_value
572 instead of bool.
573 (cxx_eval_builtin_function_call): Adjust after making
574 manifestly_const_eval tri-state.
575 (cxx_eval_call_expression): Likewise.
576 (cxx_eval_binary_expression): Likewise.
577 (cxx_eval_conditional_expression): Likewise.
578 (cxx_eval_constant_expression): Likewise.
579 (cxx_eval_outermost_constant_expr): Likewise.
580 (cxx_constant_value): Likewise.
581 (cxx_constant_dtor): Likewise.
582 (maybe_constant_value): Give manifestly_const_eval parameter
583 type mce_value instead of bool and adjust accordingly.
584 (fold_non_dependent_expr_template): Adjust call
585 to cxx_eval_outermost_constant_expr.
586 (fold_non_dependent_expr): Likewise.
587 (maybe_constant_init_1): Likewise.
588 * constraint.cc (satisfy_atom): Adjust call to
589 maybe_constant_value.
590 * cp-tree.h (enum class mce_value): Define.
591 (maybe_constant_value): Adjust manifestly_const_eval parameter
592 type and default argument.
593 * decl.cc (compute_array_index_type_loc): Adjust call to
594 maybe_constant_value.
595 * pt.cc (convert_nontype_argument): Likewise.
596
88cc4495
GA
5972023-02-16 Patrick Palka <ppalka@redhat.com>
598
599 PR c++/107773
600 * cp-tree.h (enum tsubst_flags): New flag tf_qualifying_scope.
601 * decl.cc (make_typename_type): Use lookup_member instead of
602 lookup_field. If tf_qualifying_scope is set, pass want_type=true
603 instead of =false to lookup_member. Generalize format specifier
604 in diagnostic to handle both type and non-type bindings.
605 * pt.cc (tsubst_aggr_type_1): Clear tf_qualifying_scope. Tidy
606 the function.
607 (tsubst_decl) <case USING_DECL>: Set tf_qualifying_scope when
608 substituting USING_DECL_SCOPE.
609 (tsubst): Clear tf_qualifying_scope right away and remember if
610 it was set. Do the same for tf_tst_ok sooner.
611 <case TYPENAME_TYPE>: Set tf_qualifying_scope when substituting
612 TYPE_CONTEXT. Pass tf_qualifying_scope to make_typename_type
613 if it was set.
614 (tsubst_qualified_id): Set tf_qualifying_scope when substituting
615 the scope.
616 (tsubst_copy): Clear tf_qualifying_scope and remember if it was
617 set.
618 <case SCOPE_REF>: Set tf_qualifying_scope when substituting the
619 scope.
620 <case *_TYPE>: Pass tf_qualifying_scope to tsubst if it was set.
621 * search.cc (lookup_member): Document default argument.
622
6232023-02-16 Patrick Palka <ppalka@redhat.com>
624
625 * cp-tree.h: Mechanically drop static from static inline
626 functions via s/^static inline/inline/g.
627
05467d08
GA
6282023-02-15 Marek Polacek <polacek@redhat.com>
629
630 PR c++/106675
631 * call.cc (joust_maybe_elide_copy): Return false for ck_ambig.
632
e92e2c96
GA
6332023-02-10 Marek Polacek <polacek@redhat.com>
634
635 PR c++/107079
636 * call.cc (set_up_extended_ref_temp): Pass var to maybe_constant_init.
637
6382023-02-09 Tobias Burnus <tobias@codesourcery.com>
639
640 * parser.cc (cp_parser_omp_allocate): Parse align
641 clause and check for restrictions.
642
6432023-02-09 Jakub Jelinek <jakub@redhat.com>
644
645 PR c++/108698
646 * mangle.cc (write_expression, write_template_arg): Handle
647 EXCESS_PRECISION_EXPR with REAL_CST operand as
648 write_template_arg_literal on fold_convert of the REAL_CST
649 to EXCESS_PRECISION_EXPR type.
650
f0e73dd0
GA
6512023-02-06 Patrick Palka <ppalka@redhat.com>
652
653 PR c++/107461
654 * cp-tree.h (call_expr_dependent_name): Declare.
655 * pt.cc (iterative_hash_template_arg) <case CALL_EXPR>: Use
656 call_expr_dependent_name instead of dependent_name.
657 * tree.cc (call_expr_dependent_name): Define.
658 (called_fns_equal): Adjust to take two CALL_EXPRs instead of
659 CALL_EXPR_FNs thereof. Use call_expr_dependent_name instead
660 of dependent_name.
661 (cp_tree_equal) <case CALL_EXPR>: Adjust call to called_fns_equal.
662
49e52115
GA
6632023-02-03 Marek Polacek <polacek@redhat.com>
664
665 PR c++/108158
666 * constexpr.cc (cxx_eval_array_reference): Don't replace
667 new_ctx.object.
668
6692023-02-03 Patrick Palka <ppalka@redhat.com>
670
671 PR c++/107461
672 * semantics.cc (finish_call_expr): Strip ADDR_EXPR from
673 the selected callee during overload set pruning.
674
6752023-02-03 Patrick Palka <ppalka@redhat.com>
676
677 PR c++/96745
678 * class.cc (check_methods): Diagnose an unviable OVERLOAD
679 set for CLASSTYPE_DESTRUCTOR differently from an ambiguous one.
680 Then prune the OVERLOAD to a single function.
681 (check_bases_and_members): Handle CLASSTYPE_DESTRUCTOR being
682 an OVERLOAD when calling deduce_noexcept_on_destructor.
683 Document why it has to be called before check_methods.
684
6852023-02-03 Patrick Palka <ppalka@redhat.com>
686
687 PR c++/108579
688 * class.cc (check_methods): Swap order of constraints_satisfied_p
689 and copy/move_fn_p tests.
690
0a251e74
GA
6912023-02-01 Marek Polacek <polacek@redhat.com>
692
693 PR c++/107755
694 * call.cc (build_new_op): Don't call warn_logical_operator when
695 processing a template.
696
6972023-02-01 Jakub Jelinek <jakub@redhat.com>
698
699 PR c++/108607
700 * constexpr.cc (cxx_eval_constant_expression): Handle OMP_*
701 and OACC_* constructs as non-constant.
702 (potential_constant_expression_1): Handle OMP_SCAN and OMP_SCOPE.
703
7042023-02-01 Jason Merrill <jason@redhat.com>
705
706 * class.cc (note_name_declared_in_class): Change from permerror to
707 -Wchanges-meaning pedwarn, forcing -pedantic-errors for most cases.
708
317525b0
GA
7092023-01-31 Jason Merrill <jason@redhat.com>
710
711 PR c++/108559
712 * cp-gimplify.cc (any_non_eliding_target_exprs): New.
713 (cp_genericize_init): Check it.
714
7152023-01-31 Marek Polacek <polacek@redhat.com>
716
717 PR c++/107593
718 PR c++/108597
719 * cp-tree.h (instantiation_dependent_expression_p): Don't
720 declare here.
721
2371d100
GA
7222023-01-26 Marek Polacek <polacek@redhat.com>
723
724 PR c++/105300
725 * parser.cc: Remove unnecessary forward declarations.
726 (cp_parser_string_literal): New wrapper.
727 (cp_parser_string_literal_common): Renamed from
728 cp_parser_string_literal. Add a bool parameter. Give an error when
729 UDLs are not permitted.
730 (cp_parser_userdef_string_literal): New wrapper.
731 (finish_userdef_string_literal): Renamed from
732 cp_parser_userdef_string_literal.
733 (cp_parser_primary_expression): Call cp_parser_userdef_string_literal
734 instead of cp_parser_string_literal.
735 (cp_parser_linkage_specification): Move a variable declaration closer
736 to its first use.
737 (cp_parser_static_assert): Likewise.
738 (cp_parser_operator): Call cp_parser_userdef_string_literal instead of
739 cp_parser_string_literal.
740 (cp_parser_asm_definition): Move a variable declaration closer to its
741 first use.
742 (cp_parser_asm_specification_opt): Move variable declarations closer to
743 their first use.
744 (cp_parser_asm_operand_list): Likewise.
745 (cp_parser_asm_clobber_list): Likewise.
746
7472023-01-26 Jakub Jelinek <jakub@redhat.com>
748
749 PR c++/108503
750 * parser.cc (cp_convert_omp_range_for): If cp_finish_decomp has been
751 called in !processing_template_decl with processing_template_decl
752 temporarily set, clear DECL_HAS_VALUE_EXPR_P on the vars temporarily.
753 (cp_finish_omp_range_for): And set it back again here.
754
9bb6515b
GA
7552023-01-25 Jakub Jelinek <jakub@redhat.com>
756
757 PR c++/108525
758 * mangle.cc (write_closure_type_name): Don't assume all
759 lambda operator() fns are methods.
760
0fa22168
GA
7612023-01-24 Jason Merrill <jason@redhat.com>
762
763 PR c++/108504
764 * parser.cc (cp_lexer_new_main): Pass C_LEX_STRING_NO_JOIN for first
765 token, too.
766
7672023-01-24 Jason Merrill <jason@redhat.com>
768
769 PR c++/108526
770 * pt.cc (tsubst_function_decl): Handle static lambda.
771
7722023-01-24 Jakub Jelinek <jakub@redhat.com>
773
774 PR c++/108474
775 * cp-gimplify.cc (cp_fold_r): Revert 2023-01-19 changes.
776
7772023-01-24 Jason Merrill <jason@redhat.com>
778
779 PR c++/107303
780 PR c++/107329
781 * cp-gimplify.cc (cp_fold_r) [TARGET_EXPR]: In case of double
782 TARGET_EXPR, keep the outer one instead of the inner one.
783 (maybe_replace_decl): New.
784
607f278a
GA
7852023-01-23 Jason Merrill <jason@redhat.com>
786
787 PR c++/107267
788 * cp-gimplify.cc (cp_gimplify_init_expr): Allow unexpected elision
789 of trivial types.
790
7912023-01-23 Marek Polacek <polacek@redhat.com>
792
793 PR c++/107797
794 * cvt.cc (ocp_convert): copy_warning when creating a new
795 COMPOUND_EXPR.
796 * init.cc (build_new_1): Suppress -Wunused-value on
797 compiler-generated COMPOUND_EXPRs.
798
7992023-01-23 Jason Merrill <jason@redhat.com>
800
801 PR c++/108195
802 * call.cc (build_user_type_conversion_1): Check whether the
803 iterators also find a list ctor.
804
8052023-01-23 Jason Merrill <jason@redhat.com>
806
807 PR c++/108496
808 * decl.cc (grokdeclarator): Check whether DECL_RESULT is already
809 set.
810
8112023-01-23 Jason Merrill <jason@redhat.com>
812
813 PR c++/53288
814 DR 1299
815 * call.cc (extend_ref_init_temps_1): Handle ptrmem expression.
816
0846336d
GA
8172023-01-19 Jakub Jelinek <jakub@redhat.com>
818
819 PR c++/108437
820 * cp-tree.h (keep_unused_object_arg): Declare.
821 * call.cc (keep_unused_object_arg): No longer static.
822 * tree.cc (build_min_non_dep_op_overload): Handle ARRAY_REF
823 with overload being static member function.
824
8252023-01-19 Jakub Jelinek <jakub@redhat.com>
826
827 PR c++/53932
828 * cp-gimplify.cc (cp_fold_r): During cp_fully_fold_init replace
829 DECL_ANON_UNION_VAR_P VAR_DECLs with their corresponding
830 DECL_VALUE_EXPR.
831
f457a62e
GA
8322023-01-16 Jakub Jelinek <jakub@redhat.com>
833
834 PR c++/105593
835 * decl.cc (cp_finish_decl): Check warning_enabled_at
836 at the DECL_SOURCE_LOCATION (decl) for OPT_Winit_self instead
837 of warn_init_self.
838
5013c3bb
GA
8392023-01-14 Jakub Jelinek <jakub@redhat.com>
840
841 PR c++/108365
842 * typeck.cc (cp_build_binary_op): Use may_shorten_divmod for integral
843 division or modulo.
844
8452023-01-13 Jakub Jelinek <jakub@redhat.com>
846
847 PR c++/108285
848 * cvt.cc (cp_convert_and_check): For EXCESS_PRECISION_EXPR
849 use its operand except that for warning purposes use the original
850 EXCESS_PRECISION_EXPR.
851 * call.cc (convert_like_internal): Only look through
852 EXCESS_PRECISION_EXPR when calling cp_convert, not when calling
853 cp_convert_and_check.
854
84723aca
GA
8552023-01-09 Jakub Jelinek <jakub@redhat.com>
856
857 PR c++/105838
858 PR c++/108047
859 PR c++/108266
860 * call.cc (maybe_init_list_as_range): Always return NULL_TREE if
861 processing_template_decl.
862
53ef7c1d
GA
8632023-01-05 Patrick Palka <ppalka@redhat.com>
864
865 PR c++/108275
866 * parser.cc (cp_parser_class_head): Use dk_deferred instead of
867 dk_no_check when parsing the class name.
868
8692023-01-05 Jakub Jelinek <jakub@redhat.com>
870
871 PR c++/108286
872 * semantics.cc (finish_omp_target_clauses): Ignore clauses other than
873 OMP_CLAUSE_MAP.
874
faccda27
GA
8752023-01-04 Patrick Palka <ppalka@redhat.com>
876
877 PR c++/108282
878 * decl2.cc (mark_single_function): Ignore mark_used failure
879 only in a non-SFINAE context rather than in a SFINAE one.
880
8812023-01-04 Jakub Jelinek <jakub@redhat.com>
882
883 PR c++/108206
884 * decl.cc (merge_default_template_args): Return false if either
885 new_parm or old_parm are erroneous.
886
ad41bd84 887\f
d64f8779 888Copyright (C) 2023 Free Software Foundation, Inc.
ad41bd84
JM
889
890Copying and distribution of this file, with or without modification,
891are permitted in any medium without royalty provided the copyright
892notice and this notice are preserved.