]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/cp/ChangeLog
PR modula2/114565 progress trace would be useful to isolate ICE for users
[thirdparty/gcc.git] / gcc / cp / ChangeLog
CommitLineData
0454eec3
GA
12024-04-01 Jason Merrill <jason@redhat.com>
2
3 * typeck.cc (maybe_warn_about_returning_address_of_local):
4 Permerror in C++26.
5
63e6ec53
GA
62024-03-28 Jason Merrill <jason@redhat.com>
7
8 PR c++/100667
9 * semantics.cc (same_type_ref_bind_p): New.
10 (finish_trait_expr): Use it.
11
4b8e7b57
GA
122024-03-26 Jakub Jelinek <jakub@redhat.com>
13
14 PR c++/112724
15 * error.cc (dump_expr): Handle EXCESS_PRECISION_EXPR like NOP_EXPR.
16
7e6cdec4
GA
172024-03-25 Marek Polacek <polacek@redhat.com>
18
19 PR c++/114349
20 * name-lookup.cc (maybe_push_to_top_level): For a non-lambda,
21 don't push to top level if decl_function_context is non-null.
22 * pt.cc (maybe_instantiate_noexcept): Use maybe_push_to_top_level.
23
242024-03-25 Marek Polacek <polacek@redhat.com>
25
26 PR c++/114439
27 * init.cc (can_init_array_with_p): Return true for a VEC_INIT_EXPR
28 wrapped in a TARGET_EXPR.
29
e8985864
GA
302024-03-22 Marek Polacek <polacek@redhat.com>
31
32 PR c++/59465
33 * init.cc (can_init_array_with_p): New.
34 (perform_member_init): Check it.
35
44b79ab6
GA
362024-03-21 Marek Polacek <polacek@redhat.com>
37
38 PR c++/110323
39 * decl2.cc (min_vis_expr_r) <case VAR_DECL>: Do nothing for
40 decl_constant_var_p VAR_DECLs.
41
af376184
GA
422024-03-20 Jakub Jelinek <jakub@redhat.com>
43
44 * coroutines.cc (expand_one_await_expression): Use
45 integer_zero_node instead of build_int_cst (integer_type_node, 0)
46 and integer_one_node instead of build_int_cst (integer_type_node, 1).
47
cc606a91
GA
482024-03-19 Nathaniel Shead <nathanieloshead@gmail.com>
49
50 * cp-tree.h (module_maybe_has_cmi_p): New function.
51 * decl.cc (grokfndecl): Mark block-scope functions as public if
52 they could be visible in other TUs.
53 * decl2.cc (no_linkage_error): Don't error for declarations that
54 could be defined in other TUs since C++20. Suppress duplicate
55 errors from 'check_global_declaration'.
56 * tree.cc (no_linkage_check): In relaxed mode, don't consider
57 types in a module CMI to have no linkage.
58
b5490afe
GA
592024-03-16 Nathaniel Shead <nathanieloshead@gmail.com>
60
61 PR c++/112631
62 * cp-tree.h (named_module_attach_p): New function.
63 * decl.cc (start_decl): Check for attachment not purview.
64 (grokmethod): Likewise.
65
c1f6690b
GA
662024-03-14 Chung-Lin Tang <cltang@baylibre.com>
67
68 * parser.cc (cp_parser_oacc_data_clause): Add parsing support for
69 'readonly' modifier, set OMP_CLAUSE_MAP_READONLY if readonly modifier
70 found, update comments.
71 (cp_parser_oacc_cache): Add parsing support for 'readonly' modifier,
72 set OMP_CLAUSE__CACHE__READONLY if readonly modifier found, update
73 comments.
74
f6d9426b
GA
752024-03-12 Nathaniel Shead <nathanieloshead@gmail.com>
76
77 PR c++/98645
78 PR c++/98688
79 PR c++/111224
80 * module.cc (enum tree_tag): Add new tag for builtin types.
81 (trees_out::start): POLY_INT_CSTs can be emitted.
82 (trees_in::start): Likewise.
83 (trees_out::core_vals): Stream POLY_INT_CSTs.
84 (trees_in::core_vals): Likewise.
85 (trees_out::type_node): Handle vectors with multiple coeffs.
86 (trees_in::tree_node): Likewise.
87 (init_modules): Register target-specific builtin types. Bump
88 initial capacity slightly.
89
c775a030
GA
902024-03-08 Jakub Jelinek <jakub@redhat.com>
91
92 * pt.cc (tsubst_expr): Handle MEM_REF.
93
942024-03-08 Jakub Jelinek <jakub@redhat.com>
95
96 PR debug/113918
97 * cp-objcp-common.cc (cp_type_dwarf_attribute): Return 1
98 for DW_AT_export_symbols on anonymous structs or unions.
99
1002024-03-08 Jakub Jelinek <jakub@redhat.com>
101
102 PR c++/113802
103 * parser.cc (cp_parser_parameter_declaration): Move the xobj_param_p
104 pack diagnostics after ellipsis handling and if an error is reported,
105 pretend this specifier didn't appear. Formatting fix.
106
1e74c758
GA
1072024-03-07 Nathaniel Shead <nathanieloshead@gmail.com>
108
109 PR c++/114229
110 * module.cc (trees_out::core_bools): Redetermine
111 DECL_INTERFACE_KNOWN on stream-in for vtables and tinfo.
112 * decl2.cc (import_export_decl): Add fixme for ABI changes with
113 module vtables and tinfo.
114
1152024-03-07 Patrick Palka <ppalka@redhat.com>
116
117 PR c++/103994
118 * cp-tree.h (add_mergeable_specialization): Remove second
119 parameter.
120 * module.cc (depset::disc_bits::DB_ALIAS_TMPL_INST_BIT): Remove.
121 (depset::disc_bits::DB_ALIAS_SPEC_BIT): Remove.
122 (depset::is_alias_tmpl_inst): Remove.
123 (depset::is_alias): Remove.
124 (merge_kind::MK_tmpl_alias_mask): Remove.
125 (merge_kind::MK_alias_spec): Remove.
126 (merge_kind_name): Remove entries for alias specializations.
127 (trees_out::core_vals) <case TEMPLATE_DECL>: Adjust after
128 removing is_alias_tmpl_inst.
129 (trees_in::decl_value): Adjust add_mergeable_specialization
130 calls.
131 (trees_out::get_merge_kind) <case depset::EK_SPECIALIZATION>:
132 Use MK_decl_spec for alias template specializations.
133 (trees_out::key_mergeable): Simplify after MK_tmpl_alias_mask
134 removal.
135 (depset::hash::make_dependency): Adjust after removing
136 DB_ALIAS_TMPL_INST_BIT.
137 (specialization_add): Don't allow alias templates when !decl_p.
138 (depset::hash::add_specializations): Remove now-dead code
139 accomodating alias template specializations in the type table.
140 * pt.cc (lookup_template_class): Dispatch early to
141 instantiate_alias_template for alias templates. Simplify
142 accordingly.
143 (add_mergeable_specialization): Remove alias_p parameter and
144 simplify accordingly.
145
1462024-03-07 Patrick Palka <ppalka@redhat.com>
147
148 PR c++/110730
149 PR c++/105512
150 * module.cc (module_state::write_namespaces): Stream the
151 abi_tag attribute of an inline namespace.
152 (module_state::read_namespaces): Likewise.
153
1542024-03-07 Marek Polacek <polacek@redhat.com>
155
156 PR c++/110031
157 * pt.cc (lookup_and_finish_template_variable): Pass complain to
158 mark_used.
159
1602024-03-07 Nathaniel Shead <nathanieloshead@gmail.com>
161
162 PR c++/98356
163 * typeck2.cc (cxx_incomplete_type_diagnostic): Don't assume
164 'member' will be a FUNCTION_DECL (or something like it).
165
1662024-03-07 Nathaniel Shead <nathanieloshead@gmail.com>
167
168 PR c++/98881
169 * module.cc (trees_out::tpl_parms_fini): Stream out DECL_CONTEXT
170 for template template parameters.
171 (trees_in::tpl_parms_fini): Read it.
172
8b483cd5
GA
1732024-03-06 Marek Polacek <polacek@redhat.com>
174
175 PR c++/114114
176 * pt.cc (maybe_instantiate_noexcept): Save/restore
177 cp_unevaluated_operand, c_inhibit_evaluation_warnings, and
178 cp_noexcept_operand around the tsubst_expr call.
179
1802024-03-06 Nathaniel Shead <nathanieloshead@gmail.com>
181
182 PR c++/113629
183 * pt.cc (type_unification_real): Only use DEDUCE_CONV for the
184 return type of a conversion function.
185
1862024-03-06 Patrick Palka <ppalka@redhat.com>
187
188 * module.cc (trees_out::get_merge_kind) <case depset::EK_DECL>:
189 Accomodate class-scope DECL_UNINSTANTIATED_TEMPLATE_FRIEND_P
190 TEMPLATE_DECL. Consolidate IDENTIFIER_ANON_P cases.
191
214dadf3
GA
1922024-03-05 Patrick Palka <ppalka@redhat.com>
193
194 * parser.cc (cp_parser_translation_unit): Relax GMF contents
195 error into a pedwarn.
196
264e3ad4
GA
1972024-03-04 Nathaniel Shead <nathanieloshead@gmail.com>
198
199 * name-lookup.cc (walk_module_binding): Remove completed FIXME.
200 (do_nonmember_using_decl): Mark redeclared entities as exported
201 when needed. Check for re-exporting internal linkage types.
202
306a4c32
GA
2032024-03-01 Patrick Palka <ppalka@redhat.com>
204
205 PR c++/104919
206 PR c++/106009
207 * module.cc (depset::hash::sneakoscope): Remove.
208 (trees_out::decl_node): Always add a dependency on a local type.
209 (depset::hash::find_dependencies): Remove sneakoscope stuff.
210
2112024-03-01 Nathaniel Shead <nathanieloshead@gmail.com>
212
213 PR c++/114170
214 * module.cc (has_definition): Fall back to DECL_INITIALIZED_P
215 when DECL_INITIAL is not set on a template.
216 (module_state::write_inits): Only increment count when
217 initializers are actually written.
218
2192024-03-01 Nathaniel Shead <nathanieloshead@gmail.com>
220
221 PR c++/114005
222 * init.cc (create_temporary_var): Use current_scope instead of
223 current_function_decl.
224
2252024-03-01 Patrick Palka <ppalka@redhat.com>
226
227 * decl.cc (maybe_register_incomplete_var): Restrict second
228 branch to static data members from a not-yet-complete class.
229
2302024-03-01 Marek Polacek <polacek@redhat.com>
231
232 PR c++/110358
233 PR c++/109642
234 * call.cc (no_dangling_p): New.
235 (reference_like_class_p): Use it.
236 (do_warn_dangling_reference): Use it. Don't warn when the function
237 or its enclosing class has attribute gnu::no_dangling.
238 * tree.cc (cxx_gnu_attributes): Add gnu::no_dangling.
239 (handle_no_dangling_attribute): New.
240
2412024-03-01 Patrick Palka <ppalka@redhat.com>
242
243 PR c++/110025
244 PR c++/114138
245 * cp-tree.h (make_cast_auto): Declare.
246 * parser.cc (cp_parser_functional_cast): If the type is an auto,
247 replace it with a level-less one via make_cast_auto.
248 * pt.cc (find_parameter_packs_r): Don't treat level-less auto
249 as a type parameter pack.
250 (tsubst) <case TEMPLATE_TYPE_PARM>: Generalize CTAD placeholder
251 auto handling to all level-less autos.
252 (make_cast_auto): Define.
253 (do_auto_deduction): Handle replacement of a level-less auto.
254
2552024-03-01 Jakub Jelinek <jakub@redhat.com>
256
257 PR c++/92687
258 * decl.cc (lookup_decomp_type): Return NULL_TREE if decomp_type_table
259 doesn't have entry for V.
260 * semantics.cc (finish_decltype_type): If ptds.saved, assert
261 DECL_HAS_VALUE_EXPR_P is true and decide on tuple vs. non-tuple based
262 on if lookup_decomp_type is NULL or not.
263
b05f474c
GA
2642024-02-29 Marek Polacek <polacek@redhat.com>
265
266 PR c++/113987
267 * call.cc (conv_binds_to_reference_parm_p): New.
268 * cp-tree.h (conv_binds_to_reference_parm_p): Declare.
269 * init.cc (find_uninit_fields_r): Call it.
270
2712024-02-29 Nathaniel Shead <nathanieloshead@gmail.com>
272
273 PR c++/111710
274 * cp-tree.h (DECL_MODULE_KEYED_DECLS_P): Remove tree checking.
275 (struct lang_decl_base): Update comments and fix whitespace.
276 * module.cc (trees_out::lang_decl_bools): Always write
277 module_keyed_decls_p flag...
278 (trees_in::lang_decl_bools): ...and always read it.
279 (trees_out::decl_value): Handle all kinds of keyed decls.
280 (trees_in::decl_value): Likewise.
281 (trees_in::tree_value): Deduplicate LAMBDA_EXPRs.
282 (maybe_key_decl): Also support lambdas attached to fields,
283 parameters, and types. Key lambdas attached to fields to their
284 class.
285 (trees_out::get_merge_kind): Likewise.
286 (trees_out::key_mergeable): Likewise.
287 (trees_in::key_mergeable): Support keyed decls in a TYPE_DECL
288 container.
289 * parser.cc (cp_parser_class_head): Start a lambda scope when
290 parsing base classes.
291
fd52355a
GA
2922024-02-28 Jakub Jelinek <jakub@redhat.com>
293 Patrick Palka <ppalka@redhat.com>
294
295 PR c++/113976
296 * decl.cc (grokdeclarator): Don't call cp_apply_type_quals_to_decl
297 on DECL_TEMPLATE_INSTANTIATED VAR_DECLs.
298
2992024-02-28 Nathaniel Shead <nathanieloshead@gmail.com>
300
301 PR c++/113970
302 PR c++/114013
303 * decl.cc (make_rtl_for_nonlocal_decl): Don't defer inline
304 variables.
305
4d9da419
GA
3062024-02-23 Jakub Jelinek <jakub@redhat.com>
307
308 PR c++/113083
309 * cp-gimplify.cc (cp_fold): For targetm.cxx.cdtor_returns_this ()
310 wrap r into a COMPOUND_EXPR and return folded CALL_EXPR_ARG (x, 0).
311
52490278
GA
3122024-02-19 Patrick Palka <ppalka@redhat.com>
313
314 PR c++/113966
315 * constraint.cc (tsubst_compound_requirement): Don't check
316 the noexcept condition or the return-type-requirement when
317 partially substituting.
318
c1d15713
GA
3192024-02-17 Marek Polacek <polacek@redhat.com>
320
321 PR c++/113158
322 * search.cc (maybe_check_overriding_exception_spec): Defer checking
323 when a noexcept couldn't be instantiated & evaluated to false/true.
324
d70f155b
GA
3252024-02-16 Marek Polacek <polacek@redhat.com>
326
327 DR 1351
328 * search.cc (maybe_check_overriding_exception_spec): Don't error about
329 a looser exception specification if the overrider is deleted.
330
3312024-02-16 Marek Polacek <polacek@redhat.com>
332
333 PR c++/113789
334 PR c++/113853
335 * typeck.cc (treat_lvalue_as_rvalue_p): Update code to better
336 reflect [expr.prim.id.unqual]#4.2.
337
3382024-02-16 Jakub Jelinek <jakub@redhat.com>
339
340 PR c++/113929
341 * parser.cc (cp_parser_parameter_declaration): Diagnose this specifier
342 on template parameter declaration.
343
3442024-02-16 Patrick Palka <ppalka@redhat.com>
345
346 * module.cc (trees_out::core_bools): Stream TREE_UNAVAILABLE.
347 (trees_in::core_bools): Likewise.
348 (trees_out::core_vals): Stream LAMBDA_EXPR_REGEN_INFO.
349 (trees_in::core_vals): Likewise.
350
5266f930
GA
3512024-02-14 Nathaniel Shead <nathanieloshead@gmail.com>
352
353 PR c++/113708
354 * decl.cc (make_rtl_for_nonlocal_decl): Defer inline variables.
355 * decl2.cc (import_export_decl): Support inline variables.
356
3572024-02-14 Patrick Palka <ppalka@redhat.com>
358
359 PR c++/113908
360 PR c++/113332
361 * method.cc (synthesized_method_walk): Use maybe_push_to_top_level.
362
3632024-02-14 Nathaniel Shead <nathanieloshead@gmail.com>
364
365 PR c++/99573
366 * decl.cc (start_enum): Reorder check for redeclaring in module.
367 Add missing auto_diagnostic_groups.
368
df6c57ce
GA
3692024-02-13 Marek Polacek <polacek@redhat.com>
370
371 DR 1693
372 PR c++/113760
373 * parser.cc (cp_parser_member_declaration): Only pedwarn about an extra
374 semicolon in C++98.
375
3762024-02-13 Tobias Burnus <tburnus@baylibre.com>
377
378 PR middle-end/113904
379 * parser.cc (cp_parser_omp_context_selector): Handle splitting of
380 OMP_TRAIT_PROPERTY_EXPR into OMP_TRAIT_PROPERTY_{DEV_NUM,BOOL}_EXPR.
381
3822024-02-13 Patrick Palka <ppalka@redhat.com>
383
384 * Make-lang.in (CFLAGS-cp/module.o): Add $(ZLIBINC).
385 * module.cc: Include <zlib.h>.
386 (bytes::calc_crc): Use crc32 from zlib.
387 (bytes_out::set_crc): Use crc32_combine from zlib.
388
3892024-02-13 Patrick Palka <ppalka@redhat.com>
390
391 * module.cc (depset::hash::add_specializations): Use
392 STRIP_TEMPLATE consistently.
393 (get_originating_module_decl): Handle class-scope CONST_DECL.
394
3952024-02-13 Patrick Palka <ppalka@redhat.com>
396
397 * lambda.cc (lambda_function): Call get_class_binding_direct
398 instead of lookup_member to sidestep lazy loading.
399 * name-lookup.cc (check_local_shadow): Punt if we're in a
400 function context that's not actual parsing.
401
4022024-02-13 Jason Merrill <jason@redhat.com>
403
404 PR c++/113612
405 * pt.cc (process_partial_specialization): Return early
406 on redeclaration.
407
4082024-02-13 Marek Polacek <polacek@redhat.com>
409
410 PR c++/112436
411 * except.cc (expand_start_catch_block): Pass tf_warning_or_error to
412 is_admissible_throw_operand_or_catch_parameter.
413 (build_throw): Pass complain to
414 is_admissible_throw_operand_or_catch_parameter.
415 (complete_ptr_ref_or_void_ptr_p): Add a tsubst_flags_t parameter. Use
416 it. Return bool. Call complete_type_or_maybe_complain instead of
417 complete_type_or_else.
418 (is_admissible_throw_operand_or_catch_parameter): Add a tsubst_flags_t
419 parameter. Use it. Guard error calls.
420
4212024-02-13 Alex Coplan <alex.coplan@arm.com>
422
423 PR c++/113658
424 * cp-objcp-common.cc (cp_feature_table): Remove entry for
425 cxx_constexpr_string_builtins.
426
bf074ee4
GA
4272024-02-12 Marek Polacek <polacek@redhat.com>
428
429 PR c++/113545
430 * constexpr.cc (cxx_eval_switch_expr): If the condition doesn't reduce
431 to an INTEGER_CST, consider it non-constant.
432
67d5b10e
GA
4332024-02-10 Marek Polacek <polacek@redhat.com>
434
435 DR 2237
436 PR c++/107126
437 PR c++/97202
438 * parser.cc (cp_parser_unqualified_id): Downgrade the DR2237 error to
439 a pedwarn.
440 (cp_parser_constructor_declarator_p): Likewise.
441
4422024-02-10 Jakub Jelinek <jakub@redhat.com>
443
444 * tree.cc (debug_binfo): Use HOST_WIDE_INT_PRINT_DEC instead of "%ld"
445 and casts to long.
446 * pt.cc (print_template_statistics): Use HOST_SIZE_T_PRINT_DEC
447 and casts to fmt_size_t instead of "%ld" and casts to long.
448 * class.cc (dump_class_hierarchy_1): Use HOST_WIDE_INT_PRINT_UNSIGNED
449 instead of "%lu" and casts to unsigned long. For TYPE_ALIGN, use
450 %u instead of %lu and drop casts to unsigned long.
451 * parser.cc (cp_lexer_peek_nth_token): Use HOST_SIZE_T_PRINT_DEC
452 and casts to fmt_size_t instead of "%ld" and casts to long.
453
2523654a
GA
4542024-02-09 Marek Polacek <polacek@redhat.com>
455
456 PR c++/113834
457 * semantics.cc (finish_type_pack_element): Perform range checking
458 before tree_to_shwi.
459
4602024-02-09 Marek Polacek <polacek@redhat.com>
461
462 PR c++/98388
463 * coroutines.cc (coro_rewrite_function_body): Pass tf_warning_or_error
464 to build_throw.
465 (morph_fn_to_coro): Likewise.
466 * cp-tree.h (build_throw): Adjust.
467 * except.cc (expand_end_catch_block): Pass tf_warning_or_error to
468 build_throw.
469 (build_throw): Add a tsubst_flags_t parameter. Use it. Remove
470 redundant variable. Guard an inform call.
471 * parser.cc (cp_parser_throw_expression): Pass tf_warning_or_error
472 to build_throw.
473 * pt.cc (tsubst_expr) <case THROW_EXPR>: Pass complain to build_throw.
474
4752024-02-09 Patrick Palka <ppalka@redhat.com>
476
477 PR c++/112580
478 * module.cc (trees_in::read_class_def): When streaming in
479 an anonymous union field of an as-base class, don't overwrite
480 ANON_AGGR_TYPE_FIELD.
481
90586e27
GA
4822024-02-08 Patrick Palka <ppalka@redhat.com>
483
484 PR c++/113649
485 * pt.cc (do_class_deduction): Add outer_targs parameter.
486 Substitute outer arguments into the CTAD template.
487 (do_auto_deduction): Pass outer_targs to do_class_deduction.
488
4892024-02-08 Jason Merrill <jason@redhat.com>
490
491 * pt.cc (create_template_parm_object): Pass TARGET_EXPR to
492 cxx_constant_value.
493
3e4c4c5e
GA
4942024-02-06 Jakub Jelinek <jakub@redhat.com>
495
496 PR c++/113788
497 * parser.cc (CP_PARSER_FLAGS_PARAMETER): New enumerator.
498 (cp_parser_decl_specifier_seq): Parse RID_THIS only if
499 CP_PARSER_FLAGS_PARAMETER is set in flags.
500 (cp_parser_parameter_declaration): Or in CP_PARSER_FLAGS_PARAMETER
501 when calling cp_parser_decl_specifier_seq.
502
5032024-02-06 Marek Polacek <polacek@redhat.com>
504
505 * method.cc (early_check_defaulted_comparison): Add
506 auto_diagnostic_group.
507
5082024-02-06 Jason Merrill <jason@redhat.com>
509
510 PR c++/107291
511 * method.cc (early_check_defaulted_comparison): Fail if not friend.
512
1c9ddaae
GA
5132024-02-05 Jason Merrill <jason@redhat.com>
514
515 PR c++/111286
516 * tree.cc (rvalue): Don't drop cv-quals from an array.
517
4b7d4d8a
GA
5182024-02-03 Patrick Palka <ppalka@redhat.com>
519
520 PR c++/110006
521 PR c++/112769
522 * constraint.cc (subst_info::quiet): Accomodate non-diagnostic
523 tsubst flags.
524 (tsubst_valid_expression_requirement): Likewise.
525 (tsubst_simple_requirement): Return a substituted _REQ node when
526 processing_template_decl.
527 (tsubst_type_requirement_1): Accomodate non-diagnostic tsubst
528 flags.
529 (tsubst_type_requirement): Return a substituted _REQ node when
530 processing_template_decl.
531 (tsubst_compound_requirement): Likewise. Accomodate non-diagnostic
532 tsubst flags.
533 (tsubst_nested_requirement): Likewise.
534 (tsubst_requires_expr): Don't defer partial substitution when
535 processing_constraint_expression_p is true, in which case return
536 a substituted REQUIRES_EXPR.
537 * pt.cc (tsubst_expr) <case REQUIRES_EXPR>: Accomodate
538 non-diagnostic tsubst flags.
539
5402024-02-02 Jason Merrill <jason@redhat.com>
541
542 PR c++/110084
543 * pt.cc (tsubst_function_decl): Only check a function defaulted
544 outside the class if the class is complete.
545
5462024-02-02 Jason Merrill <jason@redhat.com>
547
548 PR c++/112439
549 * constexpr.cc (cxx_eval_store_expression): Check empty_base
550 before marking a CONSTRUCTOR readonly.
551
5522024-02-02 Jason Merrill <jason@redhat.com>
553
554 PR c++/113638
555 * cp-tree.h: Adjust comment.
556 * pt.cc (instantiate_template): Set VAR_HAD_UNKNOWN_BOUND for
557 variable template.
558
e2554540
GA
5592024-02-01 Marek Polacek <polacek@redhat.com>
560
561 * call.cc (reference_like_class_p): Consider even non-templates for
562 std::span-like classes.
563
5642024-02-01 Patrick Palka <ppalka@redhat.com>
565
566 PR c++/112737
567 * pt.cc (iterative_hash_template_arg) <case TEMPLATE_DECL>:
568 Adjust hashing to match cp_tree_equal.
569 (ctp_hasher::hash): Also hash CLASS_PLACEHOLDER_TEMPLATE.
570 * tree.cc (cp_tree_equal) <case TEMPLATE_DECL>: Return true
571 for ttp TEMPLATE_DECLs if their TEMPLATE_TEMPLATE_PARMs are
572 equivalent.
573 * typeck.cc (structural_comptypes) <case TEMPLATE_TYPE_PARM>:
574 Use cp_tree_equal to compare CLASS_PLACEHOLDER_TEMPLATE.
575
5762024-02-01 Marek Polacek <polacek@redhat.com>
577
578 PR c++/112437
579 * typeck.cc (treat_lvalue_as_rvalue_p): Bail out on sk_namespace in
580 the move on throw of parms loop.
581
097ddd55
GA
5822024-01-30 Marek Polacek <polacek@redhat.com>
583
584 PR c++/110358
585 PR c++/109640
586 * call.cc (reference_like_class_p): Don't warn for std::span-like
587 classes.
588
5892024-01-30 Patrick Palka <ppalka@redhat.com>
590
591 PR c++/113640
592 * call.cc (keep_unused_object_arg): Punt for an xobj member
593 function.
594
5952024-01-30 Patrick Palka <ppalka@redhat.com>
596
597 PR c++/113644
598 * pt.cc (unify) <case INTEGER_CST>: Handle NULL_TREE type.
599
6002024-01-30 Nathaniel Shead <nathanieloshead@gmail.com>
601
602 PR c++/107594
603 * module.cc (get_module): Bail on empty name.
604
f0706819
GA
6052024-01-29 Jason Merrill <jason@redhat.com>
606
607 PR c++/113544
608 * pt.cc (instantiate_class_template): Don't partially instantiate.
609 (tsubst_stmt): Likewise.
610
ce9dae56
GA
6112024-01-26 Nathaniel Shead <nathanieloshead@gmail.com>
612
613 PR c++/113580
614 * module.cc (struct post_process_data): Create.
615 (trees_in::post_decls): Use.
616 (trees_in::post_process): Return entire vector at once.
617 Change overload to take post_process_data instead of tree.
618 (trees_out::write_function_def): Write needed flags from
619 DECL_STRUCT_FUNCTION.
620 (trees_in::read_function_def): Read them and pass to
621 post_process.
622 (module_state::read_cluster): Write flags into cfun.
623
6242024-01-26 Nathaniel Shead <nathanieloshead@gmail.com>
625
626 PR c++/112899
627 * cp-tree.h (note_variable_template_instantiation): Rename to...
628 (note_vague_linkage_variable): ...this.
629 * decl2.cc (note_variable_template_instantiation): Rename to...
630 (note_vague_linkage_variable): ...this.
631 * pt.cc (instantiate_decl): Rename usage of above function.
632 * module.cc (trees_in::read_var_def): Remember pending statics
633 that we stream in.
634
f22a7ae8
GA
6352024-01-25 Jakub Jelinek <jakub@redhat.com>
636
637 PR c++/113599
638 * typeck2.cc (build_m_component_ref): Use convert instead of
639 cp_convert for pointer conversion.
640
6412024-01-25 Jason Merrill <jason@redhat.com>
642
643 PR c++/113598
644 * init.cc (build_vec_init): Don't use {} for PMF.
645
6462024-01-25 Jason Merrill <jason@redhat.com>
647
648 PR c++/109227
649 * coroutines.cc (build_co_await): Use cxx_maybe_build_cleanup.
650 (build_actor_fn, process_conditional, maybe_promote_temps)
651 (morph_fn_to_coro): Likewise.
652 (expand_one_await_expression): Use build_cleanup.
653
6542024-01-25 Nathaniel Shead <nathanieloshead@gmail.com>
655
656 PR c++/113405
657 * module.cc (set_defining_module): Track partial specialisations
658 for all declarations.
659
6602024-01-25 Nathaniel Shead <nathanieloshead@gmail.com>
661
662 PR c++/100707
663 * name-lookup.cc (add_imported_namespace): Don't mark namespaces
664 as imported.
665
2a9637b2
GA
6662024-01-24 Patrick Palka <ppalka@redhat.com>
667
668 PR c++/113529
669 * call.cc (add_operator_candidates): Propagate error_mark_node
670 result after recursing to find rewritten candidates.
671
3128786c
GA
6722024-01-23 Marek Polacek <polacek@redhat.com>
673
674 PR c++/113256
675 PR c++/111607
676 PR c++/109640
677 * call.cc (do_warn_dangling_reference): Don't warn if the temporary
678 is of lambda type.
679
6802024-01-23 Nathaniel Shead <nathanieloshead@gmail.com>
681
682 PR c++/112820
683 PR c++/102607
684 * module.cc (trees_out::lang_type_bools): Write interface_only
685 and interface_unknown.
686 (trees_in::lang_type_bools): Read the above flags.
687 (trees_in::decl_value): Reset CLASSTYPE_INTERFACE_* except for
688 extern templates.
689 (trees_in::read_class_def): Remove buggy extern template
690 handling.
691
c2544854
GA
6922024-01-19 Jason Merrill <jason@redhat.com>
693
694 PR c++/113498
695 * pt.cc (decl_template_info): New fn.
696 (get_template_info): Use it.
697
6982024-01-19 Jason Merrill <jason@redhat.com>
699
700 PR c++/112632
701 PR c++/112594
702 PR c++/111357
703 PR c++/104594
704 PR c++/67898
705 * cp-tree.h (IMPLICIT_CONV_EXPR_FORCED): New.
706 * pt.cc (expand_integer_pack): Remove 111357 workaround.
707 (maybe_convert_nontype_argument): Add force parm.
708 (convert_template_argument): Handle alias template args
709 specially.
710 (tsubst_expr): Don't ignore IMPLICIT_CONV_EXPR_NONTYPE_ARG.
711 * error.cc (dump_expr) [CASE_CONVERT]: Handle null optype.
712
bb0f96ab
GA
7132024-01-18 Marek Polacek <polacek@redhat.com>
714
715 PR c++/113389
716 * decl.cc (grokdeclarator) <case cdk_function>: Set TREE_PURPOSE to
717 NULL_TREE when emitting an error.
718
2c213ac9
GA
7192024-01-17 Nathaniel Shead <nathanieloshead@gmail.com>
720
721 PR c++/112588
722 * module.cc (trees_in::read_function_def): Don't overwrite
723 arguments.
724
7252024-01-17 Patrick Palka <ppalka@redhat.com>
726
727 PR c++/113242
728 PR c++/99493
729 * pt.cc (invalid_tparm_referent_p) <case ADDR_EXPR>: Suppress
730 DECL_ARTIFICIAL rejection test for class NTTP objects.
731
1a177974
GA
7322024-01-16 Nathaniel Shead <nathanieloshead@gmail.com>
733
734 PR c++/113292
735 * decl2.cc (get_tls_wrapper_fn): Set DECL_CONTEXT.
736 (c_parse_final_cleanups): Suppress warning for no definition of
737 TLS wrapper functions in header modules.
738 * module.cc (trees_out::lang_decl_vals): Write wrapped variable
739 for TLS wrapper functions.
740 (trees_in::lang_decl_vals): Read it.
741 (trees_out::decl_value): Write TLS model for thread-local vars.
742 (trees_in::decl_value): Read it for new decls. Remember to emit
743 definitions of TLS wrapper functions later.
744
7452024-01-16 Nathaniel Shead <nathanieloshead@gmail.com>
746
747 * name-lookup.h (enum scope_kind): Add 'sk_count'.
748 * name-lookup.cc (cp_binding_level_descriptor): Add missing
749 scope kinds. Add assertion that the list is up to date. Fix
750 handling of explicit_spec_p.
751
7522024-01-16 Marek Polacek <polacek@redhat.com>
753
754 * decl.cc (grokdeclarator) <case cdk_function>: Tweak diagnostic
755 messages.
756
7572024-01-16 Marek Polacek <polacek@redhat.com>
758
759 PR c++/113340
760 * decl.cc (grokdeclarator) <case cdk_function>: Clear
761 is_xobj_member_function in case of an error.
762
7632024-01-16 waffl3x <waffl3x@protonmail.com>
764
765 PR c++/113307
766 * parser.cc (cp_parser_parameter_declaration): Reject packs
767 on xobj params.
768
be035ec4
GA
7692024-01-15 Marek Polacek <polacek@redhat.com>
770
771 PR c++/110065
772 * parser.cc (cp_parser_template_type_arg): Add auto checking.
773
7742024-01-15 Patrick Palka <ppalka@redhat.com>
775
776 * parser.cc (cp_parser_check_access_in_redeclaration): Don't
777 check access for a partial or explicit specialization.
778 * pt.cc (maybe_new_partial_specialization): Don't set TREE_PRIVATE
779 or TREE_PROTECTED on the newly created partial specialization.
780
7812024-01-15 Patrick Palka <ppalka@redhat.com>
782
783 PR c++/104634
784 * pt.cc (maybe_new_partial_specialization): Propagate TREE_PUBLIC
785 to the newly created partial specialization.
786
7872024-01-15 Patrick Palka <ppalka@redhat.com>
788
789 PR c++/109899
790 * init.cc (build_vec_delete_1): Assume expr_noexcept_p returns
791 false in a template context.
792
ed5bf208
GA
7932024-01-13 Jakub Jelinek <jakub@redhat.com>
794
795 * mangle.cc (write_nested_name): Mangle explicit object
796 member functions with H as per
797 https://github.com/itanium-cxx-abi/cxx-abi/issues/148 non-proposal.
798
444a31f3
GA
7992024-01-12 Jason Merrill <jason@redhat.com>
800
801 PR c++/113038
802 * name-lookup.cc (lookup_elaborated_type): Look for bindings
803 in the global namespace in the ABI namespace.
804
8052024-01-12 Jason Merrill <jason@redhat.com>
806
807 * call.cc (reversed_match): New.
808 (enum class pmatch): New enum.
809 (cand_parms_match): Add match_kind parm.
810 (object_parms_correspond): Add fn parms.
811 (joust): Adjust.
812 * class.cc (xobj_iobj_parameters_correspond): Rename to...
813 (iobj_parm_corresponds_to): ...this. Take the other
814 type instead of a second function.
815 (object_parms_correspond): Adjust.
816 * cp-tree.h (iobj_parm_corresponds_to): Declare.
817
1a80e955
GA
8182024-01-11 Jason Merrill <jason@redhat.com>
819
820 PR c++/113191
821 * class.cc (xobj_iobj_parameters_correspond): Add context parm.
822 (object_parms_correspond): Factor out of...
823 (add_method): ...here.
824 * method.cc (defaulted_late_check): Use it.
825 * call.cc (class_of_implicit_object): New.
826 (object_parms_correspond): Overload taking two candidates.
827 (cand_parms_match): Use it.
828 (joust): Check reversed before comparing constraints.
829 * cp-tree.h (object_parms_correspond): Declare.
830
45af8962
GA
8312024-01-10 Tamar Christina <tamar.christina@arm.com>
832
833 * parser.cc (cp_parser_pragma): Initialize to false.
834
73ce73fc
GA
8352024-01-09 Jason Merrill <jason@redhat.com>
836
837 * semantics.cc (is_object_parameter): New.
838 * cp-tree.h (is_object_parameter): Declare.
839 * call.cc (maybe_warn_class_memaccess): Use it.
840 * search.cc (field_access_p): Use it.
841 (class_of_object_parm): New.
842 (field_accessor_p): Adjust for explicit object parms.
843
8442024-01-09 Jason Merrill <jason@redhat.com>
845
846 * call.cc (build_over_call): Refactor handle_arg lambda.
847 * class.cc (xobj_iobj_parameters_correspond): Fix FIXME.
848 * method.cc (defaulted_late_check): Adjust comments.
849
8502024-01-09 waffl3x <waffl3x@protonmail.com>
851
852 PR c++/102609
853 PR c++/102609
854 C++23 P0847R7 (deducing this) - CWG2586.
855 * decl.cc (copy_fn_p): Accept xobj copy assignment functions.
856 (move_signature_fn_p): Accept xobj move assignment functions.
857 * method.cc (do_build_copy_assign): Handle defaulted xobj member
858 functions.
859 (defaulted_late_check): Comment.
860 (defaultable_fn_check): Comment.
861
8622024-01-09 waffl3x <waffl3x@protonmail.com>
863
864 PR c++/102609
865 PR c++/102609
866 C++23 P0847R7 (deducing this) - xobj lambdas.
867 * lambda.cc (build_capture_proxy): Don't fold direct object types.
868 * parser.cc (cp_parser_lambda_declarator_opt): Handle xobj lambdas,
869 diagnostics. Comments also updated.
870 * pt.cc (tsubst_function_decl): Handle xobj lambdas. Check object
871 type of xobj lambda call operator, diagnose incorrect types.
872 (tsubst_lambda_expr): Update comment.
873 * semantics.cc (finish_decltype_type): Also consider by-value object
874 parameter qualifications.
875
8762024-01-09 waffl3x <waffl3x@protonmail.com>
877
878 PR c++/102609
879 PR c++/102609
880 C++23 P0847R7 (deducing this) - diagnostics.
881 * class.cc (resolve_address_of_overloaded_function): Diagnostics.
882 * cp-tree.h (TFF_XOBJ_FUNC): Define.
883 * decl.cc (grokfndecl): Diagnostics.
884 (grokdeclarator): Diagnostics.
885 * error.cc (dump_aggr_type): Pass TFF_XOBJ_FUNC.
886 (dump_lambda_function): Formatting for xobj lambda.
887 (dump_function_decl): Pass TFF_XOBJ_FUNC.
888 (dump_parameters): Formatting for xobj member functions.
889 (function_category): Formatting for xobj member functions.
890 * parser.cc (cp_parser_decl_specifier_seq): Diagnostics.
891 (cp_parser_parameter_declaration): Diagnostics.
892 * search.cc (look_for_overrides_here): Make xobj member functions
893 override.
894 (look_for_overrides_r): Reject an overriding xobj member function
895 and diagnose it.
896 * semantics.cc (finish_this_expr): Diagnostics.
897 * typeck.cc (cp_build_addr_expr_1): Diagnostics.
898
8992024-01-09 waffl3x <waffl3x@protonmail.com>
900
901 PR c++/102609
902 PR c++/102609
903 C++23 P0847R7 (deducing this) - initial functionality.
904 * class.cc (xobj_iobj_parameters_correspond): New function, checks
905 for corresponding object parameters between xobj and iobj member
906 functions.
907 (add_method): Handle object parameters of xobj member functions, use
908 xobj_iobj_parameters_correspond.
909 * call.cc (build_over_call): Refactor, handle xobj member functions.
910 (cand_parms_match): Handle object parameters of xobj and iobj member
911 functions, use xobj_iobj_parameters_correspond.
912 * cp-tree.h (enum cp_decl_spec): Add ds_this, add comments.
913 * decl.cc (grokfndecl): Add xobj_func_p parameter. For xobj member
914 functions, Set xobj_flag, don't set static_function flag.
915 (grokdeclarator): Handle xobj member functions, tell grokfndecl.
916 (grok_op_properties): Don't error for xobj operators.
917 * parser.cc (cp_parser_decl_specifier_seq): Handle this specifier.
918 (cp_parser_parameter_declaration): Set default argument to
919 "this_identifier" for xobj parameters.
920 (set_and_check_decl_spec_loc): Add "this", add comments.
921 * tree.cc (build_min_non_dep_op_overload): Handle xobj operators.
922 * typeck.cc (cp_build_addr_expr_1): Handle address-of xobj member
923 functions.
924
9252024-01-09 waffl3x <waffl3x@protonmail.com>
926 Jason Merrill <jason@redhat.com>
927
928 PR c++/102609
929 * cp-tree.h (struct lang_decl_fn): New data member.
930 (DECL_NONSTATIC_MEMBER_FUNCTION_P): Poison.
931 (DECL_IOBJ_MEMBER_FUNCTION_P): Define.
932 (DECL_FUNCTION_XOBJ_FLAG): Define.
933 (DECL_XOBJ_MEMBER_FUNCTION_P): Define.
934 (DECL_OBJECT_MEMBER_FUNCTION_P): Define.
935 (DECL_FUNCTION_MEMBER_P): Don't use
936 DECL_NONSTATIC_MEMBER_FUNCTION_P.
937 (DECL_CONST_MEMFUNC_P): Likewise.
938 (DECL_VOLATILE_MEMFUNC_P): Likewise.
939 (DECL_NONSTATIC_MEMBER_P): Likewise.
940 * module.cc (trees_out::lang_decl_bools): Handle xobj_flag.
941 (trees_in::lang_decl_bools): Handle xobj_flag.
942 * call.cc (build_this_conversion)
943 (add_function_candidate)
944 (add_template_candidate_real)
945 (add_candidates)
946 (maybe_warn_class_memaccess)
947 (cand_parms_match)
948 (joust)
949 (do_warn_dangling_reference)
950 * class.cc (finalize_literal_type_property)
951 (finish_struct)
952 (resolve_address_of_overloaded_function)
953 * constexpr.cc (is_valid_constexpr_fn)
954 (cxx_bind_parameters_in_call)
955 * contracts.cc (build_contract_condition_function)
956 * cp-objcp-common.cc (cp_decl_dwarf_attribute)
957 * cxx-pretty-print.cc (cxx_pretty_printer::postfix_expression)
958 (cxx_pretty_printer::declaration_specifiers)
959 (cxx_pretty_printer::direct_declarator)
960 * decl.cc (cp_finish_decl)
961 (grok_special_member_properties)
962 (start_preparsed_function)
963 (record_key_method_defined)
964 * decl2.cc (cp_handle_deprecated_or_unavailable)
965 * init.cc (find_uninit_fields_r)
966 (build_offset_ref)
967 * lambda.cc (lambda_expr_this_capture)
968 (maybe_generic_this_capture)
969 (nonlambda_method_basetype)
970 * mangle.cc (write_nested_name)
971 * method.cc (early_check_defaulted_comparison)
972 (skip_artificial_parms_for)
973 (num_artificial_parms_for)
974 * pt.cc (is_specialization_of_friend)
975 (determine_specialization)
976 (copy_default_args_to_explicit_spec)
977 (check_explicit_specialization)
978 (tsubst_contract_attribute)
979 (check_non_deducible_conversions)
980 (more_specialized_fn)
981 (maybe_instantiate_noexcept)
982 (register_parameter_specializations)
983 (value_dependent_expression_p)
984 * search.cc (shared_member_p)
985 (lookup_member)
986 (field_access_p)
987 * semantics.cc (finish_omp_declare_simd_methods)
988 * tree.cc (lvalue_kind)
989 * typeck.cc (invalid_nonstatic_memfn_p): Don't use
990 DECL_NONSTATIC_MEMBER_FUNCTION_P.
991
9922024-01-09 Julian Brown <julian@codesourcery.com>
993
994 * constexpr.cc (potential_consant_expression_1): Handle
995 OMP_ARRAY_SECTION.
996 * cp-tree.h (grok_omp_array_section, build_omp_array_section): Add
997 prototypes.
998 * decl2.cc (grok_omp_array_section): New function.
999 * error.cc (dump_expr): Handle OMP_ARRAY_SECTION.
1000 * parser.cc (cp_parser_new): Initialize parser->omp_array_section_p.
1001 (cp_parser_statement_expr): Disallow array sections.
1002 (cp_parser_postfix_open_square_expression): Support OMP_ARRAY_SECTION
1003 parsing.
1004 (cp_parser_parenthesized_expression_list, cp_parser_lambda_expression,
1005 cp_parser_braced_list): Disallow array sections.
1006 (cp_parser_omp_var_list_no_open): Remove ALLOW_DEREF parameter, add
1007 MAP_LVALUE in its place. Support generalised lvalue parsing for
1008 OpenMP map, to and from clauses. Use OMP_ARRAY_SECTION
1009 code instead of TREE_LIST to represent OpenMP array sections.
1010 (cp_parser_omp_var_list): Remove ALLOW_DEREF parameter, add MAP_LVALUE.
1011 Pass to cp_parser_omp_var_list_no_open.
1012 (cp_parser_oacc_data_clause): Update call to cp_parser_omp_var_list.
1013 (cp_parser_omp_clause_map): Add sk_omp scope around
1014 cp_parser_omp_var_list_no_open call.
1015 * parser.h (cp_parser): Add omp_array_section_p field.
1016 * pt.cc (tsubst, tsubst_copy, tsubst_omp_clause_decl,
1017 tsubst_copy_and_build): Add OMP_ARRAY_SECTION support.
1018 * semantics.cc (handle_omp_array_sections_1, handle_omp_array_sections,
1019 cp_oacc_check_attachments, finish_omp_clauses): Use OMP_ARRAY_SECTION
1020 instead of TREE_LIST where appropriate. Handle more types of map
1021 expression.
1022 * typeck.cc (build_omp_array_section): New function.
1023
59e0c218
GA
10242024-01-07 Nathaniel Shead <nathanieloshead@gmail.com>
1025
1026 * module.cc (trees_out::write_var_def): Only write initializers
1027 in header modules.
1028
10292024-01-07 Nathaniel Shead <nathanieloshead@gmail.com>
1030
1031 PR c++/109679
1032 * module.cc (depset::hash::add_binding_entity): Don't skip names
1033 in the GMF if they've been exported with a using declaration.
1034
10352024-01-07 Nathaniel Shead <nathanieloshead@gmail.com>
1036
1037 PR c++/110808
1038 * parser.cc (cp_parser_module_name): Rewrite to handle
1039 module-names and module-partitions independently.
1040 (cp_parser_module_partition): New function.
1041 (cp_parser_module_declaration): Parse module partitions
1042 explicitly. Don't change state if parsing module decl failed.
1043 (cp_parser_import_declaration): Handle different kinds of
1044 import-declarations locally.
1045
eb84e8d3
GA
10462024-01-03 Patrick Palka <ppalka@redhat.com>
1047
1048 PR c++/113064
1049 * call.cc (reference_binding): Still try a conversion via a
1050 temporary if a direct conversion was bad.
1051
10522024-01-03 Kwok Cheung Yeung <kcy@codesourcery.com>
1053
1054 * parser.cc (cp_parser_omp_clause_name): Move handling of indirect
1055 clause to correspond to alphabetical order.
1056
ad41bd84 1057\f
8c22aed4 1058Copyright (C) 2024 Free Software Foundation, Inc.
ad41bd84
JM
1059
1060Copying and distribution of this file, with or without modification,
1061are permitted in any medium without royalty provided the copyright
1062notice and this notice are preserved.