]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/cp/ChangeLog
PR c++/84964: Middle-end patch to expand_call for ICE after sorry.
[thirdparty/gcc.git] / gcc / cp / ChangeLog
CommitLineData
8cc4f9cd
GA
12022-03-09 Patrick Palka <ppalka@redhat.com>
2
3 PR c++/104823
4 * except.cc (build_noexcept_spec): Strengthen dependence check
5 to instantiation_dependent_expression_p.
6 * parser.cc (cp_parser_parenthesized_expression_list_elt):
7 Remove fold_expr_p parameter, and don't call
8 instantiate_non_dependent_expr.
9 (cp_parser_parenthesized_expression_list): Adjust accordingly.
10 * pt.cc (expand_integer_pack): Strengthen dependence check
11 to instantiation_dependent_expression_p.
12 (instantiate_non_dependent_expr_internal): Adjust comment.
13 (instantiate_non_dependent_expr_sfinae): Likewise. Drop
14 the potentially-constant check, and relax and turn the
15 dependence check into a checking assert.
16 (instantiate_non_dependent_or_null): Adjust comment.
17 * semantics.cc (finish_decltype_type): Keep
18 processing_template_decl cleared after calling
19 instantiate_non_dependent_expr_sfinae.
20
212022-03-09 Patrick Palka <ppalka@redhat.com>
22
23 PR c++/102137
24 PR c++/87820
25 * cp-tree.h (is_copy_initialization): Declare.
26 * decl.cc (cp_finish_decl): Set LOOKUP_ONLYCONVERTING
27 when is_copy_initialization is true.
28 * init.cc (build_aggr_init): Split out copy-initialization
29 check into ...
30 (is_copy_initialization): ... here.
31 * pt.cc (instantiate_decl): Pass 0 instead of
32 LOOKUP_ONLYCONVERTING as flags to cp_finish_decl.
33
342022-03-09 Patrick Palka <ppalka@redhat.com>
35
36 PR c++/65396
37 * cp-tree.h (merge_default_template_args): Declare.
38 * decl.cc (merge_default_template_args): Define, factored out
39 from redeclare_class_template.
40 (duplicate_decls): Use it when merging member function template
41 and free function declarations.
42 * pt.cc (redeclare_class_template): Factor out default argument
43 merging logic into merge_default_template_args. Improve location
44 of a note when there's a template parameter kind mismatch.
45
462022-03-09 Jakub Jelinek <jakub@redhat.com>
47
48 PR c/104711
49 * constexpr.cc (cxx_eval_check_shift_p): Use TYPE_OVERFLOW_WRAPS
50 instead of TYPE_UNSIGNED.
51 * typeck.cc (cp_build_binary_op): Don't emit
52 -Wshift-negative-value warning if TYPE_OVERFLOW_WRAPS.
53
8d038a84
GA
542022-03-08 Roger Sayle <roger@nextmovesoftware.com>
55
56 PR c++/96440
57 * decl.cc (start_decl): Defend against prefix_attributes being
58 error_mark_node.
59
602022-03-08 Roger Sayle <roger@nextmovesoftware.com>
61
62 PR c++/96437
63 * parser.cc (synthesize_implicit_template_parm): Check that
64 TREE_VALUE (new_parm) isn't error_mark_node before setting its
65 DECL_VIRTUAL_P.
66
672022-03-08 Roger Sayle <roger@nextmovesoftware.com>
68
69 PR c++/96329
70 * parser.cc (cp_parser_linkage_specification): Treat the case where
71 linkage is error_mark_node as "invalid linkage-specification".
72
732022-03-08 Marek Polacek <polacek@redhat.com>
74
75 PR c++/104108
76 * pt.cc (convert_nontype_argument): Recompute
77 value_dependent_expression_p after build_converted_constant_expr.
78
792022-03-08 Marek Polacek <polacek@redhat.com>
80
81 * decl2.cc (is_late_template_attribute): Do not defer attribute
82 unavailable.
83 * pt.cc (tsubst_enum): Set TREE_UNAVAILABLE.
84
852022-03-08 Jakub Jelinek <jakub@redhat.com>
86
87 PR c++/104806
88 * search.cc (lookup_field_fuzzy_info::fuzzy_lookup_field): Ignore
89 identifiers with space at the end.
90
e6533e2e
GA
912022-03-07 Jason Merrill <jason@redhat.com>
92
93 PR c++/104618
94 * decl2.cc (mark_single_function): Look through parens and location
95 wrapper.
96 * typeck.cc (cp_build_addr_expr_1): Not here.
97
982022-03-07 Jakub Jelinek <jakub@redhat.com>
99
100 * parser.cc (cp_parser_omp_clause_map): Add missing space in string
101 literal.
102
1032022-03-07 Jakub Jelinek <jakub@redhat.com>
104
105 * cvt.cc: Fix up duplicated word issue in a comment.
106 * pt.cc: Likewise.
107 * module.cc: Likewise.
108 * coroutines.cc: Likewise.
109
8d96e14c
GA
1102022-03-04 Nathan Sidwell <nathan@acm.org>
111
112 * mangle.cc (is_std_substitution): Check global module.
113 (is_std_substitution_char): Return bool.
114
1152022-03-04 Nathan Sidwell <nathan@acm.org>
116
117 * cp-tree.h (mangle_identifier): Replace with ...
118 (mangle_module_component): ... this.
119 * mangle.cc (dump_substitution_candidates): Adjust.
120 (add_substitution): Likewise.
121 (find_substitution): Likewise.
122 (unmangled_name_p): Likewise.
123 (mangle_module_substitution): Reimplement.
124 (mangle_module_component): New.
125 (write_module, maybe_write_module): Adjust.
126 (write_name): Drop modules here.
127 (write_unqualified): Do them here instead.
128 (mangle_global_init): Adjust.
129 * module.cc (module_state::mangle): Adjust.
130 (mangle_module): Likewise.
131 (get_originating_module): Adjust.
132
a35f1697
GA
1332022-02-28 Marek Polacek <polacek@redhat.com>
134
135 PR c++/104682
136 * cp-tree.h (build_enumerator): Adjust.
137 * decl.cc (finish_enum): Make it return the new decl.
138 * pt.cc (tsubst_enum): Propagate TREE_DEPRECATED and TREE_UNAVAILABLE.
139
1402022-02-28 Marek Polacek <polacek@redhat.com>
141
142 PR c++/104667
143 * decl2.cc (is_late_template_attribute): Cope with a decl without
144 a type.
145
88c1b038
GA
1462022-02-27 Jason Merrill <jason@redhat.com>
147
148 PR c++/104618
149 * typeck.cc (cp_build_addr_expr_1): Also
150 maybe_undo_parenthesized_ref.
151
756a6185
GA
1522022-02-24 Martin Liska <mliska@suse.cz>
153
154 * pt.cc (defarg_insts_for): Use braces for subobject.
155
5a9ba3f2
GA
1562022-02-18 Patrick Palka <ppalka@redhat.com>
157
158 PR c++/94944
159 * pt.cc (maybe_instantiate_noexcept): For non-static member
160 functions, set current_class_ptr/ref to the specialized 'this'
161 instead.
162
0bdb0498
GA
1632022-02-17 Jason Merrill <jason@redhat.com>
164
165 PR c++/104539
166 * pt.cc (mark_decl_instantiated): Don't clear DECL_COMDAT.
167
1682022-02-17 Jason Merrill <jason@redhat.com>
169
170 PR c++/90451
171 * decl2.cc (mark_single_function): New.
172 * cp-tree.h: Declare it.
173 * typeck.cc (cp_build_addr_expr_1): mark_used when making a PMF.
174 * semantics.cc (finish_qualified_id_expr): Not here.
175 (finish_id_expression_1): Or here.
176 (finish_decltype_type): Call mark_single_function.
177 * cvt.cc (convert_to_void): And here.
178 * pt.cc (convert_nontype_argument): And here.
179 * init.cc (build_offset_ref): Adjust assert.
180
1812022-02-17 Patrick Palka <ppalka@redhat.com>
182
183 PR c++/104565
184 * semantics.cc (finish_compound_literal): Don't perform
185 non-dependent expr folding before calling check_narrowing.
186
cb3afcd2
GA
1872022-02-16 Patrick Palka <ppalka@redhat.com>
188
189 PR c++/104507
190 * constexpr.cc (potential_constant_expression_1)
191 <case NON_DEPENDENT_EXPR>: Return false instead of recursing.
192 Assert tf_error isn't set.
193
875e493b
GA
1942022-02-15 Jason Merrill <jason@redhat.com>
195
196 PR c++/104107
197 PR c++/95036
198 * pt.cc (coerce_template_template_parms): Take full parms.
199 Avoid adding too much of outer_args.
200 (coerce_template_template_parm): Adjust.
201 (template_template_parm_bindings_ok_p): Adjust.
202 (convert_template_argument): Adjust.
203
1f8a09d2
GA
2042022-02-14 Jakub Jelinek <jakub@redhat.com>
205
206 PR c++/104513
207 * constexpr.cc (potential_constant_expression_1) <case GOTO_EXPR>:
208 Don't punt if returns (target).
209
e8d68f0a
GA
2102022-02-11 Jakub Jelinek <jakub@redhat.com>
211
212 PR c++/104472
213 * constexpr.cc (cxx_eval_internal_function) <case IFN_VEC_CONVERT>:
214 Only return fold_const_call result if it is non-NULL. Otherwise
215 fall through into the default: case to return t, set *non_constant_p
216 and emit diagnostics if needed.
217
a645583d
GA
2182022-02-10 Jason Merrill <jason@redhat.com>
219
220 * module.cc (depset::hash::add_specializations): Use
221 STRIP_TEMPLATE.
222
2232022-02-10 Tobias Burnus <tobias@codesourcery.com>
224
225 PR c++/102204
226 * decl2.cc (cp_omp_mappable_type_1): Remove check for virtual
227 members as those are permitted since OpenMP 5.0.
228
2292022-02-10 Patrick Palka <ppalka@redhat.com>
230
231 * pt.cc (filter_memfn_lookup): Handle dependent USING_DECL
232 better.
233
2342022-02-10 Marcel Vollweiler <marcel@codesourcery.com>
235
236 * parser.cc (cp_parser_omp_clause_name): Parse 'has_device_addr' clause.
237 (cp_parser_omp_var_list_no_open): Handle array sections.
238 (cp_parser_omp_all_clauses): Added PRAGMA_OMP_CLAUSE_HAS_DEVICE_ADDR
239 case.
240 (cp_parser_omp_target_update): Added HAS_DEVICE_ADDR to OMP_CLAUSE_MASK.
241 * semantics.cc (handle_omp_array_sections): Handle clause restrictions.
242 (finish_omp_clauses): Handle array sections.
243
3adf509f
GA
2442022-02-09 Patrick Palka <ppalka@redhat.com>
245
246 PR c++/104432
247 * call.cc (build_new_method_call): When a non-dependent call
248 resolves to a specialization of a member template, always build
249 the pruned overload set using the member template, not the
250 specialization.
251 * pt.cc (filter_memfn_lookup): New parameter newtype. Simplify
252 and correct how members from the new lookup set are matched to
253 those from the old one.
254 (tsubst_baselink): Pass binfo_type as newtype to
255 filter_memfn_lookup.
256
2572022-02-09 Jason Merrill <jason@redhat.com>
258
259 PR c++/103752
260 * module.cc (trees_out::core_vals): Stream explicit specifier.
261 (trees_in::core_vals): Likewise.
262 * pt.cc (store_explicit_specifier): No longer static.
263 (tsubst_function_decl): Clear DECL_HAS_DEPENDENT_EXPLICIT_SPEC_P.
264 * cp-tree.h (lookup_explicit_specifier): Declare.
265
2662022-02-09 Jason Merrill <jason@redhat.com>
267
268 PR c++/96876
269 * typeck2.cc (split_nonconstant_init_1): Push cleanups for
270 preceding members with constant initialization.
271 (maybe_push_temp_cleanup): Do nothing if -fno-exceptions.
272
2a2fda2d
GA
2732022-02-08 Jakub Jelinek <jakub@redhat.com>
274
275 PR c++/104379
276 * name-lookup.cc (check_local_shadow): When diagnosing shadowing
277 of a member or global declaration, add warning suppression for
278 the decl and don't warn again on it.
279
2802022-02-08 Jakub Jelinek <jakub@redhat.com>
281
282 PR c++/104403
283 * constexpr.cc (cxx_eval_constant_expression): Don't assert DECL_EXPRs
284 of TREE_STATIC vars may only appear in -std=c++23.
285
2862022-02-08 Patrick Palka <ppalka@redhat.com>
287
288 PR c++/80951
289 * pt.cc (uses_deducible_template_parms): Consider the
290 noexcept-spec of a function type.
291
2922022-02-08 Patrick Palka <ppalka@redhat.com>
293
294 PR c++/104410
295 * constraint.cc (satisfaction_value): Relax assert to accept
296 cv-qualified bool.
297
2982022-02-08 Patrick Palka <ppalka@redhat.com>
299
300 PR c++/103706
301 * pt.cc (preserve_args): New function.
302 (tsubst_lambda_expr): Use it when setting LAMBDA_EXPR_REGEN_INFO.
303
3042022-02-08 Patrick Palka <ppalka@redhat.com>
305
306 PR c++/103706
307 * constraint.cc (satisfy_declaration_constraints): Use
308 lambda_regenerating_args instead.
309 * cp-tree.h (lambda_regenerating_args): Declare.
310 * pt.cc (lambda_regenerating_args): Define, split out from
311 satisfy_declaration_constraints.
312 (do_auto_deduction): Use lambda_regenerating_args to obtain the
313 full set of outer template arguments for satisfaction when
314 inside a lambda.
315
353f8fcc
GA
3162022-02-06 Patrick Palka <ppalka@redhat.com>
317
318 PR c++/96242
319 * decl2.cc (mark_used): Directly synthesize a DECL_MAYBE_DELETED
320 fn by calling maybe_synthesize_method instead of relying on
321 maybe_instantiate_noexcept. Move call to m_i_n after the
322 DECL_DELETED_FN handling.
323 * pt.cc (maybe_instantiate_noexcept): Restrict DECL_MAYBE_DELETED
324 fn synthesis to only those with an implicit noexcept-spec, and
325 return !DECL_DELETED_FN instead of !DECL_MAYBE_DELETED afterwards.
326
3272022-02-06 Jakub Jelinek <jakub@redhat.com>
328
329 PR c++/89074
330 PR c++/104033
331 * constexpr.cc (cxx_eval_binary_expression): Temporarily set
332 folding_cxx_constexpr.
333
661109b0
GA
3342022-02-05 Jason Merrill <jason@redhat.com>
335
336 PR c++/104300
337 PR c++/92385
338 * cp-tree.h (get_vec_init_expr): New.
339 (target_expr_needs_replace): New.
340 * cp-gimplify.cc (cp_gimplify_init_expr): Use it.
341 (struct cp_fold_data): New.
342 (cp_fold_r): Only genericize inits at end of fn.
343 (cp_fold_function): Here.
344 (cp_fully_fold_init): Not here.
345 * init.cc (build_vec_init): Use get_vec_init_expr.
346 * tree.cc (build_vec_init_expr): Likewise.
347 * typeck2.cc (split_nonconstant_init_1): Likewise.
348 (process_init_constructor): Wrap VEC_INIT_EXPR in
349 TARGET_EXPR.
350
3512022-02-05 Jason Merrill <jason@redhat.com>
352
353 * pt.cc (iterative_hash_template_arg): Add comment.
354
682ede39
GA
3552022-02-03 Patrick Palka <ppalka@redhat.com>
356
357 PR c++/104079
358 * pt.cc (value_dependent_noexcept_spec_p): New predicate split
359 out from ...
360 (dependent_type_p_r): ... here.
361 (instantiation_dependent_r): Use value_dependent_noexcept_spec_p
362 to consider dependence of a noexcept-spec before C++17.
363 * tree.cc (fixup_deferred_exception_variants): Clear
364 TYPE_DEPENDENT_P_VALID.
365
3662022-02-03 Jason Merrill <jason@redhat.com>
367
368 PR c++/104302
369 * decl.cc (maybe_deduce_size_from_array_init): Give up
370 on type-dependent init.
371 (cp_complete_array_type): Only call reshape_init for character
372 array.
373
ae7e4af9
GA
3742022-02-01 Jason Merrill <jason@redhat.com>
375
376 PR c++/103186
377 * pt.cc (defarg_inst): Use tree_vec_map_cache_hasher.
378 (defarg_insts_for): New.
379 (tsubst_default_argument): Adjust.
380
1bb52662
GA
3812022-01-31 Marek Polacek <polacek@redhat.com>
382
383 PR c++/102414
384 PR c++/101874
385 * decl.cc (create_array_type_for_decl): Use template_placeholder_p.
386 Sorry on a variable-length array of auto.
387
3882022-01-31 Marek Polacek <polacek@redhat.com>
389
390 PR c++/102434
391 * class.cc (finish_struct): Don't allow union initializer_list.
392
3932022-01-31 Patrick Palka <ppalka@redhat.com>
394
395 PR c++/104294
396 * pt.cc (ctor_deduction_guides_for): Correct computation of
397 outer_args.
398
3992022-01-31 Patrick Palka <ppalka@redhat.com>
400
401 PR c++/104291
402 * pt.cc (for_each_template_parm_r) <case CONSTRUCTOR>: Clear
403 walk_subtrees if !include_nondeduced_p. Simplify given that
404 cp_walk_subtrees already walks TYPE_PTRMEMFUNC_FN_TYPE_RAW.
405
f6f2d6cf
GA
4062022-01-28 Patrick Palka <ppalka@redhat.com>
407 Jason Merrill <jason@redhat.com>
408
409 PR c++/92752
410 * typeck.cc (build_ptrmemfunc): Cast a nullptr constant to the
411 unqualified pointer type not the qualified one.
412
4132022-01-28 Patrick Palka <ppalka@redhat.com>
414
415 PR c++/103341
416 * decl.cc (cp_finish_decl): Pass the template arguments of a
417 variable template specialization or a templated static data
418 member to do_auto_deduction when the auto is constrained.
419
4202022-01-28 Jason Merrill <jason@redhat.com>
421
422 PR c++/100198
423 PR c++/100030
424 PR c++/100282
425 * parser.cc (cp_parser_enumerator_definition): Sorry on parameter
426 pack in lambda.
427 (cp_parser_class_head): And in class attributes.
428 * pt.cc (check_for_bare_parameter_packs): Sorry instead of error
429 in lambda.
430
99f17e99
GA
4312022-01-27 Jason Merrill <jason@redhat.com>
432
433 PR c++/104245
434 PR c++/51344
435 * decl2.cc (save_template_attributes): Take late attrs as parm.
436 (cplus_decl_attributes): Call it after decl_attributes,
437 splice_template_attributes before.
438
4392022-01-27 Patrick Palka <ppalka@redhat.com>
440
441 PR c++/99895
442 * call.cc (build_over_call): For a non-dependent member call,
443 build up a CALL_EXPR using a COMPONENT_REF callee, as in
444 build_new_method_call.
445 * pt.cc (build_non_dependent_expr): Don't wrap PARM_DECL either.
446 * tree.cc (build_min_non_dep_op_overload): Adjust accordingly
447 after the build_over_call change.
448
4492022-01-27 Patrick Palka <ppalka@redhat.com>
450
451 PR c++/92944
452 PR c++/103678
453 * parser.cc (cp_parser_class_head): Update 'type' with the result
454 of maybe_process_partial_specialization in the
455 nested_name_specifier branch. Refactor nearby code to accomodate
456 that maybe_process_partial_specialization returns a _TYPE, not a
457 TYPE_DECL, and eliminate local variable 'class_type' in passing.
458
4592022-01-27 Marek Polacek <polacek@redhat.com>
460
461 PR c++/101988
462 * decl.cc (create_array_type_for_decl): Reject forming an array of
463 placeholder for a deduced class type.
464
eaa59070
GA
4652022-01-26 Jason Merrill <jason@redhat.com>
466
467 PR c++/104206
468 PR c++/101072
469 * semantics.cc (finish_compound_literal): Restore VECTOR_TYPE check.
470
4712022-01-26 Jakub Jelinek <jakub@redhat.com>
472
473 PR c++/104226
474 * constexpr.cc (init_subob_ctx): For vector ctors containing
475 vector elements, ensure appending to the same ctor instead of
476 creating another one.
477
4782022-01-26 Marek Polacek <polacek@redhat.com>
479
480 PR target/104213
481 * decl.cc (finish_constructor_body): Suppress -Wuse-after-free.
482 (finish_destructor_body): Likewise.
483 * optimize.cc (build_delete_destructor_body): Likewise.
484
4852022-01-26 Jason Merrill <jason@redhat.com>
486
487 PR c++/104235
488 * parser.cc (cp_parser_template_name): Repeat lookup of USING_DECL.
489
4902022-01-26 Jason Merrill <jason@redhat.com>
491
492 PR c++/103057
493 * pt.cc (tsubst_aggr_type): Call tsubst for alias template
494 specialization.
495
e0b8716f
GA
4962022-01-25 Patrick Palka <ppalka@redhat.com>
497
498 PR c++/101532
499 PR c++/104225
500 * decl2.cc (mark_used): Don't consider maybe_instantiate_noexcept
501 on a deleted function.
502
5032022-01-25 Jason Merrill <jason@redhat.com>
504
505 PR c++/59950
506 * call.cc (build_over_call): Use cp_build_indirect_ref.
507
bb99171b
GA
5082022-01-24 Patrick Palka <ppalka@redhat.com>
509
510 PR c++/104197
511 * pt.cc (make_auto_1): Use -1 as a placeholder default argument
512 for level.
513
5142022-01-24 Patrick Palka <ppalka@redhat.com>
515
516 PR c++/104173
517 * typeck.cc (build_class_member_access_expr): Extend
518 unary_complex_lvalue result adjustment to preserve all
519 rvalues, not just xvalues.
520
0c940703
GA
5212022-01-23 Will Wray <wjwray@gmail.com>
522
523 PR c++/55227
524 * decl.cc (reshape_init_r): Only call has_designator_check when
525 first_initializer_p or for the inner constructor element.
526 (cp_complete_array_type): Call reshape_init on braced-init-list.
527
5282022-01-23 Jason Merrill <jason@redhat.com>
529
530 PR c++/104182
531 * cp-gimplify.cc (cp_genericize_target_expr): Make sure nothing
532 has set DECL_INITIAL on a TARGET_EXPR slot.
533 * tree.cc (is_local_temp): Don't check DECL_CONTEXT.
534
5352022-01-23 Jason Merrill <jason@redhat.com>
536
537 PR c++/101072
538 * cp-tree.h (build_implicit_conv_flags): Declare.
539 * call.cc (build_implicit_conv_flags): Split out from...
540 (perform_implicit_conversion_flags): ...here.
541 * decl.cc (check_initializer): Use it.
542 * pt.cc (tsubst_copy_and_build): Remove TARGET_EXPR handling.
543 * semantics.cc (finish_compound_literal): Don't treat
544 scalar values like CONSTRUCTORs.
545
9dd44357
GA
5462022-01-21 Jason Merrill <jason@redhat.com>
547
548 * semantics.cc (find_failing_clause): Return expr if not
549 decomposable.
550 (finish_static_assert): Show constant values in failing
551 comparison.
552
5532022-01-21 Jason Merrill <jason@redhat.com>
554
555 PR c++/104084
556 PR c++/20040
557 * init.cc (build_new_1): Only pull out TARGET_EXPR_INITIAL if
558 alloc_expr is a TARGET_EXPR.
559
5602022-01-21 Marek Polacek <polacek@redhat.com>
561
562 PR c++/101715
563 * tree.cc (fixup_deferred_exception_variants): Remove duplicate
564 variants after parsing the exception specifications.
565
5662022-01-21 Jason Merrill <jason@redhat.com>
567
568 PR c++/104139
569 PR c++/103681
570 * class.cc (end_of_class): Use base_binfo.
571
5fa55d55
GA
5722022-01-20 Jason Merrill <jason@redhat.com>
573
574 PR c++/101405
575 * decl.cc (reshape_init_class): Reject designator for a member of
576 another class.
577
5782022-01-20 Patrick Palka <ppalka@redhat.com>
579
580 PR c++/91911
581 PR c++/103672
582 * pt.cc (keep_template_parm): Punt on a level 0 template parm.
583 (tsubst_decl) <case VAR_DECL>: Remove !CHECKING_P safeguard.
584 (tsubst) <case TEMPLATE_TYPE_PARM>: Handle CTAD placeholders
585 specially.
586 (make_auto_1): Add defaulted 'level' parameter.
587 (make_template_placeholder): Pass 0 as 'level' to make_auto_1.
588
5892022-01-20 Patrick Palka <ppalka@redhat.com>
590
591 * decl.cc (grokdeclarator): Diagnose a CTAD placeholder as
592 function return type even when !funcdecl_p.
593
5942022-01-20 Martin Liska <mliska@suse.cz>
595
596 PR c++/104134
597 * error.cc (dump_aggr_type): Partially disable the warning.
598
5992022-01-20 Jason Merrill <jason@redhat.com>
600
601 PR c++/102300
602 * parser.cc (cp_parser_template_name): Use dependent_scope_p.
603
fe1ad141
GA
6042022-01-19 David Malcolm <dmalcolm@redhat.com>
605
606 * cp-lang.cc (selftest::run_cp_tests): Update calls for .c to .cc
607 renaming.
608 * cp-tree.h (cp_pt_c_tests): Rename to...
609 (cp_pt_cc_tests): ...this.
610 (cp_tree_c_tests): Rename to...
611 (cp_tree_cc_tests): ...this.
612 * pt.cc (cp_pt_c_tests): Rename to...
613 (cp_pt_cc_tests): ...this.
614 * tree.cc (cp_tree_c_tests): Rename to...
615 (cp_tree_cc_tests): ...this.
616
6172022-01-19 Jason Merrill <jason@redhat.com>
618
619 * parser.cc (saved_token_sentinel::rollback): Use
620 cp_lexer_previous_token.
621
7a761ae6
GA
6222022-01-18 Jakub Jelinek <jakub@redhat.com>
623
624 PR c++/104055
625 * constexpr.cc (cxx_eval_outermost_constant_expr): If t is a
626 TARGET_EXPR with TARGET_EXPR_CLEANUP, use get_target_expr rather
627 than get_target_expr_sfinae with tf_no_cleanup, and don't set
628 TREE_CONSTANT.
629
6302022-01-18 Jason Merrill <jason@redhat.com>
631 Jakub Jelinek <jakub@redhat.com>
632
633 PR c++/104025
634 * parser.cc (saved_token_sentinel::rollback): Call
635 cp_lexer_set_source_position.
636 (~saved_token_sentinel): Call rollback.
637
6382022-01-18 Patrick Palka <ppalka@redhat.com>
639
640 PR c++/104074
641 * pt.cc (invalid_nontype_parm_type_p): Use WILDCARD_TYPE_P so
642 that we return false for DEPENDENT_OPERATOR_TYPE too.
643
fc829782
GA
6442022-01-17 Martin Liska <mliska@suse.cz>
645
646 * Make-lang.in: Rename .c names to .cc.
647 * config-lang.in: Likewise.
648 * constexpr.cc (cxx_eval_constant_expression): Likewise.
649 * coroutines.cc (morph_fn_to_coro): Likewise.
650 * cp-gimplify.cc (cp_gimplify_expr): Likewise.
651 * cp-lang.cc (struct lang_hooks): Likewise.
652 (get_template_argument_pack_elems_folded): Likewise.
653 * cp-objcp-common.cc (cp_tree_size): Likewise.
654 (cp_unit_size_without_reusable_padding): Likewise.
655 (pop_file_scope): Likewise.
656 (cp_pushdecl): Likewise.
657 * cp-objcp-common.h (GCC_CP_OBJCP_COMMON): Likewise.
658 (cxx_simulate_record_decl): Likewise.
659 * cp-tree.h (struct named_label_entry): Likewise.
660 (current_function_return_value): Likewise.
661 (more_aggr_init_expr_args_p): Likewise.
662 (get_function_version_dispatcher): Likewise.
663 (common_enclosing_class): Likewise.
664 (strip_fnptr_conv): Likewise.
665 (current_decl_namespace): Likewise.
666 (do_aggregate_paren_init): Likewise.
667 (cp_check_const_attributes): Likewise.
668 (qualified_name_lookup_error): Likewise.
669 (generic_targs_for): Likewise.
670 (mark_exp_read): Likewise.
671 (is_global_friend): Likewise.
672 (maybe_reject_flexarray_init): Likewise.
673 (module_token_lang): Likewise.
674 (handle_module_option): Likewise.
675 (literal_integer_zerop): Likewise.
676 (build_extra_args): Likewise.
677 (build_if_nonnull): Likewise.
678 (maybe_check_overriding_exception_spec): Likewise.
679 (finish_omp_target_clauses): Likewise.
680 (maybe_warn_zero_as_null_pointer_constant): Likewise.
681 (cxx_print_error_function): Likewise.
682 (decl_in_std_namespace_p): Likewise.
683 (merge_exception_specifiers): Likewise.
684 (mangle_module_global_init): Likewise.
685 (cxx_block_may_fallthru): Likewise.
686 (fold_builtin_source_location): Likewise.
687 (enum cp_oracle_request): Likewise.
688 (subsumes): Likewise.
689 (cp_finish_injected_record_type): Likewise.
690 (vtv_build_vtable_verify_fndecl): Likewise.
691 (cp_tree_c_finish_parsing): Likewise.
692 * cvt.cc (diagnose_ref_binding): Likewise.
693 (convert_to_void): Likewise.
694 (convert_force): Likewise.
695 (type_promotes_to): Likewise.
696 * decl.cc (make_unbound_class_template_raw): Likewise.
697 (cxx_init_decl_processing): Likewise.
698 (check_class_member_definition_namespace): Likewise.
699 (cxx_maybe_build_cleanup): Likewise.
700 * decl2.cc (maybe_emit_vtables): Likewise.
701 * error.cc (dump_function_name): Likewise.
702 * init.cc (is_class_type): Likewise.
703 (build_new_1): Likewise.
704 * lang-specs.h: Likewise.
705 * method.cc (make_alias_for_thunk): Likewise.
706 * module.cc (specialization_add): Likewise.
707 (module_state::read_cluster): Likewise.
708 * name-lookup.cc (check_extern_c_conflict): Likewise.
709 * name-lookup.h (struct cxx_binding): Likewise.
710 * parser.cc (cp_parser_identifier): Likewise.
711 * parser.h (struct cp_parser): Likewise.
712 * pt.cc (has_value_dependent_address): Likewise.
713 (push_tinst_level_loc): Likewise.
714 * semantics.cc (finish_omp_clauses): Likewise.
715 (finish_omp_atomic): Likewise.
716 * tree.cc (cp_save_expr): Likewise.
717 (cp_free_lang_data): Likewise.
718 * typeck.cc (cp_common_type): Likewise.
719 (strip_array_domain): Likewise.
720 (rationalize_conditional_expr): Likewise.
721 (check_return_expr): Likewise.
722 * vtable-class-hierarchy.cc: Likewise.
723
7242022-01-17 Martin Liska <mliska@suse.cz>
725
726 * call.c: Moved to...
727 * call.cc: ...here.
728 * class.c: Moved to...
729 * class.cc: ...here.
730 * constexpr.c: Moved to...
731 * constexpr.cc: ...here.
732 * cp-gimplify.c: Moved to...
733 * cp-gimplify.cc: ...here.
734 * cp-lang.c: Moved to...
735 * cp-lang.cc: ...here.
736 * cp-objcp-common.c: Moved to...
737 * cp-objcp-common.cc: ...here.
738 * cp-ubsan.c: Moved to...
739 * cp-ubsan.cc: ...here.
740 * cvt.c: Moved to...
741 * cvt.cc: ...here.
742 * cxx-pretty-print.c: Moved to...
743 * cxx-pretty-print.cc: ...here.
744 * decl.c: Moved to...
745 * decl.cc: ...here.
746 * decl2.c: Moved to...
747 * decl2.cc: ...here.
748 * dump.c: Moved to...
749 * dump.cc: ...here.
750 * error.c: Moved to...
751 * error.cc: ...here.
752 * except.c: Moved to...
753 * except.cc: ...here.
754 * expr.c: Moved to...
755 * expr.cc: ...here.
756 * friend.c: Moved to...
757 * friend.cc: ...here.
758 * g++spec.c: Moved to...
759 * g++spec.cc: ...here.
760 * init.c: Moved to...
761 * init.cc: ...here.
762 * lambda.c: Moved to...
763 * lambda.cc: ...here.
764 * lex.c: Moved to...
765 * lex.cc: ...here.
766 * mangle.c: Moved to...
767 * mangle.cc: ...here.
768 * method.c: Moved to...
769 * method.cc: ...here.
770 * name-lookup.c: Moved to...
771 * name-lookup.cc: ...here.
772 * optimize.c: Moved to...
773 * optimize.cc: ...here.
774 * parser.c: Moved to...
775 * parser.cc: ...here.
776 * pt.c: Moved to...
777 * pt.cc: ...here.
778 * ptree.c: Moved to...
779 * ptree.cc: ...here.
780 * rtti.c: Moved to...
781 * rtti.cc: ...here.
782 * search.c: Moved to...
783 * search.cc: ...here.
784 * semantics.c: Moved to...
785 * semantics.cc: ...here.
786 * tree.c: Moved to...
787 * tree.cc: ...here.
788 * typeck.c: Moved to...
789 * typeck.cc: ...here.
790 * typeck2.c: Moved to...
791 * typeck2.cc: ...here.
792 * vtable-class-hierarchy.c: Moved to...
793 * vtable-class-hierarchy.cc: ...here.
794
7952022-01-17 Jakub Jelinek <jakub@redhat.com>
796
797 PR c++/104031
798 * cp-gimplify.c (cp_genericize_target_expr): Set DECL_CONTEXT of
799 TARGET_EXPR_SLOT to current_function_decl if it was NULL.
800
8012022-01-17 Andrew Stubbs <ams@codesourcery.com>
802
803 * parser.c (cp_parser_omp_requires): Don't "sorry" dynamic_allocators.
804
617db51d
GA
8052022-01-14 Chung-Lin Tang <cltang@codesourcery.com>
806
807 PR c++/103705
808 * semantics.c (finish_omp_clauses): Also continue peeling off of
809 outer node for ARRAY_REFs.
810
8112022-01-14 Jakub Jelinek <jakub@redhat.com>
812
813 PR c++/103991
814 * cp-objcp-common.c (cxx_block_may_fallthru) <case IF_STMT>: For
815 IF_STMT_CONSTEXPR_P with constant false or true condition only
816 check if the taken clause may fall through.
817 * cp-gimplify.c (genericize_if_stmt): For consteval if, revert
818 to r12-5638^ behavior if then_ block can't fall through. For
819 constexpr if, revert to r12-5638^ behavior.
820
ad3f0d08
GA
8212022-01-13 Anthony Sharp <anthonysharp15@gmail.com>
822 Jason Merrill <jason@redhat.com>
823
824 PR c++/70417
825 * parser.c (cp_parser_id_expression): Handle
826 -Wmissing-template-keyword.
827 (struct saved_token_sentinel): Add modes to control what happens
828 on destruction.
829 (cp_parser_statement): Adjust.
830 (cp_parser_skip_entire_template_parameter_list): New function that
831 skips an entire template parameter list.
832 (cp_parser_require_end_of_template_parameter_list): Rename old
833 cp_parser_skip_to_end_of_template_parameter_list.
834 (cp_parser_skip_to_end_of_template_parameter_list): Refactor to be
835 called from one of the above two functions.
836 (cp_parser_lambda_declarator_opt)
837 (cp_parser_explicit_template_declaration)
838 (cp_parser_enclosed_template_argument_list): Adjust.
839
02a8a01b
GA
8402022-01-12 Jakub Jelinek <jakub@redhat.com>
841 Jason Merrill <jason@redhat.com>
842
843 PR c++/103480
844 * tree.c (move): If expr is xvalue_p, just return expr without
845 build_static_cast.
846
01a254e3
GA
8472022-01-11 Jakub Jelinek <jakub@redhat.com>
848
849 PR c++/101597
850 * class.c (build_vfn_ref): Build OBJ_TYPE_REF with INTEGER_CST
851 OBJ_TYPE_REF_TOKEN with type equal to OBJ_TYPE_REF_OBJECT type.
852 * error.c (resolve_virtual_fun_from_obj_type_ref): Use type of
853 OBJ_TYPE_REF_TOKEN rather than type of OBJ_TYPE_REF_OBJECT as
854 obj_type.
855
8562022-01-11 Patrick Palka <ppalka@redhat.com>
857
858 PR c++/103831
859 * call.c (build_new_method_call): Consider dependent bases only
860 if 'this' is available.
861
8622022-01-11 Olivier Hainque <hainque@adacore.com>
863
864 * decl.c (cxx_init_decl_processing): Move code possibly
865 altering flag_weak before code testing it.
866
d9450aa0
GA
8672022-01-10 Patrick Palka <ppalka@redhat.com>
868
869 PR c++/103879
870 * constexpr.c (cxx_fold_indirect_ref): Split out object/offset
871 canonicalization step into a local lambda. Strengthen it to
872 absorb more components at position 0. Use it before both calls
873 to cxx_fold_indirect_ref_1.
874
8752022-01-10 Patrick Palka <ppalka@redhat.com>
876
877 PR c++/103783
878 * call.c (cand_parms_match): Skip over 'this' when given one
879 static and one non-static member function.
880
8812022-01-10 Jakub Jelinek <jakub@redhat.com>
882
883 PR c++/103912
884 * semantics.c (expand_or_defer_fn): For immediate functions, set
885 node->body_removed to true and clear analyzed, definition and
886 force_output.
887 * decl2.c (c_parse_final_cleanups): Ignore immediate functions for
888 expand_or_defer_fn.
889
2848ef14
GA
8902022-01-08 Jakub Jelinek <jakub@redhat.com>
891
892 PR c++/89074
893 * constexpr.c (cxx_maybe_fold_addr_pointer_plus): New function.
894 (cxx_eval_binary_expression): Use it.
895
8962022-01-08 Jason Merrill <jason@redhat.com>
897
898 PR c++/103946
899 * init.c (build_vec_init): Remove assert.
900 * tree.c (build_vec_init_expr): Likewise.
901
9022022-01-08 Jason Merrill <jason@redhat.com>
903
904 PR c++/100588
905 * call.c (build_op_delete_call): Ignore destroying delete
906 if alloc_fn.
907
55e96bf9
GA
9082022-01-07 Jason Merrill <jason@redhat.com>
909
910 PR c++/20040
911 * init.c (build_new_1): Also build pointer cleanup if
912 TYPE_GETS_DELETE.
913 * cp-tree.h (TYPE_GETS_VEC_DELETE): New.
914
9152022-01-07 Jason Merrill <jason@redhat.com>
916
917 PR c++/103936
918 PR c++/65591
919 * cp-gimplify.c (cp_gimplify_expr): Restore VEC_INIT_EXPR handling.
920
9212022-01-07 Jason Merrill <jason@redhat.com>
922
923 PR c++/103711
924 * init.c (perform_target_ctor): Select destructor by in_chrg.
925
9262022-01-07 Jason Merrill <jason@redhat.com>
927
928 PR c++/61611
929 * except.c (in_nested_catch): New.
930 (expand_end_catch_block): Check it.
931
9322022-01-07 Jason Merrill <jason@redhat.com>
933
934 PR c++/33799
935 PR c++/102191
936 * except.c (maybe_splice_retval_cleanup): Check
937 current_binding_level.
938 * semantics.c (do_poplevel): Call it here.
939 * parser.c (cp_parser_compound_statement): Not here.
940
9412022-01-07 Jason Merrill <jason@redhat.com>
942
943 PR c++/53868
944 * decl.c (cp_finish_decl): Use wrap_temporary_cleanups for
945 cleanups from set_up_extended_ref_temp.
946 (wrap_temporary_cleanups): Ignore array cleanups.
947 (initialize_local_var): Don't check for array here.
948 * cp-tree.h (BIND_EXPR_VEC_DTOR): New.
949 * init.c (build_vec_delete_1): Set it.
950
9512022-01-07 Jason Merrill <jason@redhat.com>
952
953 PR c++/66451
954 * init.c (build_vec_delete_1): Handle throwing dtor.
955 (build_vec_init): Tell it we're in a cleanup already.
956
9572022-01-07 Jason Merrill <jason@redhat.com>
958
959 * typeck2.c (split_nonconstant_init_1): Don't cleanup the last elt.
960 (split_nonconstant_init): Adjust.
961
9622022-01-07 Jason Merrill <jason@redhat.com>
963
964 PR c++/66139
965 PR c++/52320
966 * constexpr.c (replace_decl): Rename from replace_result_decl.
967 * cp-tree.h (replace_decl): Declare it.
968 * cp-gimplify.c (cp_gimplify_init_expr): Call it.
969 (cp_gimplify_expr): Don't handle VEC_INIT_EXPR.
970 (cp_genericize_init, cp_genericize_init_expr)
971 (cp_genericize_target_expr): New.
972 (cp_fold_r): Call them.
973 * tree.c (build_array_copy): Add a TARGET_EXPR.
974 * typeck2.c (digest_init_r): Look through a TARGET_EXPR.
975
9762022-01-07 Jason Merrill <jason@redhat.com>
977
978 PR c++/94041
979 * decl.c (initialize_local_var): Fix comment.
980 * init.c (build_new_1): Do stabilize array init.
981 (build_vec_init): Use TARGET_EXPR for cleanup. Initialization
982 of an element from an explicit initializer is not a
983 full-expression.
984 * tree.c (expand_vec_init_expr): Pass flags through.
985 * typeck2.c (split_nonconstant_init_1): Handle VEC_INIT_EXPR.
986 (split_nonconstant_init): Handle array cleanups.
987 * cp-tree.h: Adjust.
988
9892022-01-07 Jason Merrill <jason@redhat.com>
990
991 PR c++/94041
992 * decl.c (check_initializer): Remove obsolete comment.
993 (wrap_cleanups_r): Don't wrap CLEANUP_EH_ONLY.
994 (initialize_local_var): Change assert to test.
995 * typeck2.c (maybe_push_temp_cleanup): New.
996 (split_nonconstant_init_1): Use it.
997 (split_nonconstant_init): Clear cleanup flags.
998
9992022-01-07 Jason Merrill <jason@redhat.com>
1000
1001 PR c++/92385
1002 * typeck2.c (PICFLAG_VEC_INIT): New.
1003 (process_init_constructor_array): Set it.
1004 (process_init_constructor): Handle it.
1005 (split_nonconstant_init_1): Handle VEC_INIT_EXPR.
1006 * init.c (build_vec_init): Likewise.
1007 * cp-gimplify.c (cp_gimplify_expr): Factor out...
1008 * tree.c (expand_vec_init_expr): ...this function.
1009 (build_vec_init_elt): Handle BRACE_ENCLOSED_INITIALIZER_P.
1010 (build_vec_init_expr): Likewise.
1011 * constexpr.c (cxx_eval_vec_init): Likewise.
1012 (reduced_constant_expression_p): Check arrays before C++20.
1013 * cp-tree.h (expand_vec_init_expr): Declare.
1014
10152022-01-07 Jason Merrill <jason@redhat.com>
1016
1017 * init.c (build_new_1): Remove preevaluation code.
1018
0fbefa25
GA
10192022-01-05 Nathan Sidwell <nathan@acm.org>
1020
1021 * pt.c (instantiate_class_template_1): Process attribute((used)) set
1022 in class's context.
1023
10242022-01-05 Nathan Sidwell <nathan@acm.org>
1025
1026 * init.c (build_new_1): Check complain before alignment warning.
1027
7d11b64b
GA
10282022-01-04 Jason Merrill <jason@redhat.com>
1029
1030 * cp-tree.h (class releasing_vec): Add begin/end fns.
1031
10322022-01-04 Jason Merrill <jason@redhat.com>
1033
1034 * init.c: Include -*- C++ -*- on first line.
1035
a4ae8c37
GA
10362022-01-03 Marek Polacek <polacek@redhat.com>
1037
1038 PR c++/103758
1039 * parser.c (cp_parser_decl_specifier_seq): Replace %<decl-specifier%>
1040 with %qD.
1041
10422022-01-03 Marek Polacek <polacek@redhat.com>
1043
1044 * parser.c (make_char_string_pack): Add a cast to const unsigned
1045 char *.
1046
10472022-01-03 Jakub Jelinek <jakub@redhat.com>
1048
1049 PR c++/103600
1050 * rtti.c (get_tinfo_decl_direct): Add "non overlapping" attribute
1051 to DECL_TINFO_P VAR_DECLs.
1052
5da23a13
GA
10532022-01-02 Jason Merrill <jason@redhat.com>
1054
1055 * init.c (build_vec_init): Append the decrement to elt_init.
1056
10572022-01-02 Jason Merrill <jason@redhat.com>
1058
1059 * decl.c (wrap_cleanups_r): Don't wrap if noexcept.
1060
ad41bd84 1061\f
6123f29a 1062Copyright (C) 2022 Free Software Foundation, Inc.
ad41bd84
JM
1063
1064Copying and distribution of this file, with or without modification,
1065are permitted in any medium without royalty provided the copyright
1066notice and this notice are preserved.