]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/cp/ChangeLog
Update -Warray-bounds documentation [PR104355].
[thirdparty/gcc.git] / gcc / cp / ChangeLog
CommitLineData
e8d68f0a
GA
12022-02-11 Jakub Jelinek <jakub@redhat.com>
2
3 PR c++/104472
4 * constexpr.cc (cxx_eval_internal_function) <case IFN_VEC_CONVERT>:
5 Only return fold_const_call result if it is non-NULL. Otherwise
6 fall through into the default: case to return t, set *non_constant_p
7 and emit diagnostics if needed.
8
a645583d
GA
92022-02-10 Jason Merrill <jason@redhat.com>
10
11 * module.cc (depset::hash::add_specializations): Use
12 STRIP_TEMPLATE.
13
142022-02-10 Tobias Burnus <tobias@codesourcery.com>
15
16 PR c++/102204
17 * decl2.cc (cp_omp_mappable_type_1): Remove check for virtual
18 members as those are permitted since OpenMP 5.0.
19
202022-02-10 Patrick Palka <ppalka@redhat.com>
21
22 * pt.cc (filter_memfn_lookup): Handle dependent USING_DECL
23 better.
24
252022-02-10 Marcel Vollweiler <marcel@codesourcery.com>
26
27 * parser.cc (cp_parser_omp_clause_name): Parse 'has_device_addr' clause.
28 (cp_parser_omp_var_list_no_open): Handle array sections.
29 (cp_parser_omp_all_clauses): Added PRAGMA_OMP_CLAUSE_HAS_DEVICE_ADDR
30 case.
31 (cp_parser_omp_target_update): Added HAS_DEVICE_ADDR to OMP_CLAUSE_MASK.
32 * semantics.cc (handle_omp_array_sections): Handle clause restrictions.
33 (finish_omp_clauses): Handle array sections.
34
3adf509f
GA
352022-02-09 Patrick Palka <ppalka@redhat.com>
36
37 PR c++/104432
38 * call.cc (build_new_method_call): When a non-dependent call
39 resolves to a specialization of a member template, always build
40 the pruned overload set using the member template, not the
41 specialization.
42 * pt.cc (filter_memfn_lookup): New parameter newtype. Simplify
43 and correct how members from the new lookup set are matched to
44 those from the old one.
45 (tsubst_baselink): Pass binfo_type as newtype to
46 filter_memfn_lookup.
47
482022-02-09 Jason Merrill <jason@redhat.com>
49
50 PR c++/103752
51 * module.cc (trees_out::core_vals): Stream explicit specifier.
52 (trees_in::core_vals): Likewise.
53 * pt.cc (store_explicit_specifier): No longer static.
54 (tsubst_function_decl): Clear DECL_HAS_DEPENDENT_EXPLICIT_SPEC_P.
55 * cp-tree.h (lookup_explicit_specifier): Declare.
56
572022-02-09 Jason Merrill <jason@redhat.com>
58
59 PR c++/96876
60 * typeck2.cc (split_nonconstant_init_1): Push cleanups for
61 preceding members with constant initialization.
62 (maybe_push_temp_cleanup): Do nothing if -fno-exceptions.
63
2a2fda2d
GA
642022-02-08 Jakub Jelinek <jakub@redhat.com>
65
66 PR c++/104379
67 * name-lookup.cc (check_local_shadow): When diagnosing shadowing
68 of a member or global declaration, add warning suppression for
69 the decl and don't warn again on it.
70
712022-02-08 Jakub Jelinek <jakub@redhat.com>
72
73 PR c++/104403
74 * constexpr.cc (cxx_eval_constant_expression): Don't assert DECL_EXPRs
75 of TREE_STATIC vars may only appear in -std=c++23.
76
772022-02-08 Patrick Palka <ppalka@redhat.com>
78
79 PR c++/80951
80 * pt.cc (uses_deducible_template_parms): Consider the
81 noexcept-spec of a function type.
82
832022-02-08 Patrick Palka <ppalka@redhat.com>
84
85 PR c++/104410
86 * constraint.cc (satisfaction_value): Relax assert to accept
87 cv-qualified bool.
88
892022-02-08 Patrick Palka <ppalka@redhat.com>
90
91 PR c++/103706
92 * pt.cc (preserve_args): New function.
93 (tsubst_lambda_expr): Use it when setting LAMBDA_EXPR_REGEN_INFO.
94
952022-02-08 Patrick Palka <ppalka@redhat.com>
96
97 PR c++/103706
98 * constraint.cc (satisfy_declaration_constraints): Use
99 lambda_regenerating_args instead.
100 * cp-tree.h (lambda_regenerating_args): Declare.
101 * pt.cc (lambda_regenerating_args): Define, split out from
102 satisfy_declaration_constraints.
103 (do_auto_deduction): Use lambda_regenerating_args to obtain the
104 full set of outer template arguments for satisfaction when
105 inside a lambda.
106
353f8fcc
GA
1072022-02-06 Patrick Palka <ppalka@redhat.com>
108
109 PR c++/96242
110 * decl2.cc (mark_used): Directly synthesize a DECL_MAYBE_DELETED
111 fn by calling maybe_synthesize_method instead of relying on
112 maybe_instantiate_noexcept. Move call to m_i_n after the
113 DECL_DELETED_FN handling.
114 * pt.cc (maybe_instantiate_noexcept): Restrict DECL_MAYBE_DELETED
115 fn synthesis to only those with an implicit noexcept-spec, and
116 return !DECL_DELETED_FN instead of !DECL_MAYBE_DELETED afterwards.
117
1182022-02-06 Jakub Jelinek <jakub@redhat.com>
119
120 PR c++/89074
121 PR c++/104033
122 * constexpr.cc (cxx_eval_binary_expression): Temporarily set
123 folding_cxx_constexpr.
124
661109b0
GA
1252022-02-05 Jason Merrill <jason@redhat.com>
126
127 PR c++/104300
128 PR c++/92385
129 * cp-tree.h (get_vec_init_expr): New.
130 (target_expr_needs_replace): New.
131 * cp-gimplify.cc (cp_gimplify_init_expr): Use it.
132 (struct cp_fold_data): New.
133 (cp_fold_r): Only genericize inits at end of fn.
134 (cp_fold_function): Here.
135 (cp_fully_fold_init): Not here.
136 * init.cc (build_vec_init): Use get_vec_init_expr.
137 * tree.cc (build_vec_init_expr): Likewise.
138 * typeck2.cc (split_nonconstant_init_1): Likewise.
139 (process_init_constructor): Wrap VEC_INIT_EXPR in
140 TARGET_EXPR.
141
1422022-02-05 Jason Merrill <jason@redhat.com>
143
144 * pt.cc (iterative_hash_template_arg): Add comment.
145
682ede39
GA
1462022-02-03 Patrick Palka <ppalka@redhat.com>
147
148 PR c++/104079
149 * pt.cc (value_dependent_noexcept_spec_p): New predicate split
150 out from ...
151 (dependent_type_p_r): ... here.
152 (instantiation_dependent_r): Use value_dependent_noexcept_spec_p
153 to consider dependence of a noexcept-spec before C++17.
154 * tree.cc (fixup_deferred_exception_variants): Clear
155 TYPE_DEPENDENT_P_VALID.
156
1572022-02-03 Jason Merrill <jason@redhat.com>
158
159 PR c++/104302
160 * decl.cc (maybe_deduce_size_from_array_init): Give up
161 on type-dependent init.
162 (cp_complete_array_type): Only call reshape_init for character
163 array.
164
ae7e4af9
GA
1652022-02-01 Jason Merrill <jason@redhat.com>
166
167 PR c++/103186
168 * pt.cc (defarg_inst): Use tree_vec_map_cache_hasher.
169 (defarg_insts_for): New.
170 (tsubst_default_argument): Adjust.
171
1bb52662
GA
1722022-01-31 Marek Polacek <polacek@redhat.com>
173
174 PR c++/102414
175 PR c++/101874
176 * decl.cc (create_array_type_for_decl): Use template_placeholder_p.
177 Sorry on a variable-length array of auto.
178
1792022-01-31 Marek Polacek <polacek@redhat.com>
180
181 PR c++/102434
182 * class.cc (finish_struct): Don't allow union initializer_list.
183
1842022-01-31 Patrick Palka <ppalka@redhat.com>
185
186 PR c++/104294
187 * pt.cc (ctor_deduction_guides_for): Correct computation of
188 outer_args.
189
1902022-01-31 Patrick Palka <ppalka@redhat.com>
191
192 PR c++/104291
193 * pt.cc (for_each_template_parm_r) <case CONSTRUCTOR>: Clear
194 walk_subtrees if !include_nondeduced_p. Simplify given that
195 cp_walk_subtrees already walks TYPE_PTRMEMFUNC_FN_TYPE_RAW.
196
f6f2d6cf
GA
1972022-01-28 Patrick Palka <ppalka@redhat.com>
198 Jason Merrill <jason@redhat.com>
199
200 PR c++/92752
201 * typeck.cc (build_ptrmemfunc): Cast a nullptr constant to the
202 unqualified pointer type not the qualified one.
203
2042022-01-28 Patrick Palka <ppalka@redhat.com>
205
206 PR c++/103341
207 * decl.cc (cp_finish_decl): Pass the template arguments of a
208 variable template specialization or a templated static data
209 member to do_auto_deduction when the auto is constrained.
210
2112022-01-28 Jason Merrill <jason@redhat.com>
212
213 PR c++/100198
214 PR c++/100030
215 PR c++/100282
216 * parser.cc (cp_parser_enumerator_definition): Sorry on parameter
217 pack in lambda.
218 (cp_parser_class_head): And in class attributes.
219 * pt.cc (check_for_bare_parameter_packs): Sorry instead of error
220 in lambda.
221
99f17e99
GA
2222022-01-27 Jason Merrill <jason@redhat.com>
223
224 PR c++/104245
225 PR c++/51344
226 * decl2.cc (save_template_attributes): Take late attrs as parm.
227 (cplus_decl_attributes): Call it after decl_attributes,
228 splice_template_attributes before.
229
2302022-01-27 Patrick Palka <ppalka@redhat.com>
231
232 PR c++/99895
233 * call.cc (build_over_call): For a non-dependent member call,
234 build up a CALL_EXPR using a COMPONENT_REF callee, as in
235 build_new_method_call.
236 * pt.cc (build_non_dependent_expr): Don't wrap PARM_DECL either.
237 * tree.cc (build_min_non_dep_op_overload): Adjust accordingly
238 after the build_over_call change.
239
2402022-01-27 Patrick Palka <ppalka@redhat.com>
241
242 PR c++/92944
243 PR c++/103678
244 * parser.cc (cp_parser_class_head): Update 'type' with the result
245 of maybe_process_partial_specialization in the
246 nested_name_specifier branch. Refactor nearby code to accomodate
247 that maybe_process_partial_specialization returns a _TYPE, not a
248 TYPE_DECL, and eliminate local variable 'class_type' in passing.
249
2502022-01-27 Marek Polacek <polacek@redhat.com>
251
252 PR c++/101988
253 * decl.cc (create_array_type_for_decl): Reject forming an array of
254 placeholder for a deduced class type.
255
eaa59070
GA
2562022-01-26 Jason Merrill <jason@redhat.com>
257
258 PR c++/104206
259 PR c++/101072
260 * semantics.cc (finish_compound_literal): Restore VECTOR_TYPE check.
261
2622022-01-26 Jakub Jelinek <jakub@redhat.com>
263
264 PR c++/104226
265 * constexpr.cc (init_subob_ctx): For vector ctors containing
266 vector elements, ensure appending to the same ctor instead of
267 creating another one.
268
2692022-01-26 Marek Polacek <polacek@redhat.com>
270
271 PR target/104213
272 * decl.cc (finish_constructor_body): Suppress -Wuse-after-free.
273 (finish_destructor_body): Likewise.
274 * optimize.cc (build_delete_destructor_body): Likewise.
275
2762022-01-26 Jason Merrill <jason@redhat.com>
277
278 PR c++/104235
279 * parser.cc (cp_parser_template_name): Repeat lookup of USING_DECL.
280
2812022-01-26 Jason Merrill <jason@redhat.com>
282
283 PR c++/103057
284 * pt.cc (tsubst_aggr_type): Call tsubst for alias template
285 specialization.
286
e0b8716f
GA
2872022-01-25 Patrick Palka <ppalka@redhat.com>
288
289 PR c++/101532
290 PR c++/104225
291 * decl2.cc (mark_used): Don't consider maybe_instantiate_noexcept
292 on a deleted function.
293
2942022-01-25 Jason Merrill <jason@redhat.com>
295
296 PR c++/59950
297 * call.cc (build_over_call): Use cp_build_indirect_ref.
298
bb99171b
GA
2992022-01-24 Patrick Palka <ppalka@redhat.com>
300
301 PR c++/104197
302 * pt.cc (make_auto_1): Use -1 as a placeholder default argument
303 for level.
304
3052022-01-24 Patrick Palka <ppalka@redhat.com>
306
307 PR c++/104173
308 * typeck.cc (build_class_member_access_expr): Extend
309 unary_complex_lvalue result adjustment to preserve all
310 rvalues, not just xvalues.
311
0c940703
GA
3122022-01-23 Will Wray <wjwray@gmail.com>
313
314 PR c++/55227
315 * decl.cc (reshape_init_r): Only call has_designator_check when
316 first_initializer_p or for the inner constructor element.
317 (cp_complete_array_type): Call reshape_init on braced-init-list.
318
3192022-01-23 Jason Merrill <jason@redhat.com>
320
321 PR c++/104182
322 * cp-gimplify.cc (cp_genericize_target_expr): Make sure nothing
323 has set DECL_INITIAL on a TARGET_EXPR slot.
324 * tree.cc (is_local_temp): Don't check DECL_CONTEXT.
325
3262022-01-23 Jason Merrill <jason@redhat.com>
327
328 PR c++/101072
329 * cp-tree.h (build_implicit_conv_flags): Declare.
330 * call.cc (build_implicit_conv_flags): Split out from...
331 (perform_implicit_conversion_flags): ...here.
332 * decl.cc (check_initializer): Use it.
333 * pt.cc (tsubst_copy_and_build): Remove TARGET_EXPR handling.
334 * semantics.cc (finish_compound_literal): Don't treat
335 scalar values like CONSTRUCTORs.
336
9dd44357
GA
3372022-01-21 Jason Merrill <jason@redhat.com>
338
339 * semantics.cc (find_failing_clause): Return expr if not
340 decomposable.
341 (finish_static_assert): Show constant values in failing
342 comparison.
343
3442022-01-21 Jason Merrill <jason@redhat.com>
345
346 PR c++/104084
347 PR c++/20040
348 * init.cc (build_new_1): Only pull out TARGET_EXPR_INITIAL if
349 alloc_expr is a TARGET_EXPR.
350
3512022-01-21 Marek Polacek <polacek@redhat.com>
352
353 PR c++/101715
354 * tree.cc (fixup_deferred_exception_variants): Remove duplicate
355 variants after parsing the exception specifications.
356
3572022-01-21 Jason Merrill <jason@redhat.com>
358
359 PR c++/104139
360 PR c++/103681
361 * class.cc (end_of_class): Use base_binfo.
362
5fa55d55
GA
3632022-01-20 Jason Merrill <jason@redhat.com>
364
365 PR c++/101405
366 * decl.cc (reshape_init_class): Reject designator for a member of
367 another class.
368
3692022-01-20 Patrick Palka <ppalka@redhat.com>
370
371 PR c++/91911
372 PR c++/103672
373 * pt.cc (keep_template_parm): Punt on a level 0 template parm.
374 (tsubst_decl) <case VAR_DECL>: Remove !CHECKING_P safeguard.
375 (tsubst) <case TEMPLATE_TYPE_PARM>: Handle CTAD placeholders
376 specially.
377 (make_auto_1): Add defaulted 'level' parameter.
378 (make_template_placeholder): Pass 0 as 'level' to make_auto_1.
379
3802022-01-20 Patrick Palka <ppalka@redhat.com>
381
382 * decl.cc (grokdeclarator): Diagnose a CTAD placeholder as
383 function return type even when !funcdecl_p.
384
3852022-01-20 Martin Liska <mliska@suse.cz>
386
387 PR c++/104134
388 * error.cc (dump_aggr_type): Partially disable the warning.
389
3902022-01-20 Jason Merrill <jason@redhat.com>
391
392 PR c++/102300
393 * parser.cc (cp_parser_template_name): Use dependent_scope_p.
394
fe1ad141
GA
3952022-01-19 David Malcolm <dmalcolm@redhat.com>
396
397 * cp-lang.cc (selftest::run_cp_tests): Update calls for .c to .cc
398 renaming.
399 * cp-tree.h (cp_pt_c_tests): Rename to...
400 (cp_pt_cc_tests): ...this.
401 (cp_tree_c_tests): Rename to...
402 (cp_tree_cc_tests): ...this.
403 * pt.cc (cp_pt_c_tests): Rename to...
404 (cp_pt_cc_tests): ...this.
405 * tree.cc (cp_tree_c_tests): Rename to...
406 (cp_tree_cc_tests): ...this.
407
4082022-01-19 Jason Merrill <jason@redhat.com>
409
410 * parser.cc (saved_token_sentinel::rollback): Use
411 cp_lexer_previous_token.
412
7a761ae6
GA
4132022-01-18 Jakub Jelinek <jakub@redhat.com>
414
415 PR c++/104055
416 * constexpr.cc (cxx_eval_outermost_constant_expr): If t is a
417 TARGET_EXPR with TARGET_EXPR_CLEANUP, use get_target_expr rather
418 than get_target_expr_sfinae with tf_no_cleanup, and don't set
419 TREE_CONSTANT.
420
4212022-01-18 Jason Merrill <jason@redhat.com>
422 Jakub Jelinek <jakub@redhat.com>
423
424 PR c++/104025
425 * parser.cc (saved_token_sentinel::rollback): Call
426 cp_lexer_set_source_position.
427 (~saved_token_sentinel): Call rollback.
428
4292022-01-18 Patrick Palka <ppalka@redhat.com>
430
431 PR c++/104074
432 * pt.cc (invalid_nontype_parm_type_p): Use WILDCARD_TYPE_P so
433 that we return false for DEPENDENT_OPERATOR_TYPE too.
434
fc829782
GA
4352022-01-17 Martin Liska <mliska@suse.cz>
436
437 * Make-lang.in: Rename .c names to .cc.
438 * config-lang.in: Likewise.
439 * constexpr.cc (cxx_eval_constant_expression): Likewise.
440 * coroutines.cc (morph_fn_to_coro): Likewise.
441 * cp-gimplify.cc (cp_gimplify_expr): Likewise.
442 * cp-lang.cc (struct lang_hooks): Likewise.
443 (get_template_argument_pack_elems_folded): Likewise.
444 * cp-objcp-common.cc (cp_tree_size): Likewise.
445 (cp_unit_size_without_reusable_padding): Likewise.
446 (pop_file_scope): Likewise.
447 (cp_pushdecl): Likewise.
448 * cp-objcp-common.h (GCC_CP_OBJCP_COMMON): Likewise.
449 (cxx_simulate_record_decl): Likewise.
450 * cp-tree.h (struct named_label_entry): Likewise.
451 (current_function_return_value): Likewise.
452 (more_aggr_init_expr_args_p): Likewise.
453 (get_function_version_dispatcher): Likewise.
454 (common_enclosing_class): Likewise.
455 (strip_fnptr_conv): Likewise.
456 (current_decl_namespace): Likewise.
457 (do_aggregate_paren_init): Likewise.
458 (cp_check_const_attributes): Likewise.
459 (qualified_name_lookup_error): Likewise.
460 (generic_targs_for): Likewise.
461 (mark_exp_read): Likewise.
462 (is_global_friend): Likewise.
463 (maybe_reject_flexarray_init): Likewise.
464 (module_token_lang): Likewise.
465 (handle_module_option): Likewise.
466 (literal_integer_zerop): Likewise.
467 (build_extra_args): Likewise.
468 (build_if_nonnull): Likewise.
469 (maybe_check_overriding_exception_spec): Likewise.
470 (finish_omp_target_clauses): Likewise.
471 (maybe_warn_zero_as_null_pointer_constant): Likewise.
472 (cxx_print_error_function): Likewise.
473 (decl_in_std_namespace_p): Likewise.
474 (merge_exception_specifiers): Likewise.
475 (mangle_module_global_init): Likewise.
476 (cxx_block_may_fallthru): Likewise.
477 (fold_builtin_source_location): Likewise.
478 (enum cp_oracle_request): Likewise.
479 (subsumes): Likewise.
480 (cp_finish_injected_record_type): Likewise.
481 (vtv_build_vtable_verify_fndecl): Likewise.
482 (cp_tree_c_finish_parsing): Likewise.
483 * cvt.cc (diagnose_ref_binding): Likewise.
484 (convert_to_void): Likewise.
485 (convert_force): Likewise.
486 (type_promotes_to): Likewise.
487 * decl.cc (make_unbound_class_template_raw): Likewise.
488 (cxx_init_decl_processing): Likewise.
489 (check_class_member_definition_namespace): Likewise.
490 (cxx_maybe_build_cleanup): Likewise.
491 * decl2.cc (maybe_emit_vtables): Likewise.
492 * error.cc (dump_function_name): Likewise.
493 * init.cc (is_class_type): Likewise.
494 (build_new_1): Likewise.
495 * lang-specs.h: Likewise.
496 * method.cc (make_alias_for_thunk): Likewise.
497 * module.cc (specialization_add): Likewise.
498 (module_state::read_cluster): Likewise.
499 * name-lookup.cc (check_extern_c_conflict): Likewise.
500 * name-lookup.h (struct cxx_binding): Likewise.
501 * parser.cc (cp_parser_identifier): Likewise.
502 * parser.h (struct cp_parser): Likewise.
503 * pt.cc (has_value_dependent_address): Likewise.
504 (push_tinst_level_loc): Likewise.
505 * semantics.cc (finish_omp_clauses): Likewise.
506 (finish_omp_atomic): Likewise.
507 * tree.cc (cp_save_expr): Likewise.
508 (cp_free_lang_data): Likewise.
509 * typeck.cc (cp_common_type): Likewise.
510 (strip_array_domain): Likewise.
511 (rationalize_conditional_expr): Likewise.
512 (check_return_expr): Likewise.
513 * vtable-class-hierarchy.cc: Likewise.
514
5152022-01-17 Martin Liska <mliska@suse.cz>
516
517 * call.c: Moved to...
518 * call.cc: ...here.
519 * class.c: Moved to...
520 * class.cc: ...here.
521 * constexpr.c: Moved to...
522 * constexpr.cc: ...here.
523 * cp-gimplify.c: Moved to...
524 * cp-gimplify.cc: ...here.
525 * cp-lang.c: Moved to...
526 * cp-lang.cc: ...here.
527 * cp-objcp-common.c: Moved to...
528 * cp-objcp-common.cc: ...here.
529 * cp-ubsan.c: Moved to...
530 * cp-ubsan.cc: ...here.
531 * cvt.c: Moved to...
532 * cvt.cc: ...here.
533 * cxx-pretty-print.c: Moved to...
534 * cxx-pretty-print.cc: ...here.
535 * decl.c: Moved to...
536 * decl.cc: ...here.
537 * decl2.c: Moved to...
538 * decl2.cc: ...here.
539 * dump.c: Moved to...
540 * dump.cc: ...here.
541 * error.c: Moved to...
542 * error.cc: ...here.
543 * except.c: Moved to...
544 * except.cc: ...here.
545 * expr.c: Moved to...
546 * expr.cc: ...here.
547 * friend.c: Moved to...
548 * friend.cc: ...here.
549 * g++spec.c: Moved to...
550 * g++spec.cc: ...here.
551 * init.c: Moved to...
552 * init.cc: ...here.
553 * lambda.c: Moved to...
554 * lambda.cc: ...here.
555 * lex.c: Moved to...
556 * lex.cc: ...here.
557 * mangle.c: Moved to...
558 * mangle.cc: ...here.
559 * method.c: Moved to...
560 * method.cc: ...here.
561 * name-lookup.c: Moved to...
562 * name-lookup.cc: ...here.
563 * optimize.c: Moved to...
564 * optimize.cc: ...here.
565 * parser.c: Moved to...
566 * parser.cc: ...here.
567 * pt.c: Moved to...
568 * pt.cc: ...here.
569 * ptree.c: Moved to...
570 * ptree.cc: ...here.
571 * rtti.c: Moved to...
572 * rtti.cc: ...here.
573 * search.c: Moved to...
574 * search.cc: ...here.
575 * semantics.c: Moved to...
576 * semantics.cc: ...here.
577 * tree.c: Moved to...
578 * tree.cc: ...here.
579 * typeck.c: Moved to...
580 * typeck.cc: ...here.
581 * typeck2.c: Moved to...
582 * typeck2.cc: ...here.
583 * vtable-class-hierarchy.c: Moved to...
584 * vtable-class-hierarchy.cc: ...here.
585
5862022-01-17 Jakub Jelinek <jakub@redhat.com>
587
588 PR c++/104031
589 * cp-gimplify.c (cp_genericize_target_expr): Set DECL_CONTEXT of
590 TARGET_EXPR_SLOT to current_function_decl if it was NULL.
591
5922022-01-17 Andrew Stubbs <ams@codesourcery.com>
593
594 * parser.c (cp_parser_omp_requires): Don't "sorry" dynamic_allocators.
595
617db51d
GA
5962022-01-14 Chung-Lin Tang <cltang@codesourcery.com>
597
598 PR c++/103705
599 * semantics.c (finish_omp_clauses): Also continue peeling off of
600 outer node for ARRAY_REFs.
601
6022022-01-14 Jakub Jelinek <jakub@redhat.com>
603
604 PR c++/103991
605 * cp-objcp-common.c (cxx_block_may_fallthru) <case IF_STMT>: For
606 IF_STMT_CONSTEXPR_P with constant false or true condition only
607 check if the taken clause may fall through.
608 * cp-gimplify.c (genericize_if_stmt): For consteval if, revert
609 to r12-5638^ behavior if then_ block can't fall through. For
610 constexpr if, revert to r12-5638^ behavior.
611
ad3f0d08
GA
6122022-01-13 Anthony Sharp <anthonysharp15@gmail.com>
613 Jason Merrill <jason@redhat.com>
614
615 PR c++/70417
616 * parser.c (cp_parser_id_expression): Handle
617 -Wmissing-template-keyword.
618 (struct saved_token_sentinel): Add modes to control what happens
619 on destruction.
620 (cp_parser_statement): Adjust.
621 (cp_parser_skip_entire_template_parameter_list): New function that
622 skips an entire template parameter list.
623 (cp_parser_require_end_of_template_parameter_list): Rename old
624 cp_parser_skip_to_end_of_template_parameter_list.
625 (cp_parser_skip_to_end_of_template_parameter_list): Refactor to be
626 called from one of the above two functions.
627 (cp_parser_lambda_declarator_opt)
628 (cp_parser_explicit_template_declaration)
629 (cp_parser_enclosed_template_argument_list): Adjust.
630
02a8a01b
GA
6312022-01-12 Jakub Jelinek <jakub@redhat.com>
632 Jason Merrill <jason@redhat.com>
633
634 PR c++/103480
635 * tree.c (move): If expr is xvalue_p, just return expr without
636 build_static_cast.
637
01a254e3
GA
6382022-01-11 Jakub Jelinek <jakub@redhat.com>
639
640 PR c++/101597
641 * class.c (build_vfn_ref): Build OBJ_TYPE_REF with INTEGER_CST
642 OBJ_TYPE_REF_TOKEN with type equal to OBJ_TYPE_REF_OBJECT type.
643 * error.c (resolve_virtual_fun_from_obj_type_ref): Use type of
644 OBJ_TYPE_REF_TOKEN rather than type of OBJ_TYPE_REF_OBJECT as
645 obj_type.
646
6472022-01-11 Patrick Palka <ppalka@redhat.com>
648
649 PR c++/103831
650 * call.c (build_new_method_call): Consider dependent bases only
651 if 'this' is available.
652
6532022-01-11 Olivier Hainque <hainque@adacore.com>
654
655 * decl.c (cxx_init_decl_processing): Move code possibly
656 altering flag_weak before code testing it.
657
d9450aa0
GA
6582022-01-10 Patrick Palka <ppalka@redhat.com>
659
660 PR c++/103879
661 * constexpr.c (cxx_fold_indirect_ref): Split out object/offset
662 canonicalization step into a local lambda. Strengthen it to
663 absorb more components at position 0. Use it before both calls
664 to cxx_fold_indirect_ref_1.
665
6662022-01-10 Patrick Palka <ppalka@redhat.com>
667
668 PR c++/103783
669 * call.c (cand_parms_match): Skip over 'this' when given one
670 static and one non-static member function.
671
6722022-01-10 Jakub Jelinek <jakub@redhat.com>
673
674 PR c++/103912
675 * semantics.c (expand_or_defer_fn): For immediate functions, set
676 node->body_removed to true and clear analyzed, definition and
677 force_output.
678 * decl2.c (c_parse_final_cleanups): Ignore immediate functions for
679 expand_or_defer_fn.
680
2848ef14
GA
6812022-01-08 Jakub Jelinek <jakub@redhat.com>
682
683 PR c++/89074
684 * constexpr.c (cxx_maybe_fold_addr_pointer_plus): New function.
685 (cxx_eval_binary_expression): Use it.
686
6872022-01-08 Jason Merrill <jason@redhat.com>
688
689 PR c++/103946
690 * init.c (build_vec_init): Remove assert.
691 * tree.c (build_vec_init_expr): Likewise.
692
6932022-01-08 Jason Merrill <jason@redhat.com>
694
695 PR c++/100588
696 * call.c (build_op_delete_call): Ignore destroying delete
697 if alloc_fn.
698
55e96bf9
GA
6992022-01-07 Jason Merrill <jason@redhat.com>
700
701 PR c++/20040
702 * init.c (build_new_1): Also build pointer cleanup if
703 TYPE_GETS_DELETE.
704 * cp-tree.h (TYPE_GETS_VEC_DELETE): New.
705
7062022-01-07 Jason Merrill <jason@redhat.com>
707
708 PR c++/103936
709 PR c++/65591
710 * cp-gimplify.c (cp_gimplify_expr): Restore VEC_INIT_EXPR handling.
711
7122022-01-07 Jason Merrill <jason@redhat.com>
713
714 PR c++/103711
715 * init.c (perform_target_ctor): Select destructor by in_chrg.
716
7172022-01-07 Jason Merrill <jason@redhat.com>
718
719 PR c++/61611
720 * except.c (in_nested_catch): New.
721 (expand_end_catch_block): Check it.
722
7232022-01-07 Jason Merrill <jason@redhat.com>
724
725 PR c++/33799
726 PR c++/102191
727 * except.c (maybe_splice_retval_cleanup): Check
728 current_binding_level.
729 * semantics.c (do_poplevel): Call it here.
730 * parser.c (cp_parser_compound_statement): Not here.
731
7322022-01-07 Jason Merrill <jason@redhat.com>
733
734 PR c++/53868
735 * decl.c (cp_finish_decl): Use wrap_temporary_cleanups for
736 cleanups from set_up_extended_ref_temp.
737 (wrap_temporary_cleanups): Ignore array cleanups.
738 (initialize_local_var): Don't check for array here.
739 * cp-tree.h (BIND_EXPR_VEC_DTOR): New.
740 * init.c (build_vec_delete_1): Set it.
741
7422022-01-07 Jason Merrill <jason@redhat.com>
743
744 PR c++/66451
745 * init.c (build_vec_delete_1): Handle throwing dtor.
746 (build_vec_init): Tell it we're in a cleanup already.
747
7482022-01-07 Jason Merrill <jason@redhat.com>
749
750 * typeck2.c (split_nonconstant_init_1): Don't cleanup the last elt.
751 (split_nonconstant_init): Adjust.
752
7532022-01-07 Jason Merrill <jason@redhat.com>
754
755 PR c++/66139
756 PR c++/52320
757 * constexpr.c (replace_decl): Rename from replace_result_decl.
758 * cp-tree.h (replace_decl): Declare it.
759 * cp-gimplify.c (cp_gimplify_init_expr): Call it.
760 (cp_gimplify_expr): Don't handle VEC_INIT_EXPR.
761 (cp_genericize_init, cp_genericize_init_expr)
762 (cp_genericize_target_expr): New.
763 (cp_fold_r): Call them.
764 * tree.c (build_array_copy): Add a TARGET_EXPR.
765 * typeck2.c (digest_init_r): Look through a TARGET_EXPR.
766
7672022-01-07 Jason Merrill <jason@redhat.com>
768
769 PR c++/94041
770 * decl.c (initialize_local_var): Fix comment.
771 * init.c (build_new_1): Do stabilize array init.
772 (build_vec_init): Use TARGET_EXPR for cleanup. Initialization
773 of an element from an explicit initializer is not a
774 full-expression.
775 * tree.c (expand_vec_init_expr): Pass flags through.
776 * typeck2.c (split_nonconstant_init_1): Handle VEC_INIT_EXPR.
777 (split_nonconstant_init): Handle array cleanups.
778 * cp-tree.h: Adjust.
779
7802022-01-07 Jason Merrill <jason@redhat.com>
781
782 PR c++/94041
783 * decl.c (check_initializer): Remove obsolete comment.
784 (wrap_cleanups_r): Don't wrap CLEANUP_EH_ONLY.
785 (initialize_local_var): Change assert to test.
786 * typeck2.c (maybe_push_temp_cleanup): New.
787 (split_nonconstant_init_1): Use it.
788 (split_nonconstant_init): Clear cleanup flags.
789
7902022-01-07 Jason Merrill <jason@redhat.com>
791
792 PR c++/92385
793 * typeck2.c (PICFLAG_VEC_INIT): New.
794 (process_init_constructor_array): Set it.
795 (process_init_constructor): Handle it.
796 (split_nonconstant_init_1): Handle VEC_INIT_EXPR.
797 * init.c (build_vec_init): Likewise.
798 * cp-gimplify.c (cp_gimplify_expr): Factor out...
799 * tree.c (expand_vec_init_expr): ...this function.
800 (build_vec_init_elt): Handle BRACE_ENCLOSED_INITIALIZER_P.
801 (build_vec_init_expr): Likewise.
802 * constexpr.c (cxx_eval_vec_init): Likewise.
803 (reduced_constant_expression_p): Check arrays before C++20.
804 * cp-tree.h (expand_vec_init_expr): Declare.
805
8062022-01-07 Jason Merrill <jason@redhat.com>
807
808 * init.c (build_new_1): Remove preevaluation code.
809
0fbefa25
GA
8102022-01-05 Nathan Sidwell <nathan@acm.org>
811
812 * pt.c (instantiate_class_template_1): Process attribute((used)) set
813 in class's context.
814
8152022-01-05 Nathan Sidwell <nathan@acm.org>
816
817 * init.c (build_new_1): Check complain before alignment warning.
818
7d11b64b
GA
8192022-01-04 Jason Merrill <jason@redhat.com>
820
821 * cp-tree.h (class releasing_vec): Add begin/end fns.
822
8232022-01-04 Jason Merrill <jason@redhat.com>
824
825 * init.c: Include -*- C++ -*- on first line.
826
a4ae8c37
GA
8272022-01-03 Marek Polacek <polacek@redhat.com>
828
829 PR c++/103758
830 * parser.c (cp_parser_decl_specifier_seq): Replace %<decl-specifier%>
831 with %qD.
832
8332022-01-03 Marek Polacek <polacek@redhat.com>
834
835 * parser.c (make_char_string_pack): Add a cast to const unsigned
836 char *.
837
8382022-01-03 Jakub Jelinek <jakub@redhat.com>
839
840 PR c++/103600
841 * rtti.c (get_tinfo_decl_direct): Add "non overlapping" attribute
842 to DECL_TINFO_P VAR_DECLs.
843
5da23a13
GA
8442022-01-02 Jason Merrill <jason@redhat.com>
845
846 * init.c (build_vec_init): Append the decrement to elt_init.
847
8482022-01-02 Jason Merrill <jason@redhat.com>
849
850 * decl.c (wrap_cleanups_r): Don't wrap if noexcept.
851
ad41bd84 852\f
6123f29a 853Copyright (C) 2022 Free Software Foundation, Inc.
ad41bd84
JM
854
855Copying and distribution of this file, with or without modification,
856are permitted in any medium without royalty provided the copyright
857notice and this notice are preserved.