]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/cp/ChangeLog
libstdc++: Prefer to use mmap instead of malloc in libbacktrace
[thirdparty/gcc.git] / gcc / cp / ChangeLog
CommitLineData
da066c42
GA
12022-04-11 Jason Merrill <jason@redhat.com>
2
3 PR c++/98249
4 * call.cc (build_operator_new_call): Just look in ::.
5
62022-04-11 Alexandre Oliva <oliva@adacore.com>
7
8 * constexpr.cc (cxx_eval_call_expression): Disregard dtor
9 result.
10
112022-04-11 Alexandre Oliva <oliva@adacore.com>
12
13 * semantics.cc (set_cleanup_locs): Propagate locus to call
14 wrapped in cast-to-void.
15
162022-04-11 Jason Merrill <jason@redhat.com>
17
18 PR c++/100370
19 * init.cc (warn_placement_new_too_small): Check deref.
20
71cac7de
GA
212022-04-09 Jason Merrill <jason@redhat.com>
22
23 PR c++/105191
24 PR c++/92385
25 * tree.cc (build_vec_init_elt): Do {}-init for aggregates.
26 * constexpr.cc (cxx_eval_vec_init): Only treat {} as value-init
27 for non-aggregate types.
28 (build_vec_init_expr): Also check constancy of explicit
29 initializer elements.
30
312022-04-09 Jason Merrill <jason@redhat.com>
32
33 PR c++/91618
34 PR c++/96604
35 * name-lookup.cc (set_decl_namespace): Set
36 DECL_IMPLICIT_INSTANTIATION if no non-template match.
37 * pt.cc (check_explicit_specialization): Check it.
38 * decl2.cc (check_classfn): Call it.
39
df00d103
GA
402022-04-07 Patrick Palka <ppalka@redhat.com>
41
42 PR c++/99479
43 * name-lookup.cc (name_lookup::using_queue): Change to an
44 auto_vec (with 16 elements of internal storage).
45 (name_lookup::queue_namespace): Change return type to void,
46 take queue parameter by reference and adjust function body
47 accordingly.
48 (name_lookup::do_queue_usings): Inline into ...
49 (name_lookup::queue_usings): ... here. As in queue_namespace.
50 (name_lookup::search_unqualified): Don't make queue static,
51 remove length variable, and adjust function body accordingly.
52
532022-04-07 Jakub Jelinek <jakub@redhat.com>
54
55 PR tree-optimization/102586
56 * cp-objcp-common.h (cp_classtype_as_base): Declare.
57 (LANG_HOOKS_CLASSTYPE_AS_BASE): Redefine.
58 * cp-objcp-common.cc (cp_classtype_as_base): New function.
59
602022-04-07 Jason Merrill <jason@redhat.com>
61
62 PR c++/101051
63 * decl.cc (grokdeclarator): Reject conversion with trailing return
64 sooner.
65
662022-04-07 Jason Merrill <jason@redhat.com>
67
68 PR c++/101717
69 * lambda.cc (lambda_expr_this_capture): Check all enclosing
70 lambdas for completeness.
71
722022-04-07 Jason Merrill <jason@redhat.com>
73
74 PR c++/105187
75 * typeck2.cc (store_init_value): Allow TREE_HAS_CONSTRUCTOR for
76 vectors.
77
80eb8ec6
GA
782022-04-06 Jakub Jelinek <jakub@redhat.com>
79
80 PR c++/104668
81 * decl2.cc (splice_template_attributes): Return NULL if *p is
82 error_mark_node.
83 (cplus_decl_attributes): Return early if attributes is
84 error_mark_node. Don't check that later.
85
862022-04-06 Patrick Palka <ppalka@redhat.com>
87
88 PR c++/105143
89 * pt.cc (do_class_deduction): Check complain before attempting
90 to issue a -Wctad-maybe-unsupported warning.
91
922022-04-06 Jason Merrill <jason@redhat.com>
93
94 PR c++/104702
95 * init.cc (build_vec_init): Use a reference for the result.
96
972022-04-06 Jason Merrill <jason@redhat.com>
98
99 PR c++/100608
100 * name-lookup.cc (check_local_shadow): Use -Wshadow=local
101 if exactly one of 'old' and 'decl' is a type.
102
9d84ed68
GA
1032022-04-05 Jason Merrill <jason@redhat.com>
104
105 PR c++/103852
106 DR 1286
107 * pt.cc (do_class_deduction): Pedwarn for renaming alias in C++17.
108
1092022-04-05 Jason Merrill <jason@redhat.com>
110
111 PR c++/101677
112 * name-lookup.h (struct cp_binding_level): Add requires_expression
113 bit-field.
114 * parser.cc (cp_parser_requires_expression): Set it.
115 (synthesize_implicit_template_parm): Check it.
116
5e09bb1b
GA
1172022-04-04 Jason Merrill <jason@redhat.com>
118
119 PR c++/101894
120 * decl.cc (duplicate_decls): Copy DECL_FRIEND_CONTEXT.
121
1222022-04-04 Jason Merrill <jason@redhat.com>
123
124 PR c++/103852
125 DR 1286
126 * pt.cc (get_underlying_template): Compare default template args.
127
8af4270d
GA
1282022-04-03 Benno Evers <benno.evers@tenzir.com>
129 Iain Sandoe <iain@sandoe.co.uk>
130
131 PR c++/103328
132 * coroutines.cc (morph_fn_to_coro): Reset
133 current_binding_level->blocks.
134
447ac3c5
ML
1352022-04-01 Jason Merrill <jason@redhat.com>
136
137 Revert:
138 2022-03-31 Jason Merrill <jason@redhat.com>
139
140 PR c++/96645
141 * parser.cc (cp_parser_early_parsing_nsdmi): New.
142 (cp_parser_member_declaration): Call it.
143
1442022-04-01 Jason Merrill <jason@redhat.com>
145
146 Revert:
147 2022-03-24 Jason Merrill <jason@redhat.com>
148
149 PR c++/96645
150 * cp-tree.h (type_has_default_ctor_to_be_synthesized): Declare.
151 * class.cc (type_has_default_ctor_to_be_synthesized): New.
152 (type_has_non_user_provided_default_constructor_1): Support it.
153 (type_has_non_user_provided_default_constructor): Now a wrapper.
154 * method.cc (complain_about_unparsed_dmi): New.
155 (constructible_expr): Call it.
156
8af4270d
GA
1572022-04-01 Patrick Palka <ppalka@redhat.com>
158
159 PR c++/105110
160 * pt.cc (unify) <case TEMPLATE_PARM_INDEX>: Drop cv-quals from
161 the argument type of an NTTP before deducing from it.
162
57ad4462
GA
1632022-03-31 Jason Merrill <jason@redhat.com>
164
165 PR c++/96645
166 * parser.cc (cp_parser_early_parsing_nsdmi): New.
167 (cp_parser_member_declaration): Call it.
168
150ab50f
GA
1692022-03-30 Patrick Palka <ppalka@redhat.com>
170
171 PR c++/100474
172 * constraint.cc (diagnose_trait_expr): Handle all remaining
173 traits appropriately. Remove default case.
174
1752022-03-30 Marek Polacek <polacek@redhat.com>
176
177 PR c++/93280
178 PR c++/104583
179 * init.cc (get_nsdmi): Set TARGET_EXPR_DIRECT_INIT_P to in_ctor.
180
1812022-03-30 Jakub Jelinek <jakub@redhat.com>
182
183 PR c++/105092
184 * pt.cc (tsubst_omp_clause_decl): When handling iterators, set
185 DECL_CONTEXT of the iterator var to current_function_decl and
186 call pushdecl.
187
1882022-03-30 Jakub Jelinek <jakub@redhat.com>
189
190 PR c++/105061
191 * parser.cc (cp_parser_template_introduction): If member_p, temporarily
192 clear parser->colon_corrects_to_scope_p around tentative parsing of
193 nested name specifier.
194
aab0127d
GA
1952022-03-28 Jason Merrill <jason@redhat.com>
196
197 * pt.cc (determine_specialization): Add comment.
198
1992022-03-28 Patrick Palka <ppalka@redhat.com>
200
201 PR c++/105067
202 * pt.cc (finish_concept_definition): Check that a concept is
203 declared with exactly one template parameter list.
204
2052022-03-28 Patrick Palka <ppalka@redhat.com>
206
207 PR c++/105064
208 * constraint.cc (maybe_substitute_reqs_for): Don't assume
209 DECL_TEMPLATE_INFO is available.
210
2112022-03-28 Jason Merrill <jason@redhat.com>
212
213 PR c++/105003
214 PR c++/104008
215 PR c++/102869
216 * pt.cc (complex_alias_template_r): walk_tree callback, replacing
217 uses_all_template_parms_r, complex_pack_expansion_r.
218 (complex_alias_template_p): Adjust.
219 * tree.cc (strip_typedefs): Revert r12-7710 change.
220
2212022-03-28 Jason Merrill <jason@redhat.com>
222
223 PR c++/102071
224 * init.cc (build_new_1): Include cookie in alignment. Omit
225 constexpr wrapper from alloc_call.
226
2272022-03-28 Jason Merrill <jason@redhat.com>
228
229 PR c++/103291
230 * name-lookup.cc (push_local_extern_decl_alias): Call
231 determine_visibility.
232
2332022-03-28 Jason Merrill <jason@redhat.com>
234
235 PR c++/102123
236 * pt.cc (tsubst_copy): Use make_unbound_class_template for rewriting
237 a type template reference.
238
2392022-03-28 Jason Merrill <jason@redhat.com>
240
241 PR c++/103968
242 * pt.cc (value_dependent_expression_p): Check
243 has_value_dependent_address for conversion to reference.
244
2452022-03-28 Jason Merrill <jason@redhat.com>
246
247 PR c++/103943
248 * pt.cc (tsubst_qualified_id): Handle getting SCOPE_REF from
249 tsubst_baselink.
250 (instantiation_dependent_scope_ref_p): Check dependent_scope_p.
251
2522022-03-28 Jason Merrill <jason@redhat.com>
253
254 PR c++/102045
255 * call.cc (make_base_init_ok): Call make_used.
256
2572022-03-28 Jason Merrill <jason@redhat.com>
258
259 PR c++/104847
260 * mangle.cc (write_expression): Don't write a union designator when
261 undigested.
262
2632022-03-28 Jason Merrill <jason@redhat.com>
264
265 PR c++/99445
266 PR c++/103769
267 * tree.cc (strip_typedefs): Use build_distinct_type_copy.
268
d2906412
GA
2692022-03-26 Patrick Palka <ppalka@redhat.com>
270
271 PR c++/105050
272 * constexpr.cc (potential_constant_expression_1) <case IF_STMT>:
273 Clarify error message when a if-stmt is non-constant because its
274 branches are non-constant.
275
2762022-03-26 Patrick Palka <ppalka@redhat.com>
277
278 PR c++/103455
279 * call.cc (add_builtin_candidate) <case MEMBER_REF>: Test
280 CLASS_TYPE_P instead of MAYBE_CLASS_TYPE_P.
281
31e989a2
GA
2822022-03-26 Jakub Jelinek <jakub@redhat.com>
283
284 * parser.cc (cp_parser_postfix_expression)
285 <case RID_BILTIN_CONVERTVECTOR, case RID_BUILTIN_BIT_CAST>: Don't
286 return cp_build_{vec,convert,bit_cast} result right away, instead
287 set postfix_expression to it and break.
288
2892022-03-25 Marek Polacek <polacek@redhat.com>
290
291 PR c++/104944
292 * typeck.cc (cxx_sizeof_or_alignof_type): Diagnose alignof(void).
293 (cxx_alignas_expr): Call cxx_sizeof_or_alignof_type with
294 complain == true.
295
6fc4a993
GA
2962022-03-24 Marek Polacek <polacek@redhat.com>
297
298 PR c++/104284
299 * decl.cc (check_initializer): Don't call build_aggr_init in
300 a template.
301
3022022-03-24 Jason Merrill <jason@redhat.com>
303
304 PR c++/96645
305 * cp-tree.h (type_has_default_ctor_to_be_synthesized): Declare.
306 * class.cc (type_has_default_ctor_to_be_synthesized): New.
307 (type_has_non_user_provided_default_constructor_1): Support it.
308 (type_has_non_user_provided_default_constructor): Now a wrapper.
309 * method.cc (complain_about_unparsed_dmi): New.
310 (constructible_expr): Call it.
311
3122022-03-24 Marek Polacek <polacek@redhat.com>
313
314 PR c++/102990
315 * typeck2.cc (massage_init_elt): Avoid folding CONSTRUCTORs.
316
3172022-03-24 Patrick Palka <ppalka@redhat.com>
318
319 PR c++/104620
320 * call.cc (build_over_call): Use cxx_constant_value_sfinae
321 instead of cxx_constant_value to evaluate a consteval call.
322 * constexpr.cc (cxx_constant_value_sfinae): Add decl parameter
323 and pass it to cxx_eval_outermost_constant_expr.
324 * cp-tree.h (cxx_constant_value_sfinae): Add decl parameter.
325 * pt.cc (fold_targs_r): Pass NULL_TREE as decl parameter to
326 cxx_constant_value_sfinae.
327
3282022-03-24 Jakub Jelinek <jakub@redhat.com>
329
330 PR c++/104994
331 * constexpr.cc (cxx_eval_constant_expression): Don't diagnose passing
332 through extern thread_local declarations. Change wording from
333 declaration to definition.
334 (potential_constant_expression_1): Don't diagnose extern thread_local
335 declarations. Change wording from declared to defined.
336 * decl.cc (start_decl): Likewise.
337
d1ca63a1
GA
3382022-03-23 Jason Merrill <jason@redhat.com>
339
340 PR c++/103337
341 * decl.cc (reshape_single_init): New.
342 (reshape_init_class): Use it.
343
3442022-03-23 Jason Merrill <jason@redhat.com>
345
346 PR c++/105006
347 * name-lookup.cc (lookup_using_decl): Check that scope is
348 a dependent type before looking for dependent using.
349
3502022-03-23 Jason Merrill <jason@redhat.com>
351
352 PR c++/105006
353 * name-lookup.cc (lookup_using_decl): Set DECL_DEPENDENT_P if lookup
354 finds a dependent using.
355
d156bb87
GA
3562022-03-21 Jason Merrill <jason@redhat.com>
357
358 PR c++/58646
359 * init.cc (build_vec_init): Check for vla element type.
360
3612022-03-21 Jason Merrill <jason@redhat.com>
362
363 PR c++/103337
364 PR c++/102740
365 PR c++/103299
366 PR c++/102538
367 * decl.cc (reshape_init_class): Avoid looking for designator
368 after we found it.
369 (reshape_init_r): Keep looking for designator.
370
3712022-03-21 Jason Merrill <jason@redhat.com>
372
373 PR c++/101767
374 * decl.cc (reshape_init_class): Back out of anon struct
375 if a designator doesn't match.
376
8ca61ad1
GA
3772022-03-18 Jason Merrill <jason@redhat.com>
378
379 PR c++/92918
380 PR c++/104476
381 * class.cc (add_method): Avoid adding the same used function twice.
382 (handle_using_decl): Don't add_method.
383 (finish_struct): Don't using op= if we have one already.
384 (maybe_push_used_methods): New.
385 * semantics.cc (finish_member_declaration): Call it.
386 * name-lookup.cc (diagnose_name_conflict): No longer static.
387 (push_class_level_binding): Revert 92918 patch, limit
388 to dependent using.
389 * cp-tree.h: Adjust.
390
3912022-03-18 Jakub Jelinek <jakub@redhat.com>
392
393 PR c++/104568
394 * init.cc (build_new_constexpr_heap_type): Remove FULL_SIZE
395 argument and its handling, instead add ITYPE2 argument. Only
396 support COOKIE_SIZE != NULL.
397 (build_new_1): If size is 0, change it to 0 * outer_nelts if
398 outer_nelts is non-NULL. Pass type rather than elt_type to
399 maybe_wrap_new_for_constexpr.
400 * constexpr.cc (build_new_constexpr_heap_type): New function.
401 (cxx_eval_constant_expression) <case CONVERT_EXPR>:
402 If elt_size is zero sized type, try to recover outer_nelts from
403 the size argument to operator new/new[] and pass that as
404 arg_size to build_new_constexpr_heap_type. Pass ctx,
405 non_constant_p and overflow_p to that call too.
406
4072022-03-18 Marek Polacek <polacek@redhat.com>
408
409 PR c++/104008
410 * tree.cc (strip_typedefs): Don't strip an alias template when
411 doing so would result in losing a parameter pack.
412
9fc8f278
GA
4132022-03-16 Patrick Palka <ppalka@redhat.com>
414
415 * search.cc (lookup_member): Simplify by handling all values
416 of protect together in the ambiguous case. Don't modify protect.
417
4182022-03-16 Patrick Palka <ppalka@redhat.com>
419
420 PR c++/96780
421 * cp-gimplify.cc (cp_fold) <case CALL_EXPR>: Fold calls to
422 std::move/forward and other cast-like functions into simple
423 casts.
424
14d2ac82
GA
4252022-03-15 Patrick Palka <ppalka@redhat.com>
426
427 PR c++/103177
428 * search.cc (lookup_field_info::errstr): Remove this data
429 member.
430 (lookup_field_r): Don't set errstr.
431 (lookup_member): Check ambiguity before checking access.
432 Simplify accordingly after errstr removal. Exit early upon
433 error or empty result.
434
4352022-03-15 Jakub Jelinek <jakub@redhat.com>
436
437 PR c++/104623
438 * parser.cc (cp_parser_skip_to_pragma_eol): Don't purge any tokens.
439
510613e7
GA
4402022-03-14 Jakub Jelinek <jakub@redhat.com>
441
442 PR tree-optimization/102586
443 * call.cc (build_cxx_call): Diagnose __builtin_clear_padding where
444 first argument's type is pointer to non-trivially-copyable type unless
445 it is address of a variable or parameter.
446
57eeedda
GA
4472022-03-12 Patrick Palka <ppalka@redhat.com>
448
449 PR c++/104641
450 * cp-tree.h (tsubst_flags::tf_tst_ok): New flag.
451 * decl.cc (make_typename_type): Allow a typename-specifier to
452 resolve to a template when tf_tst_ok, in which case return
453 a CTAD placeholder for the template.
454 * pt.cc (tsubst_decl) <case VAR_DECL>: Set tf_tst_ok when
455 substituting the type.
456 (tsubst): Clear tf_tst_ok and remember if it was set.
457 <case TYPENAME_TYPE>: Pass tf_tst_ok to make_typename_type
458 appropriately.
459 (tsubst_copy) <case CAST_EXPR>: Set tf_tst_ok when substituting
460 the type.
461 (tsubst_copy_and_build) <case CAST_EXPR>: Likewise.
462 <case CONSTRUCTOR>: Likewise.
463
4642022-03-12 Patrick Palka <ppalka@redhat.com>
465
466 PR c++/104622
467 * call.cc (missing_conversion_p): Define.
468 (add_candidates): Use it.
469 * pt.cc (check_non_deducible_conversion): Change type of strict
470 parameter to unification_kind_t and directly test for DEDUCE_CALL.
471
4722022-03-12 Patrick Palka <ppalka@redhat.com>
473
474 PR c++/104527
475 * constraint.cc (normalize_atom): Set
476 ATOMIC_CONSTR_EXPR_FROM_CONCEPT_P appropriately.
477 (get_mapped_args): Make static, adjust parameters. Always
478 return a vector whose depth corresponds to the template depth of
479 the context of the atomic constraint expression. Micro-optimize
480 by passing false as exact to safe_grow_cleared and by collapsing
481 a multi-level depth-one argument vector.
482 (satisfy_atom): Adjust call to get_mapped_args and
483 diagnose_atomic_constraint.
484 (diagnose_atomic_constraint): Replace map parameter with an args
485 parameter.
486 * cp-tree.h (ATOMIC_CONSTR_EXPR_FROM_CONCEPT_P): Define.
487 (get_mapped_args): Remove declaration.
488
4892022-03-12 Patrick Palka <ppalka@redhat.com>
490 Jason Merrill <jason@redhat.com>
491
492 PR c++/98644
493 * constexpr.cc (mark_non_constant): Define, split out from ...
494 (cxx_eval_outermost_constant_expr): ... here.
495 (maybe_constant_value): Use it.
496
4972022-03-12 Patrick Palka <ppalka@redhat.com>
498
499 * semantics.cc (finish_unary_fold_expr): Use input_location
500 instead of UNKNOWN_LOCATION.
501 (finish_binary_fold_expr): Likewise.
502
5032022-03-12 Thomas Schwinge <thomas@codesourcery.com>
504
505 PR other/65095
506 * semantics.cc (handle_omp_array_sections_1)
507 (cp_oacc_check_attachments): Call 'user_omp_clause_code_name'
508 instead of 'c_omp_map_clause_name'.
509
5e28be89
GA
5102022-03-10 Marek Polacek <polacek@redhat.com>
511
512 PR c++/104608
513 * parser.cc (cp_parser_template_name): Repeat lookup of
514 TYPE_DECLs.
515
5162022-03-10 Marek Polacek <polacek@redhat.com>
517
518 PR c++/104752
519 * semantics.cc (finish_compound_literal): Disallow auto{x} for
520 is_constrained_auto.
521 * typeck2.cc (build_functional_cast_1): Likewise.
522
5232022-03-10 Marek Polacek <polacek@redhat.com>
524
525 PR c++/104846
526 * decl.cc (grokdeclarator): Check FUNC_OR_METHOD_TYPE_P before giving
527 data member errors.
528
5292022-03-10 Jakub Jelinek <jakub@redhat.com>
530
531 PR c++/103460
532 * decl.cc (grok_op_properties): Allow variadic operator[] for
533 C++23.
534
5352022-03-10 Roger Sayle <roger@nextmovesoftware.com>
536
537 PR c++/95999
538 * decl.cc (finish_enum_value_list): If VALUE isn't an INTEGER_CST
539 consider it to be zero (i.e. treat it like error_mark_node).
540 (build_enumerator): Likewise, if PREV_VALUE isn't an INTEGER_CST,
541 set VALUE to error_mark_node.
542
5432022-03-10 Roger Sayle <roger@nextmovesoftware.com>
544
545 PR c++/39751
546 * parser.cc (cp_parser_late_parsing_for_member): Confirm the token
547 stream hasn't been purged before processing DECL_PENDING_INLINE.
548
8cc4f9cd
GA
5492022-03-09 Patrick Palka <ppalka@redhat.com>
550
551 PR c++/104823
552 * except.cc (build_noexcept_spec): Strengthen dependence check
553 to instantiation_dependent_expression_p.
554 * parser.cc (cp_parser_parenthesized_expression_list_elt):
555 Remove fold_expr_p parameter, and don't call
556 instantiate_non_dependent_expr.
557 (cp_parser_parenthesized_expression_list): Adjust accordingly.
558 * pt.cc (expand_integer_pack): Strengthen dependence check
559 to instantiation_dependent_expression_p.
560 (instantiate_non_dependent_expr_internal): Adjust comment.
561 (instantiate_non_dependent_expr_sfinae): Likewise. Drop
562 the potentially-constant check, and relax and turn the
563 dependence check into a checking assert.
564 (instantiate_non_dependent_or_null): Adjust comment.
565 * semantics.cc (finish_decltype_type): Keep
566 processing_template_decl cleared after calling
567 instantiate_non_dependent_expr_sfinae.
568
5692022-03-09 Patrick Palka <ppalka@redhat.com>
570
571 PR c++/102137
572 PR c++/87820
573 * cp-tree.h (is_copy_initialization): Declare.
574 * decl.cc (cp_finish_decl): Set LOOKUP_ONLYCONVERTING
575 when is_copy_initialization is true.
576 * init.cc (build_aggr_init): Split out copy-initialization
577 check into ...
578 (is_copy_initialization): ... here.
579 * pt.cc (instantiate_decl): Pass 0 instead of
580 LOOKUP_ONLYCONVERTING as flags to cp_finish_decl.
581
5822022-03-09 Patrick Palka <ppalka@redhat.com>
583
584 PR c++/65396
585 * cp-tree.h (merge_default_template_args): Declare.
586 * decl.cc (merge_default_template_args): Define, factored out
587 from redeclare_class_template.
588 (duplicate_decls): Use it when merging member function template
589 and free function declarations.
590 * pt.cc (redeclare_class_template): Factor out default argument
591 merging logic into merge_default_template_args. Improve location
592 of a note when there's a template parameter kind mismatch.
593
5942022-03-09 Jakub Jelinek <jakub@redhat.com>
595
596 PR c/104711
597 * constexpr.cc (cxx_eval_check_shift_p): Use TYPE_OVERFLOW_WRAPS
598 instead of TYPE_UNSIGNED.
599 * typeck.cc (cp_build_binary_op): Don't emit
600 -Wshift-negative-value warning if TYPE_OVERFLOW_WRAPS.
601
8d038a84
GA
6022022-03-08 Roger Sayle <roger@nextmovesoftware.com>
603
604 PR c++/96440
605 * decl.cc (start_decl): Defend against prefix_attributes being
606 error_mark_node.
607
6082022-03-08 Roger Sayle <roger@nextmovesoftware.com>
609
610 PR c++/96437
611 * parser.cc (synthesize_implicit_template_parm): Check that
612 TREE_VALUE (new_parm) isn't error_mark_node before setting its
613 DECL_VIRTUAL_P.
614
6152022-03-08 Roger Sayle <roger@nextmovesoftware.com>
616
617 PR c++/96329
618 * parser.cc (cp_parser_linkage_specification): Treat the case where
619 linkage is error_mark_node as "invalid linkage-specification".
620
6212022-03-08 Marek Polacek <polacek@redhat.com>
622
623 PR c++/104108
624 * pt.cc (convert_nontype_argument): Recompute
625 value_dependent_expression_p after build_converted_constant_expr.
626
6272022-03-08 Marek Polacek <polacek@redhat.com>
628
629 * decl2.cc (is_late_template_attribute): Do not defer attribute
630 unavailable.
631 * pt.cc (tsubst_enum): Set TREE_UNAVAILABLE.
632
6332022-03-08 Jakub Jelinek <jakub@redhat.com>
634
635 PR c++/104806
636 * search.cc (lookup_field_fuzzy_info::fuzzy_lookup_field): Ignore
637 identifiers with space at the end.
638
e6533e2e
GA
6392022-03-07 Jason Merrill <jason@redhat.com>
640
641 PR c++/104618
642 * decl2.cc (mark_single_function): Look through parens and location
643 wrapper.
644 * typeck.cc (cp_build_addr_expr_1): Not here.
645
6462022-03-07 Jakub Jelinek <jakub@redhat.com>
647
648 * parser.cc (cp_parser_omp_clause_map): Add missing space in string
649 literal.
650
6512022-03-07 Jakub Jelinek <jakub@redhat.com>
652
653 * cvt.cc: Fix up duplicated word issue in a comment.
654 * pt.cc: Likewise.
655 * module.cc: Likewise.
656 * coroutines.cc: Likewise.
657
8d96e14c
GA
6582022-03-04 Nathan Sidwell <nathan@acm.org>
659
660 * mangle.cc (is_std_substitution): Check global module.
661 (is_std_substitution_char): Return bool.
662
6632022-03-04 Nathan Sidwell <nathan@acm.org>
664
665 * cp-tree.h (mangle_identifier): Replace with ...
666 (mangle_module_component): ... this.
667 * mangle.cc (dump_substitution_candidates): Adjust.
668 (add_substitution): Likewise.
669 (find_substitution): Likewise.
670 (unmangled_name_p): Likewise.
671 (mangle_module_substitution): Reimplement.
672 (mangle_module_component): New.
673 (write_module, maybe_write_module): Adjust.
674 (write_name): Drop modules here.
675 (write_unqualified): Do them here instead.
676 (mangle_global_init): Adjust.
677 * module.cc (module_state::mangle): Adjust.
678 (mangle_module): Likewise.
679 (get_originating_module): Adjust.
680
a35f1697
GA
6812022-02-28 Marek Polacek <polacek@redhat.com>
682
683 PR c++/104682
684 * cp-tree.h (build_enumerator): Adjust.
685 * decl.cc (finish_enum): Make it return the new decl.
686 * pt.cc (tsubst_enum): Propagate TREE_DEPRECATED and TREE_UNAVAILABLE.
687
6882022-02-28 Marek Polacek <polacek@redhat.com>
689
690 PR c++/104667
691 * decl2.cc (is_late_template_attribute): Cope with a decl without
692 a type.
693
88c1b038
GA
6942022-02-27 Jason Merrill <jason@redhat.com>
695
696 PR c++/104618
697 * typeck.cc (cp_build_addr_expr_1): Also
698 maybe_undo_parenthesized_ref.
699
756a6185
GA
7002022-02-24 Martin Liska <mliska@suse.cz>
701
702 * pt.cc (defarg_insts_for): Use braces for subobject.
703
5a9ba3f2
GA
7042022-02-18 Patrick Palka <ppalka@redhat.com>
705
706 PR c++/94944
707 * pt.cc (maybe_instantiate_noexcept): For non-static member
708 functions, set current_class_ptr/ref to the specialized 'this'
709 instead.
710
0bdb0498
GA
7112022-02-17 Jason Merrill <jason@redhat.com>
712
713 PR c++/104539
714 * pt.cc (mark_decl_instantiated): Don't clear DECL_COMDAT.
715
7162022-02-17 Jason Merrill <jason@redhat.com>
717
718 PR c++/90451
719 * decl2.cc (mark_single_function): New.
720 * cp-tree.h: Declare it.
721 * typeck.cc (cp_build_addr_expr_1): mark_used when making a PMF.
722 * semantics.cc (finish_qualified_id_expr): Not here.
723 (finish_id_expression_1): Or here.
724 (finish_decltype_type): Call mark_single_function.
725 * cvt.cc (convert_to_void): And here.
726 * pt.cc (convert_nontype_argument): And here.
727 * init.cc (build_offset_ref): Adjust assert.
728
7292022-02-17 Patrick Palka <ppalka@redhat.com>
730
731 PR c++/104565
732 * semantics.cc (finish_compound_literal): Don't perform
733 non-dependent expr folding before calling check_narrowing.
734
cb3afcd2
GA
7352022-02-16 Patrick Palka <ppalka@redhat.com>
736
737 PR c++/104507
738 * constexpr.cc (potential_constant_expression_1)
739 <case NON_DEPENDENT_EXPR>: Return false instead of recursing.
740 Assert tf_error isn't set.
741
875e493b
GA
7422022-02-15 Jason Merrill <jason@redhat.com>
743
744 PR c++/104107
745 PR c++/95036
746 * pt.cc (coerce_template_template_parms): Take full parms.
747 Avoid adding too much of outer_args.
748 (coerce_template_template_parm): Adjust.
749 (template_template_parm_bindings_ok_p): Adjust.
750 (convert_template_argument): Adjust.
751
1f8a09d2
GA
7522022-02-14 Jakub Jelinek <jakub@redhat.com>
753
754 PR c++/104513
755 * constexpr.cc (potential_constant_expression_1) <case GOTO_EXPR>:
756 Don't punt if returns (target).
757
e8d68f0a
GA
7582022-02-11 Jakub Jelinek <jakub@redhat.com>
759
760 PR c++/104472
761 * constexpr.cc (cxx_eval_internal_function) <case IFN_VEC_CONVERT>:
762 Only return fold_const_call result if it is non-NULL. Otherwise
763 fall through into the default: case to return t, set *non_constant_p
764 and emit diagnostics if needed.
765
a645583d
GA
7662022-02-10 Jason Merrill <jason@redhat.com>
767
768 * module.cc (depset::hash::add_specializations): Use
769 STRIP_TEMPLATE.
770
7712022-02-10 Tobias Burnus <tobias@codesourcery.com>
772
773 PR c++/102204
774 * decl2.cc (cp_omp_mappable_type_1): Remove check for virtual
775 members as those are permitted since OpenMP 5.0.
776
7772022-02-10 Patrick Palka <ppalka@redhat.com>
778
779 * pt.cc (filter_memfn_lookup): Handle dependent USING_DECL
780 better.
781
7822022-02-10 Marcel Vollweiler <marcel@codesourcery.com>
783
784 * parser.cc (cp_parser_omp_clause_name): Parse 'has_device_addr' clause.
785 (cp_parser_omp_var_list_no_open): Handle array sections.
786 (cp_parser_omp_all_clauses): Added PRAGMA_OMP_CLAUSE_HAS_DEVICE_ADDR
787 case.
788 (cp_parser_omp_target_update): Added HAS_DEVICE_ADDR to OMP_CLAUSE_MASK.
789 * semantics.cc (handle_omp_array_sections): Handle clause restrictions.
790 (finish_omp_clauses): Handle array sections.
791
3adf509f
GA
7922022-02-09 Patrick Palka <ppalka@redhat.com>
793
794 PR c++/104432
795 * call.cc (build_new_method_call): When a non-dependent call
796 resolves to a specialization of a member template, always build
797 the pruned overload set using the member template, not the
798 specialization.
799 * pt.cc (filter_memfn_lookup): New parameter newtype. Simplify
800 and correct how members from the new lookup set are matched to
801 those from the old one.
802 (tsubst_baselink): Pass binfo_type as newtype to
803 filter_memfn_lookup.
804
8052022-02-09 Jason Merrill <jason@redhat.com>
806
807 PR c++/103752
808 * module.cc (trees_out::core_vals): Stream explicit specifier.
809 (trees_in::core_vals): Likewise.
810 * pt.cc (store_explicit_specifier): No longer static.
811 (tsubst_function_decl): Clear DECL_HAS_DEPENDENT_EXPLICIT_SPEC_P.
812 * cp-tree.h (lookup_explicit_specifier): Declare.
813
8142022-02-09 Jason Merrill <jason@redhat.com>
815
816 PR c++/96876
817 * typeck2.cc (split_nonconstant_init_1): Push cleanups for
818 preceding members with constant initialization.
819 (maybe_push_temp_cleanup): Do nothing if -fno-exceptions.
820
2a2fda2d
GA
8212022-02-08 Jakub Jelinek <jakub@redhat.com>
822
823 PR c++/104379
824 * name-lookup.cc (check_local_shadow): When diagnosing shadowing
825 of a member or global declaration, add warning suppression for
826 the decl and don't warn again on it.
827
8282022-02-08 Jakub Jelinek <jakub@redhat.com>
829
830 PR c++/104403
831 * constexpr.cc (cxx_eval_constant_expression): Don't assert DECL_EXPRs
832 of TREE_STATIC vars may only appear in -std=c++23.
833
8342022-02-08 Patrick Palka <ppalka@redhat.com>
835
836 PR c++/80951
837 * pt.cc (uses_deducible_template_parms): Consider the
838 noexcept-spec of a function type.
839
8402022-02-08 Patrick Palka <ppalka@redhat.com>
841
842 PR c++/104410
843 * constraint.cc (satisfaction_value): Relax assert to accept
844 cv-qualified bool.
845
8462022-02-08 Patrick Palka <ppalka@redhat.com>
847
848 PR c++/103706
849 * pt.cc (preserve_args): New function.
850 (tsubst_lambda_expr): Use it when setting LAMBDA_EXPR_REGEN_INFO.
851
8522022-02-08 Patrick Palka <ppalka@redhat.com>
853
854 PR c++/103706
855 * constraint.cc (satisfy_declaration_constraints): Use
856 lambda_regenerating_args instead.
857 * cp-tree.h (lambda_regenerating_args): Declare.
858 * pt.cc (lambda_regenerating_args): Define, split out from
859 satisfy_declaration_constraints.
860 (do_auto_deduction): Use lambda_regenerating_args to obtain the
861 full set of outer template arguments for satisfaction when
862 inside a lambda.
863
353f8fcc
GA
8642022-02-06 Patrick Palka <ppalka@redhat.com>
865
866 PR c++/96242
867 * decl2.cc (mark_used): Directly synthesize a DECL_MAYBE_DELETED
868 fn by calling maybe_synthesize_method instead of relying on
869 maybe_instantiate_noexcept. Move call to m_i_n after the
870 DECL_DELETED_FN handling.
871 * pt.cc (maybe_instantiate_noexcept): Restrict DECL_MAYBE_DELETED
872 fn synthesis to only those with an implicit noexcept-spec, and
873 return !DECL_DELETED_FN instead of !DECL_MAYBE_DELETED afterwards.
874
8752022-02-06 Jakub Jelinek <jakub@redhat.com>
876
877 PR c++/89074
878 PR c++/104033
879 * constexpr.cc (cxx_eval_binary_expression): Temporarily set
880 folding_cxx_constexpr.
881
661109b0
GA
8822022-02-05 Jason Merrill <jason@redhat.com>
883
884 PR c++/104300
885 PR c++/92385
886 * cp-tree.h (get_vec_init_expr): New.
887 (target_expr_needs_replace): New.
888 * cp-gimplify.cc (cp_gimplify_init_expr): Use it.
889 (struct cp_fold_data): New.
890 (cp_fold_r): Only genericize inits at end of fn.
891 (cp_fold_function): Here.
892 (cp_fully_fold_init): Not here.
893 * init.cc (build_vec_init): Use get_vec_init_expr.
894 * tree.cc (build_vec_init_expr): Likewise.
895 * typeck2.cc (split_nonconstant_init_1): Likewise.
896 (process_init_constructor): Wrap VEC_INIT_EXPR in
897 TARGET_EXPR.
898
8992022-02-05 Jason Merrill <jason@redhat.com>
900
901 * pt.cc (iterative_hash_template_arg): Add comment.
902
682ede39
GA
9032022-02-03 Patrick Palka <ppalka@redhat.com>
904
905 PR c++/104079
906 * pt.cc (value_dependent_noexcept_spec_p): New predicate split
907 out from ...
908 (dependent_type_p_r): ... here.
909 (instantiation_dependent_r): Use value_dependent_noexcept_spec_p
910 to consider dependence of a noexcept-spec before C++17.
911 * tree.cc (fixup_deferred_exception_variants): Clear
912 TYPE_DEPENDENT_P_VALID.
913
9142022-02-03 Jason Merrill <jason@redhat.com>
915
916 PR c++/104302
917 * decl.cc (maybe_deduce_size_from_array_init): Give up
918 on type-dependent init.
919 (cp_complete_array_type): Only call reshape_init for character
920 array.
921
ae7e4af9
GA
9222022-02-01 Jason Merrill <jason@redhat.com>
923
924 PR c++/103186
925 * pt.cc (defarg_inst): Use tree_vec_map_cache_hasher.
926 (defarg_insts_for): New.
927 (tsubst_default_argument): Adjust.
928
1bb52662
GA
9292022-01-31 Marek Polacek <polacek@redhat.com>
930
931 PR c++/102414
932 PR c++/101874
933 * decl.cc (create_array_type_for_decl): Use template_placeholder_p.
934 Sorry on a variable-length array of auto.
935
9362022-01-31 Marek Polacek <polacek@redhat.com>
937
938 PR c++/102434
939 * class.cc (finish_struct): Don't allow union initializer_list.
940
9412022-01-31 Patrick Palka <ppalka@redhat.com>
942
943 PR c++/104294
944 * pt.cc (ctor_deduction_guides_for): Correct computation of
945 outer_args.
946
9472022-01-31 Patrick Palka <ppalka@redhat.com>
948
949 PR c++/104291
950 * pt.cc (for_each_template_parm_r) <case CONSTRUCTOR>: Clear
951 walk_subtrees if !include_nondeduced_p. Simplify given that
952 cp_walk_subtrees already walks TYPE_PTRMEMFUNC_FN_TYPE_RAW.
953
f6f2d6cf
GA
9542022-01-28 Patrick Palka <ppalka@redhat.com>
955 Jason Merrill <jason@redhat.com>
956
957 PR c++/92752
958 * typeck.cc (build_ptrmemfunc): Cast a nullptr constant to the
959 unqualified pointer type not the qualified one.
960
9612022-01-28 Patrick Palka <ppalka@redhat.com>
962
963 PR c++/103341
964 * decl.cc (cp_finish_decl): Pass the template arguments of a
965 variable template specialization or a templated static data
966 member to do_auto_deduction when the auto is constrained.
967
9682022-01-28 Jason Merrill <jason@redhat.com>
969
970 PR c++/100198
971 PR c++/100030
972 PR c++/100282
973 * parser.cc (cp_parser_enumerator_definition): Sorry on parameter
974 pack in lambda.
975 (cp_parser_class_head): And in class attributes.
976 * pt.cc (check_for_bare_parameter_packs): Sorry instead of error
977 in lambda.
978
99f17e99
GA
9792022-01-27 Jason Merrill <jason@redhat.com>
980
981 PR c++/104245
982 PR c++/51344
983 * decl2.cc (save_template_attributes): Take late attrs as parm.
984 (cplus_decl_attributes): Call it after decl_attributes,
985 splice_template_attributes before.
986
9872022-01-27 Patrick Palka <ppalka@redhat.com>
988
989 PR c++/99895
990 * call.cc (build_over_call): For a non-dependent member call,
991 build up a CALL_EXPR using a COMPONENT_REF callee, as in
992 build_new_method_call.
993 * pt.cc (build_non_dependent_expr): Don't wrap PARM_DECL either.
994 * tree.cc (build_min_non_dep_op_overload): Adjust accordingly
995 after the build_over_call change.
996
9972022-01-27 Patrick Palka <ppalka@redhat.com>
998
999 PR c++/92944
1000 PR c++/103678
1001 * parser.cc (cp_parser_class_head): Update 'type' with the result
1002 of maybe_process_partial_specialization in the
1003 nested_name_specifier branch. Refactor nearby code to accomodate
1004 that maybe_process_partial_specialization returns a _TYPE, not a
1005 TYPE_DECL, and eliminate local variable 'class_type' in passing.
1006
10072022-01-27 Marek Polacek <polacek@redhat.com>
1008
1009 PR c++/101988
1010 * decl.cc (create_array_type_for_decl): Reject forming an array of
1011 placeholder for a deduced class type.
1012
eaa59070
GA
10132022-01-26 Jason Merrill <jason@redhat.com>
1014
1015 PR c++/104206
1016 PR c++/101072
1017 * semantics.cc (finish_compound_literal): Restore VECTOR_TYPE check.
1018
10192022-01-26 Jakub Jelinek <jakub@redhat.com>
1020
1021 PR c++/104226
1022 * constexpr.cc (init_subob_ctx): For vector ctors containing
1023 vector elements, ensure appending to the same ctor instead of
1024 creating another one.
1025
10262022-01-26 Marek Polacek <polacek@redhat.com>
1027
1028 PR target/104213
1029 * decl.cc (finish_constructor_body): Suppress -Wuse-after-free.
1030 (finish_destructor_body): Likewise.
1031 * optimize.cc (build_delete_destructor_body): Likewise.
1032
10332022-01-26 Jason Merrill <jason@redhat.com>
1034
1035 PR c++/104235
1036 * parser.cc (cp_parser_template_name): Repeat lookup of USING_DECL.
1037
10382022-01-26 Jason Merrill <jason@redhat.com>
1039
1040 PR c++/103057
1041 * pt.cc (tsubst_aggr_type): Call tsubst for alias template
1042 specialization.
1043
e0b8716f
GA
10442022-01-25 Patrick Palka <ppalka@redhat.com>
1045
1046 PR c++/101532
1047 PR c++/104225
1048 * decl2.cc (mark_used): Don't consider maybe_instantiate_noexcept
1049 on a deleted function.
1050
10512022-01-25 Jason Merrill <jason@redhat.com>
1052
1053 PR c++/59950
1054 * call.cc (build_over_call): Use cp_build_indirect_ref.
1055
bb99171b
GA
10562022-01-24 Patrick Palka <ppalka@redhat.com>
1057
1058 PR c++/104197
1059 * pt.cc (make_auto_1): Use -1 as a placeholder default argument
1060 for level.
1061
10622022-01-24 Patrick Palka <ppalka@redhat.com>
1063
1064 PR c++/104173
1065 * typeck.cc (build_class_member_access_expr): Extend
1066 unary_complex_lvalue result adjustment to preserve all
1067 rvalues, not just xvalues.
1068
0c940703
GA
10692022-01-23 Will Wray <wjwray@gmail.com>
1070
1071 PR c++/55227
1072 * decl.cc (reshape_init_r): Only call has_designator_check when
1073 first_initializer_p or for the inner constructor element.
1074 (cp_complete_array_type): Call reshape_init on braced-init-list.
1075
10762022-01-23 Jason Merrill <jason@redhat.com>
1077
1078 PR c++/104182
1079 * cp-gimplify.cc (cp_genericize_target_expr): Make sure nothing
1080 has set DECL_INITIAL on a TARGET_EXPR slot.
1081 * tree.cc (is_local_temp): Don't check DECL_CONTEXT.
1082
10832022-01-23 Jason Merrill <jason@redhat.com>
1084
1085 PR c++/101072
1086 * cp-tree.h (build_implicit_conv_flags): Declare.
1087 * call.cc (build_implicit_conv_flags): Split out from...
1088 (perform_implicit_conversion_flags): ...here.
1089 * decl.cc (check_initializer): Use it.
1090 * pt.cc (tsubst_copy_and_build): Remove TARGET_EXPR handling.
1091 * semantics.cc (finish_compound_literal): Don't treat
1092 scalar values like CONSTRUCTORs.
1093
9dd44357
GA
10942022-01-21 Jason Merrill <jason@redhat.com>
1095
1096 * semantics.cc (find_failing_clause): Return expr if not
1097 decomposable.
1098 (finish_static_assert): Show constant values in failing
1099 comparison.
1100
11012022-01-21 Jason Merrill <jason@redhat.com>
1102
1103 PR c++/104084
1104 PR c++/20040
1105 * init.cc (build_new_1): Only pull out TARGET_EXPR_INITIAL if
1106 alloc_expr is a TARGET_EXPR.
1107
11082022-01-21 Marek Polacek <polacek@redhat.com>
1109
1110 PR c++/101715
1111 * tree.cc (fixup_deferred_exception_variants): Remove duplicate
1112 variants after parsing the exception specifications.
1113
11142022-01-21 Jason Merrill <jason@redhat.com>
1115
1116 PR c++/104139
1117 PR c++/103681
1118 * class.cc (end_of_class): Use base_binfo.
1119
5fa55d55
GA
11202022-01-20 Jason Merrill <jason@redhat.com>
1121
1122 PR c++/101405
1123 * decl.cc (reshape_init_class): Reject designator for a member of
1124 another class.
1125
11262022-01-20 Patrick Palka <ppalka@redhat.com>
1127
1128 PR c++/91911
1129 PR c++/103672
1130 * pt.cc (keep_template_parm): Punt on a level 0 template parm.
1131 (tsubst_decl) <case VAR_DECL>: Remove !CHECKING_P safeguard.
1132 (tsubst) <case TEMPLATE_TYPE_PARM>: Handle CTAD placeholders
1133 specially.
1134 (make_auto_1): Add defaulted 'level' parameter.
1135 (make_template_placeholder): Pass 0 as 'level' to make_auto_1.
1136
11372022-01-20 Patrick Palka <ppalka@redhat.com>
1138
1139 * decl.cc (grokdeclarator): Diagnose a CTAD placeholder as
1140 function return type even when !funcdecl_p.
1141
11422022-01-20 Martin Liska <mliska@suse.cz>
1143
1144 PR c++/104134
1145 * error.cc (dump_aggr_type): Partially disable the warning.
1146
11472022-01-20 Jason Merrill <jason@redhat.com>
1148
1149 PR c++/102300
1150 * parser.cc (cp_parser_template_name): Use dependent_scope_p.
1151
fe1ad141
GA
11522022-01-19 David Malcolm <dmalcolm@redhat.com>
1153
1154 * cp-lang.cc (selftest::run_cp_tests): Update calls for .c to .cc
1155 renaming.
1156 * cp-tree.h (cp_pt_c_tests): Rename to...
1157 (cp_pt_cc_tests): ...this.
1158 (cp_tree_c_tests): Rename to...
1159 (cp_tree_cc_tests): ...this.
1160 * pt.cc (cp_pt_c_tests): Rename to...
1161 (cp_pt_cc_tests): ...this.
1162 * tree.cc (cp_tree_c_tests): Rename to...
1163 (cp_tree_cc_tests): ...this.
1164
11652022-01-19 Jason Merrill <jason@redhat.com>
1166
1167 * parser.cc (saved_token_sentinel::rollback): Use
1168 cp_lexer_previous_token.
1169
7a761ae6
GA
11702022-01-18 Jakub Jelinek <jakub@redhat.com>
1171
1172 PR c++/104055
1173 * constexpr.cc (cxx_eval_outermost_constant_expr): If t is a
1174 TARGET_EXPR with TARGET_EXPR_CLEANUP, use get_target_expr rather
1175 than get_target_expr_sfinae with tf_no_cleanup, and don't set
1176 TREE_CONSTANT.
1177
11782022-01-18 Jason Merrill <jason@redhat.com>
1179 Jakub Jelinek <jakub@redhat.com>
1180
1181 PR c++/104025
1182 * parser.cc (saved_token_sentinel::rollback): Call
1183 cp_lexer_set_source_position.
1184 (~saved_token_sentinel): Call rollback.
1185
11862022-01-18 Patrick Palka <ppalka@redhat.com>
1187
1188 PR c++/104074
1189 * pt.cc (invalid_nontype_parm_type_p): Use WILDCARD_TYPE_P so
1190 that we return false for DEPENDENT_OPERATOR_TYPE too.
1191
fc829782
GA
11922022-01-17 Martin Liska <mliska@suse.cz>
1193
1194 * Make-lang.in: Rename .c names to .cc.
1195 * config-lang.in: Likewise.
1196 * constexpr.cc (cxx_eval_constant_expression): Likewise.
1197 * coroutines.cc (morph_fn_to_coro): Likewise.
1198 * cp-gimplify.cc (cp_gimplify_expr): Likewise.
1199 * cp-lang.cc (struct lang_hooks): Likewise.
1200 (get_template_argument_pack_elems_folded): Likewise.
1201 * cp-objcp-common.cc (cp_tree_size): Likewise.
1202 (cp_unit_size_without_reusable_padding): Likewise.
1203 (pop_file_scope): Likewise.
1204 (cp_pushdecl): Likewise.
1205 * cp-objcp-common.h (GCC_CP_OBJCP_COMMON): Likewise.
1206 (cxx_simulate_record_decl): Likewise.
1207 * cp-tree.h (struct named_label_entry): Likewise.
1208 (current_function_return_value): Likewise.
1209 (more_aggr_init_expr_args_p): Likewise.
1210 (get_function_version_dispatcher): Likewise.
1211 (common_enclosing_class): Likewise.
1212 (strip_fnptr_conv): Likewise.
1213 (current_decl_namespace): Likewise.
1214 (do_aggregate_paren_init): Likewise.
1215 (cp_check_const_attributes): Likewise.
1216 (qualified_name_lookup_error): Likewise.
1217 (generic_targs_for): Likewise.
1218 (mark_exp_read): Likewise.
1219 (is_global_friend): Likewise.
1220 (maybe_reject_flexarray_init): Likewise.
1221 (module_token_lang): Likewise.
1222 (handle_module_option): Likewise.
1223 (literal_integer_zerop): Likewise.
1224 (build_extra_args): Likewise.
1225 (build_if_nonnull): Likewise.
1226 (maybe_check_overriding_exception_spec): Likewise.
1227 (finish_omp_target_clauses): Likewise.
1228 (maybe_warn_zero_as_null_pointer_constant): Likewise.
1229 (cxx_print_error_function): Likewise.
1230 (decl_in_std_namespace_p): Likewise.
1231 (merge_exception_specifiers): Likewise.
1232 (mangle_module_global_init): Likewise.
1233 (cxx_block_may_fallthru): Likewise.
1234 (fold_builtin_source_location): Likewise.
1235 (enum cp_oracle_request): Likewise.
1236 (subsumes): Likewise.
1237 (cp_finish_injected_record_type): Likewise.
1238 (vtv_build_vtable_verify_fndecl): Likewise.
1239 (cp_tree_c_finish_parsing): Likewise.
1240 * cvt.cc (diagnose_ref_binding): Likewise.
1241 (convert_to_void): Likewise.
1242 (convert_force): Likewise.
1243 (type_promotes_to): Likewise.
1244 * decl.cc (make_unbound_class_template_raw): Likewise.
1245 (cxx_init_decl_processing): Likewise.
1246 (check_class_member_definition_namespace): Likewise.
1247 (cxx_maybe_build_cleanup): Likewise.
1248 * decl2.cc (maybe_emit_vtables): Likewise.
1249 * error.cc (dump_function_name): Likewise.
1250 * init.cc (is_class_type): Likewise.
1251 (build_new_1): Likewise.
1252 * lang-specs.h: Likewise.
1253 * method.cc (make_alias_for_thunk): Likewise.
1254 * module.cc (specialization_add): Likewise.
1255 (module_state::read_cluster): Likewise.
1256 * name-lookup.cc (check_extern_c_conflict): Likewise.
1257 * name-lookup.h (struct cxx_binding): Likewise.
1258 * parser.cc (cp_parser_identifier): Likewise.
1259 * parser.h (struct cp_parser): Likewise.
1260 * pt.cc (has_value_dependent_address): Likewise.
1261 (push_tinst_level_loc): Likewise.
1262 * semantics.cc (finish_omp_clauses): Likewise.
1263 (finish_omp_atomic): Likewise.
1264 * tree.cc (cp_save_expr): Likewise.
1265 (cp_free_lang_data): Likewise.
1266 * typeck.cc (cp_common_type): Likewise.
1267 (strip_array_domain): Likewise.
1268 (rationalize_conditional_expr): Likewise.
1269 (check_return_expr): Likewise.
1270 * vtable-class-hierarchy.cc: Likewise.
1271
12722022-01-17 Martin Liska <mliska@suse.cz>
1273
1274 * call.c: Moved to...
1275 * call.cc: ...here.
1276 * class.c: Moved to...
1277 * class.cc: ...here.
1278 * constexpr.c: Moved to...
1279 * constexpr.cc: ...here.
1280 * cp-gimplify.c: Moved to...
1281 * cp-gimplify.cc: ...here.
1282 * cp-lang.c: Moved to...
1283 * cp-lang.cc: ...here.
1284 * cp-objcp-common.c: Moved to...
1285 * cp-objcp-common.cc: ...here.
1286 * cp-ubsan.c: Moved to...
1287 * cp-ubsan.cc: ...here.
1288 * cvt.c: Moved to...
1289 * cvt.cc: ...here.
1290 * cxx-pretty-print.c: Moved to...
1291 * cxx-pretty-print.cc: ...here.
1292 * decl.c: Moved to...
1293 * decl.cc: ...here.
1294 * decl2.c: Moved to...
1295 * decl2.cc: ...here.
1296 * dump.c: Moved to...
1297 * dump.cc: ...here.
1298 * error.c: Moved to...
1299 * error.cc: ...here.
1300 * except.c: Moved to...
1301 * except.cc: ...here.
1302 * expr.c: Moved to...
1303 * expr.cc: ...here.
1304 * friend.c: Moved to...
1305 * friend.cc: ...here.
1306 * g++spec.c: Moved to...
1307 * g++spec.cc: ...here.
1308 * init.c: Moved to...
1309 * init.cc: ...here.
1310 * lambda.c: Moved to...
1311 * lambda.cc: ...here.
1312 * lex.c: Moved to...
1313 * lex.cc: ...here.
1314 * mangle.c: Moved to...
1315 * mangle.cc: ...here.
1316 * method.c: Moved to...
1317 * method.cc: ...here.
1318 * name-lookup.c: Moved to...
1319 * name-lookup.cc: ...here.
1320 * optimize.c: Moved to...
1321 * optimize.cc: ...here.
1322 * parser.c: Moved to...
1323 * parser.cc: ...here.
1324 * pt.c: Moved to...
1325 * pt.cc: ...here.
1326 * ptree.c: Moved to...
1327 * ptree.cc: ...here.
1328 * rtti.c: Moved to...
1329 * rtti.cc: ...here.
1330 * search.c: Moved to...
1331 * search.cc: ...here.
1332 * semantics.c: Moved to...
1333 * semantics.cc: ...here.
1334 * tree.c: Moved to...
1335 * tree.cc: ...here.
1336 * typeck.c: Moved to...
1337 * typeck.cc: ...here.
1338 * typeck2.c: Moved to...
1339 * typeck2.cc: ...here.
1340 * vtable-class-hierarchy.c: Moved to...
1341 * vtable-class-hierarchy.cc: ...here.
1342
13432022-01-17 Jakub Jelinek <jakub@redhat.com>
1344
1345 PR c++/104031
1346 * cp-gimplify.c (cp_genericize_target_expr): Set DECL_CONTEXT of
1347 TARGET_EXPR_SLOT to current_function_decl if it was NULL.
1348
13492022-01-17 Andrew Stubbs <ams@codesourcery.com>
1350
1351 * parser.c (cp_parser_omp_requires): Don't "sorry" dynamic_allocators.
1352
617db51d
GA
13532022-01-14 Chung-Lin Tang <cltang@codesourcery.com>
1354
1355 PR c++/103705
1356 * semantics.c (finish_omp_clauses): Also continue peeling off of
1357 outer node for ARRAY_REFs.
1358
13592022-01-14 Jakub Jelinek <jakub@redhat.com>
1360
1361 PR c++/103991
1362 * cp-objcp-common.c (cxx_block_may_fallthru) <case IF_STMT>: For
1363 IF_STMT_CONSTEXPR_P with constant false or true condition only
1364 check if the taken clause may fall through.
1365 * cp-gimplify.c (genericize_if_stmt): For consteval if, revert
1366 to r12-5638^ behavior if then_ block can't fall through. For
1367 constexpr if, revert to r12-5638^ behavior.
1368
ad3f0d08
GA
13692022-01-13 Anthony Sharp <anthonysharp15@gmail.com>
1370 Jason Merrill <jason@redhat.com>
1371
1372 PR c++/70417
1373 * parser.c (cp_parser_id_expression): Handle
1374 -Wmissing-template-keyword.
1375 (struct saved_token_sentinel): Add modes to control what happens
1376 on destruction.
1377 (cp_parser_statement): Adjust.
1378 (cp_parser_skip_entire_template_parameter_list): New function that
1379 skips an entire template parameter list.
1380 (cp_parser_require_end_of_template_parameter_list): Rename old
1381 cp_parser_skip_to_end_of_template_parameter_list.
1382 (cp_parser_skip_to_end_of_template_parameter_list): Refactor to be
1383 called from one of the above two functions.
1384 (cp_parser_lambda_declarator_opt)
1385 (cp_parser_explicit_template_declaration)
1386 (cp_parser_enclosed_template_argument_list): Adjust.
1387
02a8a01b
GA
13882022-01-12 Jakub Jelinek <jakub@redhat.com>
1389 Jason Merrill <jason@redhat.com>
1390
1391 PR c++/103480
1392 * tree.c (move): If expr is xvalue_p, just return expr without
1393 build_static_cast.
1394
01a254e3
GA
13952022-01-11 Jakub Jelinek <jakub@redhat.com>
1396
1397 PR c++/101597
1398 * class.c (build_vfn_ref): Build OBJ_TYPE_REF with INTEGER_CST
1399 OBJ_TYPE_REF_TOKEN with type equal to OBJ_TYPE_REF_OBJECT type.
1400 * error.c (resolve_virtual_fun_from_obj_type_ref): Use type of
1401 OBJ_TYPE_REF_TOKEN rather than type of OBJ_TYPE_REF_OBJECT as
1402 obj_type.
1403
14042022-01-11 Patrick Palka <ppalka@redhat.com>
1405
1406 PR c++/103831
1407 * call.c (build_new_method_call): Consider dependent bases only
1408 if 'this' is available.
1409
14102022-01-11 Olivier Hainque <hainque@adacore.com>
1411
1412 * decl.c (cxx_init_decl_processing): Move code possibly
1413 altering flag_weak before code testing it.
1414
d9450aa0
GA
14152022-01-10 Patrick Palka <ppalka@redhat.com>
1416
1417 PR c++/103879
1418 * constexpr.c (cxx_fold_indirect_ref): Split out object/offset
1419 canonicalization step into a local lambda. Strengthen it to
1420 absorb more components at position 0. Use it before both calls
1421 to cxx_fold_indirect_ref_1.
1422
14232022-01-10 Patrick Palka <ppalka@redhat.com>
1424
1425 PR c++/103783
1426 * call.c (cand_parms_match): Skip over 'this' when given one
1427 static and one non-static member function.
1428
14292022-01-10 Jakub Jelinek <jakub@redhat.com>
1430
1431 PR c++/103912
1432 * semantics.c (expand_or_defer_fn): For immediate functions, set
1433 node->body_removed to true and clear analyzed, definition and
1434 force_output.
1435 * decl2.c (c_parse_final_cleanups): Ignore immediate functions for
1436 expand_or_defer_fn.
1437
2848ef14
GA
14382022-01-08 Jakub Jelinek <jakub@redhat.com>
1439
1440 PR c++/89074
1441 * constexpr.c (cxx_maybe_fold_addr_pointer_plus): New function.
1442 (cxx_eval_binary_expression): Use it.
1443
14442022-01-08 Jason Merrill <jason@redhat.com>
1445
1446 PR c++/103946
1447 * init.c (build_vec_init): Remove assert.
1448 * tree.c (build_vec_init_expr): Likewise.
1449
14502022-01-08 Jason Merrill <jason@redhat.com>
1451
1452 PR c++/100588
1453 * call.c (build_op_delete_call): Ignore destroying delete
1454 if alloc_fn.
1455
55e96bf9
GA
14562022-01-07 Jason Merrill <jason@redhat.com>
1457
1458 PR c++/20040
1459 * init.c (build_new_1): Also build pointer cleanup if
1460 TYPE_GETS_DELETE.
1461 * cp-tree.h (TYPE_GETS_VEC_DELETE): New.
1462
14632022-01-07 Jason Merrill <jason@redhat.com>
1464
1465 PR c++/103936
1466 PR c++/65591
1467 * cp-gimplify.c (cp_gimplify_expr): Restore VEC_INIT_EXPR handling.
1468
14692022-01-07 Jason Merrill <jason@redhat.com>
1470
1471 PR c++/103711
1472 * init.c (perform_target_ctor): Select destructor by in_chrg.
1473
14742022-01-07 Jason Merrill <jason@redhat.com>
1475
1476 PR c++/61611
1477 * except.c (in_nested_catch): New.
1478 (expand_end_catch_block): Check it.
1479
14802022-01-07 Jason Merrill <jason@redhat.com>
1481
1482 PR c++/33799
1483 PR c++/102191
1484 * except.c (maybe_splice_retval_cleanup): Check
1485 current_binding_level.
1486 * semantics.c (do_poplevel): Call it here.
1487 * parser.c (cp_parser_compound_statement): Not here.
1488
14892022-01-07 Jason Merrill <jason@redhat.com>
1490
1491 PR c++/53868
1492 * decl.c (cp_finish_decl): Use wrap_temporary_cleanups for
1493 cleanups from set_up_extended_ref_temp.
1494 (wrap_temporary_cleanups): Ignore array cleanups.
1495 (initialize_local_var): Don't check for array here.
1496 * cp-tree.h (BIND_EXPR_VEC_DTOR): New.
1497 * init.c (build_vec_delete_1): Set it.
1498
14992022-01-07 Jason Merrill <jason@redhat.com>
1500
1501 PR c++/66451
1502 * init.c (build_vec_delete_1): Handle throwing dtor.
1503 (build_vec_init): Tell it we're in a cleanup already.
1504
15052022-01-07 Jason Merrill <jason@redhat.com>
1506
1507 * typeck2.c (split_nonconstant_init_1): Don't cleanup the last elt.
1508 (split_nonconstant_init): Adjust.
1509
15102022-01-07 Jason Merrill <jason@redhat.com>
1511
1512 PR c++/66139
1513 PR c++/52320
1514 * constexpr.c (replace_decl): Rename from replace_result_decl.
1515 * cp-tree.h (replace_decl): Declare it.
1516 * cp-gimplify.c (cp_gimplify_init_expr): Call it.
1517 (cp_gimplify_expr): Don't handle VEC_INIT_EXPR.
1518 (cp_genericize_init, cp_genericize_init_expr)
1519 (cp_genericize_target_expr): New.
1520 (cp_fold_r): Call them.
1521 * tree.c (build_array_copy): Add a TARGET_EXPR.
1522 * typeck2.c (digest_init_r): Look through a TARGET_EXPR.
1523
15242022-01-07 Jason Merrill <jason@redhat.com>
1525
1526 PR c++/94041
1527 * decl.c (initialize_local_var): Fix comment.
1528 * init.c (build_new_1): Do stabilize array init.
1529 (build_vec_init): Use TARGET_EXPR for cleanup. Initialization
1530 of an element from an explicit initializer is not a
1531 full-expression.
1532 * tree.c (expand_vec_init_expr): Pass flags through.
1533 * typeck2.c (split_nonconstant_init_1): Handle VEC_INIT_EXPR.
1534 (split_nonconstant_init): Handle array cleanups.
1535 * cp-tree.h: Adjust.
1536
15372022-01-07 Jason Merrill <jason@redhat.com>
1538
1539 PR c++/94041
1540 * decl.c (check_initializer): Remove obsolete comment.
1541 (wrap_cleanups_r): Don't wrap CLEANUP_EH_ONLY.
1542 (initialize_local_var): Change assert to test.
1543 * typeck2.c (maybe_push_temp_cleanup): New.
1544 (split_nonconstant_init_1): Use it.
1545 (split_nonconstant_init): Clear cleanup flags.
1546
15472022-01-07 Jason Merrill <jason@redhat.com>
1548
1549 PR c++/92385
1550 * typeck2.c (PICFLAG_VEC_INIT): New.
1551 (process_init_constructor_array): Set it.
1552 (process_init_constructor): Handle it.
1553 (split_nonconstant_init_1): Handle VEC_INIT_EXPR.
1554 * init.c (build_vec_init): Likewise.
1555 * cp-gimplify.c (cp_gimplify_expr): Factor out...
1556 * tree.c (expand_vec_init_expr): ...this function.
1557 (build_vec_init_elt): Handle BRACE_ENCLOSED_INITIALIZER_P.
1558 (build_vec_init_expr): Likewise.
1559 * constexpr.c (cxx_eval_vec_init): Likewise.
1560 (reduced_constant_expression_p): Check arrays before C++20.
1561 * cp-tree.h (expand_vec_init_expr): Declare.
1562
15632022-01-07 Jason Merrill <jason@redhat.com>
1564
1565 * init.c (build_new_1): Remove preevaluation code.
1566
0fbefa25
GA
15672022-01-05 Nathan Sidwell <nathan@acm.org>
1568
1569 * pt.c (instantiate_class_template_1): Process attribute((used)) set
1570 in class's context.
1571
15722022-01-05 Nathan Sidwell <nathan@acm.org>
1573
1574 * init.c (build_new_1): Check complain before alignment warning.
1575
7d11b64b
GA
15762022-01-04 Jason Merrill <jason@redhat.com>
1577
1578 * cp-tree.h (class releasing_vec): Add begin/end fns.
1579
15802022-01-04 Jason Merrill <jason@redhat.com>
1581
1582 * init.c: Include -*- C++ -*- on first line.
1583
a4ae8c37
GA
15842022-01-03 Marek Polacek <polacek@redhat.com>
1585
1586 PR c++/103758
1587 * parser.c (cp_parser_decl_specifier_seq): Replace %<decl-specifier%>
1588 with %qD.
1589
15902022-01-03 Marek Polacek <polacek@redhat.com>
1591
1592 * parser.c (make_char_string_pack): Add a cast to const unsigned
1593 char *.
1594
15952022-01-03 Jakub Jelinek <jakub@redhat.com>
1596
1597 PR c++/103600
1598 * rtti.c (get_tinfo_decl_direct): Add "non overlapping" attribute
1599 to DECL_TINFO_P VAR_DECLs.
1600
5da23a13
GA
16012022-01-02 Jason Merrill <jason@redhat.com>
1602
1603 * init.c (build_vec_init): Append the decrement to elt_init.
1604
16052022-01-02 Jason Merrill <jason@redhat.com>
1606
1607 * decl.c (wrap_cleanups_r): Don't wrap if noexcept.
1608
ad41bd84 1609\f
6123f29a 1610Copyright (C) 2022 Free Software Foundation, Inc.
ad41bd84
JM
1611
1612Copying and distribution of this file, with or without modification,
1613are permitted in any medium without royalty provided the copyright
1614notice and this notice are preserved.