1 2024-05-22 Patrick Palka <ppalka@redhat.com>
4 * tree.cc (build_cp_fntype_variant): Always use structural
5 equality for types with a complex exception specification.
6 (fixup_deferred_exception_variants): Use structural equality
8 * typeck.cc (comp_except_specs): Require == instead of
9 cp_tree_equal for ce_exact noexcept-spec comparison.
11 2024-05-22 Nathaniel Shead <nathanieloshead@gmail.com>
13 * decl.cc (grokfndecl): Check for main functions with language
14 linkage or module attachment.
15 (grokvardecl): Check for extern 'C' entities named main.
17 2024-05-21 Jonathan Wakely <jwakely@redhat.com>
20 * cxxapi-data.csv <to_address>: Change dialect to cxx20.
21 * std-name-hint.gperf: Regenerate.
22 * std-name-hint.h: Regenerate.
24 2024-05-21 Patrick Palka <ppalka@redhat.com>
27 * pt.cc (tsubst_expr) <case CONST_DECL>: Exit early if args
30 2024-05-17 Patrick Palka <ppalka@redhat.com>
33 * pt.cc (maybe_aggr_guide): Consider bases in the paren init case.
35 2024-05-15 Marek Polacek <polacek@redhat.com>
38 * call.cc (convert_like_internal) <case ck_user>: Don't set
39 TARGET_EXPR_DIRECT_INIT_P.
41 2024-05-15 Marek Polacek <polacek@redhat.com>
46 * parser.cc (extra_semi_kind): New.
47 (maybe_warn_extra_semi): New.
48 (cp_parser_declaration): Call maybe_warn_extra_semi.
49 (cp_parser_member_declaration): Likewise.
51 2024-05-15 Jakub Jelinek <jakub@redhat.com>
52 Jason Merrill <jason@redhat.com>
55 * cp-tree.h (maybe_optimize_cdtor): Remove.
56 * decl2.cc (tentative_decl_linkage): Call maybe_make_one_only
57 for implicit instantiations of maybe in charge ctors/dtors
59 (import_export_decl): Don't call maybe_optimize_cdtor.
60 (c_parse_final_cleanups): Formatting fixes.
61 * optimize.cc (can_alias_cdtor): Adjust condition, for
62 HAVE_COMDAT_GROUP && DECL_ONE_ONLY && DECL_WEAK return true even
63 if not DECL_INTERFACE_KNOWN.
64 (maybe_clone_body): Don't clear DECL_SAVED_TREE, instead set it
66 (maybe_clone_body): Remove.
67 * decl.cc (cxx_comdat_group): For DECL_CLONED_FUNCTION_P
68 functions if SUPPORTS_ONE_ONLY return DECL_COMDAT_GROUP if already
71 2024-05-15 Jakub Jelinek <jakub@redhat.com>
74 * semantics.cc (finish_omp_clauses): Diagnose grainsize
75 used together with num_tasks.
77 2024-05-15 Patrick Palka <ppalka@redhat.com>
80 * tree.cc (lvalue_kind) <case MODOP_EXPR>: For a class
81 assignment, consider the result type.
83 2024-05-14 Simon Martin <simon-l.martin@laposte.net>
86 * pt.cc (build_deduction_guide): Check for error_mark_node
87 result from tsubst_arg_types.
89 2024-05-14 Jason Merrill <jason@redhat.com>
91 * decl.cc (wrap_cleanups_r): Clarify comment.
92 * init.cc (build_vec_init): Update comment.
94 2024-05-13 Patrick Palka <ppalka@redhat.com>
96 * constraint.cc (norm_info::norm_info): Take a bool instead of
98 (norm_info::generate_diagnostics): Turn this predicate function
99 into a bool data member.
100 (normalize_logical_operation): Adjust after norm_info changes.
101 (normalize_concept_check): Likewise.
102 (normalize_atom): Likewise.
103 (get_normalized_constraints_from_info): Likewise.
104 (normalize_concept_definition): Likewise.
105 (normalize_constraint_expression): Likewise.
106 (normalize_placeholder_type_constraints): Likewise.
107 (satisfy_nondeclaration_constraints): Likewise.
108 * cp-tree.h (enum tsubst_flags): Remove tf_norm.
110 2024-05-13 Ken Matsui <kmatsui@gcc.gnu.org>
113 * semantics.cc (finish_trait_expr): Use rank instead of
116 2024-05-13 Patrick Palka <ppalka@redhat.com>
121 * pt.cc (maybe_aggr_guide): Fix obtaining TYPE_FIELDS in
122 the paren init case. Hoist out partial substitution logic
123 to apply to the paren init case as well.
124 (alias_ctad_tweaks): Substitute outer template arguments into
125 a guide's constraints.
127 2024-05-11 Ken Matsui <kmatsui@gcc.gnu.org>
129 * cp-trait.def: Define __is_nothrow_invocable.
130 * constraint.cc (diagnose_trait_expr): Handle
131 CPTK_IS_NOTHROW_INVOCABLE.
132 * semantics.cc (trait_expr_value): Likewise.
133 (finish_trait_expr): Likewise.
135 2024-05-11 Ken Matsui <kmatsui@gcc.gnu.org>
137 * cp-trait.def: Define __is_invocable.
138 * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_INVOCABLE.
139 * semantics.cc (trait_expr_value): Likewise.
140 (finish_trait_expr): Likewise.
141 * cp-tree.h (build_invoke): New function.
142 * method.cc (build_invoke): New function.
144 2024-05-11 Ken Matsui <kmatsui@gcc.gnu.org>
146 * cp-trait.def: Define __array_rank.
147 * constraint.cc (diagnose_trait_expr): Handle CPTK_RANK.
148 * semantics.cc (trait_expr_value): Likewise.
149 (finish_trait_expr): Likewise.
151 2024-05-11 Ken Matsui <kmatsui@gcc.gnu.org>
153 * cp-trait.def: Define __decay.
154 * semantics.cc (finish_trait_type): Handle CPTK_DECAY.
156 2024-05-11 Ken Matsui <kmatsui@gcc.gnu.org>
158 * cp-trait.def: Define __add_rvalue_reference.
159 * semantics.cc (finish_trait_type): Handle
160 CPTK_ADD_RVALUE_REFERENCE.
162 2024-05-11 Ken Matsui <kmatsui@gcc.gnu.org>
164 * cp-trait.def: Define __add_lvalue_reference.
165 * semantics.cc (finish_trait_type): Handle
166 CPTK_ADD_LVALUE_REFERENCE.
168 2024-05-11 Ken Matsui <kmatsui@gcc.gnu.org>
170 * cp-trait.def: Define __remove_all_extents.
171 * semantics.cc (finish_trait_type): Handle
172 CPTK_REMOVE_ALL_EXTENTS.
174 2024-05-11 Ken Matsui <kmatsui@gcc.gnu.org>
176 * cp-trait.def: Define __remove_extent.
177 * semantics.cc (finish_trait_type): Handle CPTK_REMOVE_EXTENT.
179 2024-05-11 Ken Matsui <kmatsui@gcc.gnu.org>
181 * cp-trait.def: Define __add_pointer.
182 * semantics.cc (finish_trait_type): Handle CPTK_ADD_POINTER.
183 (object_type_p): New function.
184 (referenceable_type_p): Likewise.
185 (trait_expr_value): Use object_type_p.
187 2024-05-11 Ken Matsui <kmatsui@gcc.gnu.org>
189 * cp-trait.def: Define __is_unbounded_array.
190 * constraint.cc (diagnose_trait_expr): Handle
191 CPTK_IS_UNBOUNDED_ARRAY.
192 * semantics.cc (trait_expr_value): Likewise.
193 (finish_trait_expr): Likewise.
195 2024-05-10 Jakub Jelinek <jakub@redhat.com>
198 * cp-tree.h (atexit_fn_ptr_type_node, cleanup_type): Adjust macro
200 (get_cxa_atexit_fn_ptr_type): Declare.
201 * decl.cc (get_atexit_fn_ptr_type): Adjust function comment, only
202 build type for atexit argument.
203 (get_cxa_atexit_fn_ptr_type): New function.
204 (get_atexit_node): Call get_cxa_atexit_fn_ptr_type rather than
205 get_atexit_fn_ptr_type when using __cxa_atexit.
206 (get_thread_atexit_node): Call get_cxa_atexit_fn_ptr_type
207 rather than get_atexit_fn_ptr_type.
208 (start_cleanup_fn): Add ob_parm argument, call
209 get_cxa_atexit_fn_ptr_type or get_atexit_fn_ptr_type depending
210 on it and create PARM_DECL also based on that argument.
211 (register_dtor_fn): Adjust start_cleanup_fn caller, use
212 get_cxa_atexit_fn_ptr_type rather than get_atexit_fn_ptr_type
214 * except.cc (build_throw): Use get_cxa_atexit_fn_ptr_type ().
216 2024-05-09 Marek Polacek <polacek@redhat.com>
219 * pt.cc (tsubst_expr) <case SIZEOF_EXPR>: Use copy_warning.
220 * semantics.cc (finish_parenthesized_expr): Also suppress
223 2024-05-09 Marek Polacek <polacek@redhat.com>
226 * lambda.cc (add_capture): Add a pedwarn for capturing structured
229 2024-05-08 Marek Polacek <polacek@redhat.com>
232 * parser.cc (cp_parser_label_for_labeled_statement): suppress_warning
233 if it's not enabled at input_location.
234 * pt.cc (tsubst_stmt): Call copy_warning.
236 2024-05-07 Nathaniel Shead <nathanieloshead@gmail.com>
239 * call.cc (make_temporary_var_for_ref_to_temp): Set context for
240 temporaries with linkage.
241 * init.cc (create_temporary_var): Revert to only set context
242 when in a function decl.
244 2024-05-07 Andrew Pinski <quic_apinski@quicinc.com>
247 * constexpr.cc (cxx_eval_array_reference): Compare main variants
248 for the vector/array types instead of the types directly.
250 2024-05-07 Jakub Jelinek <jakub@redhat.com>
253 * parser.cc (cp_parser_member_declaration): Implement C++26
254 P2893R3 - Variadic friends. Parse friend type declarations
255 with ... or with more than one friend type specifier.
256 * friend.cc (make_friend_class): Allow TYPE_PACK_EXPANSION.
257 * pt.cc (instantiate_class_template): Handle PACK_EXPANSION_P
260 2024-05-07 Marek Polacek <polacek@redhat.com>
262 * decl.cc (duplicate_decls): Don't check VAR_P before
263 DECL_DECOMPOSITION_P.
264 * init.cc (build_aggr_init): Likewise.
265 * parser.cc (cp_parser_range_for): Likewise.
266 (do_range_for_auto_deduction): Likewise.
267 (cp_convert_range_for): Likewise.
268 (cp_convert_omp_range_for): Likewise.
269 (cp_finish_omp_range_for): Likewise.
270 * pt.cc (extract_locals_r): Likewise.
271 (tsubst_omp_for_iterator): Likewise.
272 (tsubst_decomp_names): Likewise.
273 (tsubst_stmt): Likewise.
274 * typeck.cc (maybe_warn_about_returning_address_of_local): Likewise.
276 2024-05-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
278 * Make-lang.in (cc1plus$(exeext)): Remove $(NETLIBS).
280 2024-05-07 Nathaniel Shead <nathanieloshead@gmail.com>
283 * cp-tree.h (IS_FAKE_BASE_TYPE): Also apply to unions.
285 2024-05-07 Nathaniel Shead <nathanieloshead@gmail.com>
288 * cp-tree.h (remove_defining_module): Declare.
289 * decl.cc (duplicate_decls): Call remove_defining_module on
291 * module.cc (imported_temploid_friends): Mark as GTY root...
292 (init_modules): ...and allocate from ggc.
293 (trees_in::decl_value): Only track for declarations that won't
295 (remove_defining_module): New function.
297 2024-05-06 Qing Zhao <qing.zhao@oracle.com>
300 * decl.cc (layout_var_decl): Handle the cases when the DECL is
301 union with a flexible array member initializer.
303 2024-05-06 Qing Zhao <qing.zhao@oracle.com>
306 * class.cc (diagnose_flexarrays): Change error to pdewarn for the case
307 flexible array members alone in structures.
308 * decl.cc (grokdeclarator): Change error to pdewarn for the case
309 flexible array members in unions.
311 2024-05-03 Jason Merrill <jason@redhat.com>
314 * cp-gimplify.cc (cp_genericize_init): Add flags parm.
315 (cp_genericize_init_expr): Pass nullptr.
316 (cp_genericize_target_expr): Handle cleanup flags.
317 * typeck2.cc (build_disable_temp_cleanup): Factor out of...
318 (split_nonconstant_init): ...here.
319 * cp-tree.h (build_disable_temp_cleanup): Declare.
321 2024-05-03 Ken Matsui <kmatsui@gcc.gnu.org>
323 * cp-trait.def: Define __is_pointer.
324 * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_POINTER.
325 * semantics.cc (trait_expr_value): Likewise.
326 (finish_trait_expr): Likewise.
328 2024-05-03 Ken Matsui <kmatsui@gcc.gnu.org>
330 * cp-trait.def: Define __is_volatile.
331 * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_VOLATILE.
332 * semantics.cc (trait_expr_value): Likewise.
333 (finish_trait_expr): Likewise.
335 2024-05-03 Ken Matsui <kmatsui@gcc.gnu.org>
337 * cp-trait.def: Define __is_const.
338 * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_CONST.
339 * semantics.cc (trait_expr_value): Likewise.
340 (finish_trait_expr): Likewise.
342 2024-05-03 Patrick Palka <ppalka@redhat.com>
344 * coroutines.cc (instantiate_coro_traits): Adjust call to
345 lookup_template_class.
346 (instantiate_coro_handle_for_promise_type): Likewise.
347 * cp-tree.h (adjust_type_for_entering_scope): Declare.
348 (lookup_template_class): Adjust declaration.
349 * decl.cc (make_typename_type): Adjust call to
350 lookup_template_class. Likewise.
351 (get_tuple_size): Likewise.
352 (get_tuple_element_type): Likewise.
353 * pt.cc (adjust_type_for_entering_scope): Define.
354 (tsubst_entering_scope): Define.
355 (lookup_template_class): Remove entering_scope parameter.
356 Replace tsubst_aggr_type call with tsubst_entering_scope.
357 (tsubst_aggr_type): Remove.
358 (tsubst_aggr_type_1): Inline into tsubst.
359 (tsubst_function_decl): Replace tsubst_aggr_type call
360 with tsubst_entering_scope.
361 (tsubst_template_decl): Likewise.
362 (tsubst_decl): Likewise.
363 (tsubst) <case RECORD_TYPE, UNION_TYPE, ENUMERAL_TYPE>:
364 Inlined from tsubst_aggr_type_1.
365 <case BOUND_TEMPLATE_TEMPLATE_PARM>: Adjust calls to
366 lookup_template_class.
367 <case TYPENAME_TYPE>: Replace tsubst_aggr_type call with
368 tsubst_entering_scope.
369 <case UNBOUND_CLASS_TEMPLATE>: Likewise.
370 Increment processing_template_decl when substituting the
372 (tsubst_expr) <case FIELD_DECL>: Replace tsubst_aggr_type
373 call with tsubst_entering_scope.
374 <case TEMPLATE_DECL>: Likewise.
375 (instantiate_template): Likewise.
376 (resolve_typename_type): Adjust lookup_template_class call
377 and call adjust_type_for_entering_scope afterward.
378 (listify): Adjust lookup_template_class call.
379 (alias_ctad_tweaks): Likewise.
380 * semantics.cc (finish_template_type): Adjust lookup_template_class
381 call and maybe call adjust_type_for_entering_scope afterward.
383 2024-05-02 Nathaniel Shead <nathanieloshead@gmail.com>
386 * parser.cc (cp_parser_declaration_seq_opt): Clear
387 parser->in_unbraced_* flags when parsing toplevel declarations.
389 2024-05-02 Jakub Jelinek <jakub@redhat.com>
392 * parser.cc (cp_parser_pure_specifier): Implement C++26 P2573R2
393 - = delete("should have a reason");. Parse deleted-function-body.
394 * decl.cc (duplicate_decls): Copy DECL_INITIAL from DECL_DELETED_FN
395 olddecl to newdecl if it is a STRING_CST.
396 (cp_finish_decl): Handle deleted init with a reason.
397 * decl2.cc: Include "escaped_string.h".
398 (grokfield): Handle deleted init with a reason.
399 (mark_used): Emit DECL_DELETED_FN reason in the message if any.
400 * cp-tree.h (DECL_DELETED_FN): Document representation of
401 = delete("reason") on a DECL.
403 2024-05-02 Nathaniel Shead <nathanieloshead@gmail.com>
406 * module.cc (depset::hash::add_partial_entities): Mark GM
407 specializations as unreached.
408 (depset::hash::find_dependencies): Also reach entities in the
409 DECL_TEMPLATE_SPECIALIZATIONS list.
411 2024-05-02 Nathaniel Shead <nathanieloshead@gmail.com>
414 * class.cc (finish_struct_1): Also push classes attached to a
415 module into the 'keyed_classes' list.
416 * decl.cc (record_key_method_defined): Don't push classes
417 attached to a named module into the 'keyed_classes' list.
418 * module.cc (trees_in::read_class_def): Likewise.
419 * decl2.cc (import_export_class): Uniquely emit vtables for
420 non-template classes attached to a named module.
421 (vtables_uniquely_emitted): New function.
422 (import_export_decl): Update comments. Update with knowledge
423 about new kinds of uniquely emitted vtables.
425 2024-05-01 Jason Merrill <jason@redhat.com>
427 * cp-tree.h (base_ctor_identifier): Adjust comment.
428 * call.cc (in_charge_arg_for_name): Abort on deleting dtor.
429 * decl2.cc (maybe_retrofit_in_chrg): Don't add it for
430 destructors without vbases, either.
431 * constexpr.cc (cxx_eval_call_expression): Remove workaround.
433 2024-05-01 Jason Merrill <jason@redhat.com>
436 * decl.cc (decls_match): Handle memchr return type being
439 2024-05-01 Nathaniel Shead <nathanieloshead@gmail.com>
441 * name-lookup.cc (walk_module_binding): Use the
442 partition-specific hidden flag instead of the top-level
445 2024-05-01 Nathaniel Shead <nathanieloshead@gmail.com>
448 * module.cc (depset::hash::add_binding_entity): Propagate
449 OVL_USING_P for using-declarations.
451 2024-05-01 Nathaniel Shead <nathanieloshead@gmail.com>
454 * name-lookup.cc (push_namespace): Error when exporting
455 namespace with internal linkage.
456 * parser.h (struct cp_parser): Add new flag
457 'in_unbraced_export_declaration_p'.
458 * parser.cc (cp_debug_parser): Print the new flag.
459 (cp_parser_new): Initialise the new flag.
460 (cp_parser_module_export): Set the new flag.
461 (cp_parser_class_specifier): Clear and restore the new flag.
462 (cp_parser_import_declaration): Imports can now appear directly
463 in a linkage specification.
464 (cp_parser_declaration): Categorise declarations as "name" or
465 "special"; error on the later in contexts where the former is
467 (cp_parser_class_head): Error when exporting a partial
470 2024-04-30 Jakub Jelinek <jakub@redhat.com>
473 * parser.cc (cp_parser_decomposition_declaration): Implement C++26
474 P0609R3 - Attributes for Structured Bindings. Parse attributed
475 identifier lists for structured binding declarations, pass the
476 attributes to start_decl.
478 2024-04-30 Nathaniel Shead <nathanieloshead@gmail.com>
482 * cp-tree.h (propagate_defining_module): Declare.
483 (lookup_imported_hidden_friend): Declare.
484 * decl.cc (duplicate_decls): Also check if hidden decls can be
485 redeclared in this module.
486 * module.cc (imported_temploid_friends): New.
487 (init_modules): Initialize it.
488 (trees_out::decl_value): Write it; don't consider imported
489 temploid friends as attached to a module.
490 (trees_in::decl_value): Read it.
491 (get_originating_module_decl): Follow the owning decl for an
492 imported temploid friend.
493 (propagate_defining_module): New.
494 * name-lookup.cc (get_mergeable_namespace_binding): New.
495 (lookup_imported_hidden_friend): New.
496 * pt.cc (tsubst_friend_function): Propagate defining module for
497 new friend functions.
498 (tsubst_friend_class): Lookup imported hidden friends. Check
499 for valid module attachment of existing names. Propagate
500 defining module for new classes.
502 2024-04-30 Nathaniel Shead <nathanieloshead@gmail.com>
504 * cp-tree.h (module_may_redeclare): Add default parameter.
505 * decl.cc (duplicate_decls): Don't emit errors for failed
506 module_may_redeclare.
507 (xref_tag): Likewise.
508 (start_enum): Likewise.
509 * semantics.cc (begin_class_definition): Likewise.
510 * module.cc (module_may_redeclare): Clean up logic. Emit error
513 2024-04-30 Patrick Palka <ppalka@redhat.com>
516 * module.cc (trees_in::read_class_def): Look through
517 TEMPLATE_DECL when adding to CLASSTYPE_BEFRIENDING_CLASSES.
519 2024-04-30 Patrick Palka <ppalka@redhat.com>
522 * typeck.cc (cp_build_binary_op) <case *_DIV_*>: Add missing
523 dependence check for the second sizeof operand.
525 2024-04-26 Patrick Palka <ppalka@redhat.com>
527 * error.cc (print_instantiation_partial_context_line): Clear the
528 pretty printer prefix around the call to diagnostic_show_locus.
530 2024-04-25 Jakub Jelinek <jakub@redhat.com>
533 * constexpr.cc (cxx_bind_parameters_in_call): For PARM_DECLs with
534 TREE_ADDRESSABLE types use vc_glvalue rather than vc_prvalue for
535 cxx_eval_constant_expression and if it doesn't have the same
536 type as it should, cast the reference type to reference to type
537 before convert_from_reference and instead of adjust_temp_type
538 take address of the arg, cast to reference to type and then
539 convert_from_reference.
540 (cxx_eval_constant_expression) <case PARM_DECL>: For lval case
541 on parameters with TREE_ADDRESSABLE types lookup result in
542 ctx->globals if possible. Otherwise if lookup in ctx->globals
543 was successful for parameter with TREE_ADDRESSABLE type,
544 recurse with vc_prvalue on the returned value.
546 2024-04-25 Jakub Jelinek <jakub@redhat.com>
549 * cp-tree.h (maybe_optimize_cdtor): Declare.
550 * decl2.cc (import_export_decl): Call it for cloned cdtors.
551 * optimize.cc (maybe_optimize_cdtor): New function.
553 2024-04-24 Patrick Palka <ppalka@redhat.com>
556 * constexpr.cc (cxx_fold_indirect_ref): Restrict object/offset
557 canonicalization to RECORD_TYPE member accesses.
559 2024-04-23 Nathaniel Shead <nathanieloshead@gmail.com>
561 * parser.cc (cp_parser_parameter_declaration): Check if
562 decl_specifiers.type is null.
564 2024-04-23 Patrick Palka <ppalka@redhat.com>
567 * module.cc (trees_in::is_matching_decl): Propagate deduced
568 function return type.
570 2024-04-23 Jakub Jelinek <jakub@redhat.com>
572 * parser.cc (cp_parser_using_declaration): Spelling fix: favour
575 2024-04-23 Jakub Jelinek <jakub@redhat.com>
578 * method.cc (implicitly_declare_fn): Call clone_attrs
579 on DECL_ATTRIBUTES on STRIP_TEMPLATE (inherited_ctor) rather than
580 inherited_ctor. Also copy DECL_DISREGARD_INLINE_LIMITS flag from it.
582 2024-04-23 Nathaniel Shead <nathanieloshead@gmail.com>
585 * decl.cc (grokdeclarator): Check allocation functions for xobj
588 2024-04-16 Jakub Jelinek <jakub@redhat.com>
591 * constexpr.cc (check_bit_cast_type): Handle ARRAY_TYPE.
593 2024-04-15 Nathaniel Shead <nathanieloshead@gmail.com>
594 Patrick Palka <ppalka@redhat.com>
597 * module.cc (depset::hash::add_binding_entity): Require both
598 WMB_Using and WMB_Export for GMF entities.
600 2024-04-14 Nathaniel Shead <nathanieloshead@gmail.com>
603 * module.cc (trees_in::decl_value): Assemble alias when needed.
605 2024-04-13 Patrick Palka <ppalka@redhat.com>
607 * module.cc (struct bytes_in::bits_in): Define defaulted
609 (struct bytes_out::bits_out): Likewise.
611 2024-04-13 Patrick Palka <ppalka@redhat.com>
613 * module.cc: Update comment about classes defined within.
614 (class data): Enclose in an anonymous namespace.
615 (data::calc_crc): Moved from bytes::calc_crc.
616 (class bytes): Remove. Move bit_flush to namespace scope.
617 (class bytes_in): Enclose in an anonymous namespace. Inherit
618 directly from data and adjust accordingly. Move b and bflush
620 (class bytes_out): As above. Remove is_set static data member.
621 (bit_flush): Moved from class bytes.
622 (struct bytes_in::bits_in): Define.
623 (struct bytes_out::bits_out): Define.
624 (bytes_in::stream_bits): Define.
625 (bytes_out::stream_bits): Define.
626 (bytes_out::bflush): Moved to bits_out/in.
627 (bytes_in::bflush): Likewise
628 (bytes_in::bfill): Removed.
629 (bytes_out::b): Moved to bits_out/in.
630 (bytes_in::b): Likewise.
631 (class trees_in): Enclose in an anonymous namespace.
632 (class trees_out): Enclose in an anonymous namespace.
633 (trees_out::core_bools): Add bits_out/in parameter and use it.
634 Unconditionally stream a bit for public_flag. Add early exits
636 (trees_out::core_bools): Likewise.
637 (trees_out::lang_decl_bools): Add bits_out/in parameter and use
638 it. Flush the current bit buffer at the start. Unconditionally
639 stream a bit for module_keyed_decls_p.
640 (trees_in::lang_decl_bools): Likewise.
641 (trees_out::lang_type_bools): Add bits_out/in parameter and use
642 it. Flush the current bit buffer at the start.
643 (trees_in::lang_type_bools): Likewise.
644 (trees_out::tree_node_bools): Construct a bits_out object and
646 (trees_in::tree_node_bools): Likewise.
647 (trees_out::decl_value): Likewise.
648 (trees_in::decl_value): Likewise.
649 (module_state::write_define): Likewise.
650 (module_state::read_define): Likewise.
652 2024-04-12 Marek Polacek <polacek@redhat.com>
655 * typeck2.cc (potential_prvalue_result_of): Remove.
656 (replace_placeholders_for_class_temp_r): Check TARGET_EXPR_ELIDING_P.
657 Use a pset. Don't replace_placeholders in TARGET_EXPRs that initialize
660 2024-04-12 Patrick Palka <ppalka@redhat.com>
663 * module.cc (merge_kind::MK_local_type): New enumerator.
664 (merge_kind_name): Update.
665 (trees_out::chained_decls): Move BLOCK-specific handling
666 of DECL_LOCAL_DECL_P decls to ...
667 (trees_out::core_vals) <case BLOCK>: ... here. Stream
669 (trees_in::core_vals) <case BLOCK>: Stream BLOCK_VARS
670 manually. Handle deduplicated local types..
671 (trees_out::key_local_type): Define.
672 (trees_in::key_local_type): Define.
673 (trees_out::get_merge_kind) <case FUNCTION_DECL>: Return
674 MK_local_type for a local type.
675 (trees_out::key_mergeable) <case FUNCTION_DECL>: Use
677 (trees_in::key_mergeable) <case FUNCTION_DECL>: Likewise.
678 (trees_in::is_matching_decl): Be flexible with type mismatches
680 (trees_in::register_duplicate): Also register the
681 DECL_TEMPLATE_RESULT of a TEMPLATE_DECL as a duplicate.
682 (depset_cmp): Return 0 for equal IDENTIFIER_HASH_VALUEs.
684 2024-04-12 Jason Merrill <jason@redhat.com>
685 Patrick Palka <ppalka@redhat.com>
688 * call.cc (reference_binding): For an invalid cast, warn and don't
691 2024-04-12 Jason Merrill <jason@redhat.com>
692 Patrick Palka <ppalka@redhat.com>
696 * call.cc (reference_binding): Check direct binding from
697 a single-element list.
699 2024-04-12 Jakub Jelinek <jakub@redhat.com>
702 * semantics.cc (simplify_loop_decl_cond): Use cp_build_unary_op with
703 TRUTH_NOT_EXPR on ANNOTATE_EXPR argument (if any) rather than
704 ANNOTATE_EXPR itself.
706 2024-04-12 Patrick Palka <ppalka@redhat.com>
709 * pt.cc (tsubst_lambda_expr): Also defer all dependent
712 2024-04-12 Jakub Jelinek <jakub@redhat.com>
715 * constexpr.cc (is_valid_constexpr_fn): Return false/diagnose with
716 complain destructors in classes with virtual bases.
718 2024-04-12 Patrick Palka <ppalka@redhat.com>
723 * cp-tree.h (LAMBDA_EXPR_EXTRA_ARGS): Define.
724 (tree_lambda_expr::extra_args): New field.
725 * module.cc (trees_out::core_vals) <case LAMBDA_EXPR>: Stream
726 LAMBDA_EXPR_EXTRA_ARGS.
727 (trees_in::core_vals) <case LAMBDA_EXPR>: Likewise.
728 * pt.cc (has_extra_args_mechanism_p): Return true for LAMBDA_EXPR.
729 (tree_extra_args): Handle LAMBDA_EXPR.
730 (tsubst_lambda_expr): Use LAMBDA_EXPR_EXTRA_ARGS to defer templated
731 substitution into a lambda-expr if we lost the template context.
732 Add sanity check for error_mark_node result from begin_lambda_type.
734 2024-04-11 Patrick Palka <ppalka@redhat.com>
737 * constraint.cc (tsubst_requires_expr): Clear
738 REQUIRES_EXPR_EXTRA_ARGS before calling build_extra_args.
739 * pt.cc (tree_extra_args): Define.
740 (extract_locals_r): Assert *_EXTRA_ARGS is empty.
741 (tsubst_stmt) <case IF_STMT>: Clear IF_SCOPE on the new
742 IF_STMT. Call build_extra_args on the new IF_STMT instead
743 of t which might already have IF_STMT_EXTRA_ARGS.
745 2024-04-11 Jakub Jelinek <jakub@redhat.com>
748 * pt.cc (tsubst_expr) <case ANNOTATE_EXPR>: Move to ...
749 (tsubst_stmt) <case ANNOTATE_EXPR>: ... here. Use tsubst_expr
750 instead of RECUR for the last 2 arguments.
752 2024-04-10 Jakub Jelinek <jakub@redhat.com>
755 * semantics.cc: Implement C++26 P2809R3 - Trivial infinite
756 loops are not Undefined Behavior.
757 (maybe_warn_for_constant_evaluated): Add trivial_infinite argument
758 and emit special diagnostics for that case.
759 (finish_if_stmt_cond): Adjust caller.
760 (finish_loop_cond): New function.
761 (finish_while_stmt): Use it.
762 (finish_do_stmt): Likewise.
763 (finish_for_stmt): Likewise.
765 2024-04-10 Nathaniel Shead <nathanieloshead@gmail.com>
768 * semantics.cc (expand_or_defer_fn_1): Keep DECL_SAVED_TREE for
769 all vague linkage cdtors with modules.
771 2024-04-10 Nathaniel Shead <nathanieloshead@gmail.com>
774 * module.cc (trees_in::install_entity): Overwrite entity map
775 index if installing from a partition.
777 2024-04-09 Jakub Jelinek <jakub@redhat.com>
780 * semantics.cc (finish_if_stmt_cond): Call
781 maybe_warn_for_constant_evaluated with IF_STMT_CONSTEXPR_P (if_stmt)
782 as the second argument, rather than true/false depending on if
783 it is if constexpr with non-dependent constant expression with
786 2024-04-09 Jakub Jelinek <jakub@redhat.com>
788 * constexpr.cc (build_new_constexpr_heap_type): Fix duplicated words
789 in comment; is is -> is.
790 * cp-tree.def (CO_RETURN_EXPR): Fix duplicated words in comment;
792 * parser.cc (fixup_blocks_walker): Fix duplicated words in comment;
794 * semantics.cc (fixup_template_type): Fix duplicated words in comment;
796 (finish_omp_for): Fix duplicated words in comment; the the -> the.
797 * pt.cc (more_specialized_fn): Fix duplicated words in comment;
798 think think -> think.
799 (type_targs_deducible_from): Fix duplicated words in comment; the the
802 2024-04-05 Marek Polacek <polacek@redhat.com>
805 * constexpr.cc (get_function_named_in_call): Use
806 cp_get_fndecl_from_callee.
807 * cvt.cc (cp_get_fndecl_from_callee): If there's a
808 DECL_LOCAL_DECL_ALIAS, use it.
810 2024-04-05 Jakub Jelinek <jakub@redhat.com>
813 * cp-gimplify.cc (cxx_omp_clause_apply_fn): Call build_cplus_new
814 on build_call_a result if it has class type.
816 2024-04-04 centurion <centurion009@proton.me>
819 * pt.cc (find_template_parameter_info::found): Use TREE_TYPE for
820 TEMPLATE_DECL instead of DECL_INITIAL.
822 2024-04-02 Marek Polacek <polacek@redhat.com>
825 * semantics.cc (trait_expr_value) <case CPTK_IS_ARRAY>: Return false
826 for zero-sized arrays.
828 2024-04-02 Marek Polacek <polacek@redhat.com>
831 * typeck.cc (is_bitfield_expr_with_lowered_type): Handle
834 2024-04-02 Jason Merrill <jason@redhat.com>
838 * call.cc (convert_like_internal): Avoid adding qualification
839 conversion in direct reference binding.
841 2024-04-01 Jason Merrill <jason@redhat.com>
843 * typeck.cc (maybe_warn_about_returning_address_of_local):
846 2024-03-28 Jason Merrill <jason@redhat.com>
849 * semantics.cc (same_type_ref_bind_p): New.
850 (finish_trait_expr): Use it.
852 2024-03-26 Jakub Jelinek <jakub@redhat.com>
855 * error.cc (dump_expr): Handle EXCESS_PRECISION_EXPR like NOP_EXPR.
857 2024-03-25 Marek Polacek <polacek@redhat.com>
860 * name-lookup.cc (maybe_push_to_top_level): For a non-lambda,
861 don't push to top level if decl_function_context is non-null.
862 * pt.cc (maybe_instantiate_noexcept): Use maybe_push_to_top_level.
864 2024-03-25 Marek Polacek <polacek@redhat.com>
867 * init.cc (can_init_array_with_p): Return true for a VEC_INIT_EXPR
868 wrapped in a TARGET_EXPR.
870 2024-03-22 Marek Polacek <polacek@redhat.com>
873 * init.cc (can_init_array_with_p): New.
874 (perform_member_init): Check it.
876 2024-03-21 Marek Polacek <polacek@redhat.com>
879 * decl2.cc (min_vis_expr_r) <case VAR_DECL>: Do nothing for
880 decl_constant_var_p VAR_DECLs.
882 2024-03-20 Jakub Jelinek <jakub@redhat.com>
884 * coroutines.cc (expand_one_await_expression): Use
885 integer_zero_node instead of build_int_cst (integer_type_node, 0)
886 and integer_one_node instead of build_int_cst (integer_type_node, 1).
888 2024-03-19 Nathaniel Shead <nathanieloshead@gmail.com>
890 * cp-tree.h (module_maybe_has_cmi_p): New function.
891 * decl.cc (grokfndecl): Mark block-scope functions as public if
892 they could be visible in other TUs.
893 * decl2.cc (no_linkage_error): Don't error for declarations that
894 could be defined in other TUs since C++20. Suppress duplicate
895 errors from 'check_global_declaration'.
896 * tree.cc (no_linkage_check): In relaxed mode, don't consider
897 types in a module CMI to have no linkage.
899 2024-03-16 Nathaniel Shead <nathanieloshead@gmail.com>
902 * cp-tree.h (named_module_attach_p): New function.
903 * decl.cc (start_decl): Check for attachment not purview.
904 (grokmethod): Likewise.
906 2024-03-14 Chung-Lin Tang <cltang@baylibre.com>
908 * parser.cc (cp_parser_oacc_data_clause): Add parsing support for
909 'readonly' modifier, set OMP_CLAUSE_MAP_READONLY if readonly modifier
910 found, update comments.
911 (cp_parser_oacc_cache): Add parsing support for 'readonly' modifier,
912 set OMP_CLAUSE__CACHE__READONLY if readonly modifier found, update
915 2024-03-12 Nathaniel Shead <nathanieloshead@gmail.com>
920 * module.cc (enum tree_tag): Add new tag for builtin types.
921 (trees_out::start): POLY_INT_CSTs can be emitted.
922 (trees_in::start): Likewise.
923 (trees_out::core_vals): Stream POLY_INT_CSTs.
924 (trees_in::core_vals): Likewise.
925 (trees_out::type_node): Handle vectors with multiple coeffs.
926 (trees_in::tree_node): Likewise.
927 (init_modules): Register target-specific builtin types. Bump
928 initial capacity slightly.
930 2024-03-08 Jakub Jelinek <jakub@redhat.com>
932 * pt.cc (tsubst_expr): Handle MEM_REF.
934 2024-03-08 Jakub Jelinek <jakub@redhat.com>
937 * cp-objcp-common.cc (cp_type_dwarf_attribute): Return 1
938 for DW_AT_export_symbols on anonymous structs or unions.
940 2024-03-08 Jakub Jelinek <jakub@redhat.com>
943 * parser.cc (cp_parser_parameter_declaration): Move the xobj_param_p
944 pack diagnostics after ellipsis handling and if an error is reported,
945 pretend this specifier didn't appear. Formatting fix.
947 2024-03-07 Nathaniel Shead <nathanieloshead@gmail.com>
950 * module.cc (trees_out::core_bools): Redetermine
951 DECL_INTERFACE_KNOWN on stream-in for vtables and tinfo.
952 * decl2.cc (import_export_decl): Add fixme for ABI changes with
953 module vtables and tinfo.
955 2024-03-07 Patrick Palka <ppalka@redhat.com>
958 * cp-tree.h (add_mergeable_specialization): Remove second
960 * module.cc (depset::disc_bits::DB_ALIAS_TMPL_INST_BIT): Remove.
961 (depset::disc_bits::DB_ALIAS_SPEC_BIT): Remove.
962 (depset::is_alias_tmpl_inst): Remove.
963 (depset::is_alias): Remove.
964 (merge_kind::MK_tmpl_alias_mask): Remove.
965 (merge_kind::MK_alias_spec): Remove.
966 (merge_kind_name): Remove entries for alias specializations.
967 (trees_out::core_vals) <case TEMPLATE_DECL>: Adjust after
968 removing is_alias_tmpl_inst.
969 (trees_in::decl_value): Adjust add_mergeable_specialization
971 (trees_out::get_merge_kind) <case depset::EK_SPECIALIZATION>:
972 Use MK_decl_spec for alias template specializations.
973 (trees_out::key_mergeable): Simplify after MK_tmpl_alias_mask
975 (depset::hash::make_dependency): Adjust after removing
976 DB_ALIAS_TMPL_INST_BIT.
977 (specialization_add): Don't allow alias templates when !decl_p.
978 (depset::hash::add_specializations): Remove now-dead code
979 accomodating alias template specializations in the type table.
980 * pt.cc (lookup_template_class): Dispatch early to
981 instantiate_alias_template for alias templates. Simplify
983 (add_mergeable_specialization): Remove alias_p parameter and
984 simplify accordingly.
986 2024-03-07 Patrick Palka <ppalka@redhat.com>
990 * module.cc (module_state::write_namespaces): Stream the
991 abi_tag attribute of an inline namespace.
992 (module_state::read_namespaces): Likewise.
994 2024-03-07 Marek Polacek <polacek@redhat.com>
997 * pt.cc (lookup_and_finish_template_variable): Pass complain to
1000 2024-03-07 Nathaniel Shead <nathanieloshead@gmail.com>
1003 * typeck2.cc (cxx_incomplete_type_diagnostic): Don't assume
1004 'member' will be a FUNCTION_DECL (or something like it).
1006 2024-03-07 Nathaniel Shead <nathanieloshead@gmail.com>
1009 * module.cc (trees_out::tpl_parms_fini): Stream out DECL_CONTEXT
1010 for template template parameters.
1011 (trees_in::tpl_parms_fini): Read it.
1013 2024-03-06 Marek Polacek <polacek@redhat.com>
1016 * pt.cc (maybe_instantiate_noexcept): Save/restore
1017 cp_unevaluated_operand, c_inhibit_evaluation_warnings, and
1018 cp_noexcept_operand around the tsubst_expr call.
1020 2024-03-06 Nathaniel Shead <nathanieloshead@gmail.com>
1023 * pt.cc (type_unification_real): Only use DEDUCE_CONV for the
1024 return type of a conversion function.
1026 2024-03-06 Patrick Palka <ppalka@redhat.com>
1028 * module.cc (trees_out::get_merge_kind) <case depset::EK_DECL>:
1029 Accomodate class-scope DECL_UNINSTANTIATED_TEMPLATE_FRIEND_P
1030 TEMPLATE_DECL. Consolidate IDENTIFIER_ANON_P cases.
1032 2024-03-05 Patrick Palka <ppalka@redhat.com>
1034 * parser.cc (cp_parser_translation_unit): Relax GMF contents
1035 error into a pedwarn.
1037 2024-03-04 Nathaniel Shead <nathanieloshead@gmail.com>
1039 * name-lookup.cc (walk_module_binding): Remove completed FIXME.
1040 (do_nonmember_using_decl): Mark redeclared entities as exported
1041 when needed. Check for re-exporting internal linkage types.
1043 2024-03-01 Patrick Palka <ppalka@redhat.com>
1047 * module.cc (depset::hash::sneakoscope): Remove.
1048 (trees_out::decl_node): Always add a dependency on a local type.
1049 (depset::hash::find_dependencies): Remove sneakoscope stuff.
1051 2024-03-01 Nathaniel Shead <nathanieloshead@gmail.com>
1054 * module.cc (has_definition): Fall back to DECL_INITIALIZED_P
1055 when DECL_INITIAL is not set on a template.
1056 (module_state::write_inits): Only increment count when
1057 initializers are actually written.
1059 2024-03-01 Nathaniel Shead <nathanieloshead@gmail.com>
1062 * init.cc (create_temporary_var): Use current_scope instead of
1063 current_function_decl.
1065 2024-03-01 Patrick Palka <ppalka@redhat.com>
1067 * decl.cc (maybe_register_incomplete_var): Restrict second
1068 branch to static data members from a not-yet-complete class.
1070 2024-03-01 Marek Polacek <polacek@redhat.com>
1074 * call.cc (no_dangling_p): New.
1075 (reference_like_class_p): Use it.
1076 (do_warn_dangling_reference): Use it. Don't warn when the function
1077 or its enclosing class has attribute gnu::no_dangling.
1078 * tree.cc (cxx_gnu_attributes): Add gnu::no_dangling.
1079 (handle_no_dangling_attribute): New.
1081 2024-03-01 Patrick Palka <ppalka@redhat.com>
1085 * cp-tree.h (make_cast_auto): Declare.
1086 * parser.cc (cp_parser_functional_cast): If the type is an auto,
1087 replace it with a level-less one via make_cast_auto.
1088 * pt.cc (find_parameter_packs_r): Don't treat level-less auto
1089 as a type parameter pack.
1090 (tsubst) <case TEMPLATE_TYPE_PARM>: Generalize CTAD placeholder
1091 auto handling to all level-less autos.
1092 (make_cast_auto): Define.
1093 (do_auto_deduction): Handle replacement of a level-less auto.
1095 2024-03-01 Jakub Jelinek <jakub@redhat.com>
1098 * decl.cc (lookup_decomp_type): Return NULL_TREE if decomp_type_table
1099 doesn't have entry for V.
1100 * semantics.cc (finish_decltype_type): If ptds.saved, assert
1101 DECL_HAS_VALUE_EXPR_P is true and decide on tuple vs. non-tuple based
1102 on if lookup_decomp_type is NULL or not.
1104 2024-02-29 Marek Polacek <polacek@redhat.com>
1107 * call.cc (conv_binds_to_reference_parm_p): New.
1108 * cp-tree.h (conv_binds_to_reference_parm_p): Declare.
1109 * init.cc (find_uninit_fields_r): Call it.
1111 2024-02-29 Nathaniel Shead <nathanieloshead@gmail.com>
1114 * cp-tree.h (DECL_MODULE_KEYED_DECLS_P): Remove tree checking.
1115 (struct lang_decl_base): Update comments and fix whitespace.
1116 * module.cc (trees_out::lang_decl_bools): Always write
1117 module_keyed_decls_p flag...
1118 (trees_in::lang_decl_bools): ...and always read it.
1119 (trees_out::decl_value): Handle all kinds of keyed decls.
1120 (trees_in::decl_value): Likewise.
1121 (trees_in::tree_value): Deduplicate LAMBDA_EXPRs.
1122 (maybe_key_decl): Also support lambdas attached to fields,
1123 parameters, and types. Key lambdas attached to fields to their
1125 (trees_out::get_merge_kind): Likewise.
1126 (trees_out::key_mergeable): Likewise.
1127 (trees_in::key_mergeable): Support keyed decls in a TYPE_DECL
1129 * parser.cc (cp_parser_class_head): Start a lambda scope when
1130 parsing base classes.
1132 2024-02-28 Jakub Jelinek <jakub@redhat.com>
1133 Patrick Palka <ppalka@redhat.com>
1136 * decl.cc (grokdeclarator): Don't call cp_apply_type_quals_to_decl
1137 on DECL_TEMPLATE_INSTANTIATED VAR_DECLs.
1139 2024-02-28 Nathaniel Shead <nathanieloshead@gmail.com>
1143 * decl.cc (make_rtl_for_nonlocal_decl): Don't defer inline
1146 2024-02-23 Jakub Jelinek <jakub@redhat.com>
1149 * cp-gimplify.cc (cp_fold): For targetm.cxx.cdtor_returns_this ()
1150 wrap r into a COMPOUND_EXPR and return folded CALL_EXPR_ARG (x, 0).
1152 2024-02-19 Patrick Palka <ppalka@redhat.com>
1155 * constraint.cc (tsubst_compound_requirement): Don't check
1156 the noexcept condition or the return-type-requirement when
1157 partially substituting.
1159 2024-02-17 Marek Polacek <polacek@redhat.com>
1162 * search.cc (maybe_check_overriding_exception_spec): Defer checking
1163 when a noexcept couldn't be instantiated & evaluated to false/true.
1165 2024-02-16 Marek Polacek <polacek@redhat.com>
1168 * search.cc (maybe_check_overriding_exception_spec): Don't error about
1169 a looser exception specification if the overrider is deleted.
1171 2024-02-16 Marek Polacek <polacek@redhat.com>
1175 * typeck.cc (treat_lvalue_as_rvalue_p): Update code to better
1176 reflect [expr.prim.id.unqual]#4.2.
1178 2024-02-16 Jakub Jelinek <jakub@redhat.com>
1181 * parser.cc (cp_parser_parameter_declaration): Diagnose this specifier
1182 on template parameter declaration.
1184 2024-02-16 Patrick Palka <ppalka@redhat.com>
1186 * module.cc (trees_out::core_bools): Stream TREE_UNAVAILABLE.
1187 (trees_in::core_bools): Likewise.
1188 (trees_out::core_vals): Stream LAMBDA_EXPR_REGEN_INFO.
1189 (trees_in::core_vals): Likewise.
1191 2024-02-14 Nathaniel Shead <nathanieloshead@gmail.com>
1194 * decl.cc (make_rtl_for_nonlocal_decl): Defer inline variables.
1195 * decl2.cc (import_export_decl): Support inline variables.
1197 2024-02-14 Patrick Palka <ppalka@redhat.com>
1201 * method.cc (synthesized_method_walk): Use maybe_push_to_top_level.
1203 2024-02-14 Nathaniel Shead <nathanieloshead@gmail.com>
1206 * decl.cc (start_enum): Reorder check for redeclaring in module.
1207 Add missing auto_diagnostic_groups.
1209 2024-02-13 Marek Polacek <polacek@redhat.com>
1213 * parser.cc (cp_parser_member_declaration): Only pedwarn about an extra
1216 2024-02-13 Tobias Burnus <tburnus@baylibre.com>
1218 PR middle-end/113904
1219 * parser.cc (cp_parser_omp_context_selector): Handle splitting of
1220 OMP_TRAIT_PROPERTY_EXPR into OMP_TRAIT_PROPERTY_{DEV_NUM,BOOL}_EXPR.
1222 2024-02-13 Patrick Palka <ppalka@redhat.com>
1224 * Make-lang.in (CFLAGS-cp/module.o): Add $(ZLIBINC).
1225 * module.cc: Include <zlib.h>.
1226 (bytes::calc_crc): Use crc32 from zlib.
1227 (bytes_out::set_crc): Use crc32_combine from zlib.
1229 2024-02-13 Patrick Palka <ppalka@redhat.com>
1231 * module.cc (depset::hash::add_specializations): Use
1232 STRIP_TEMPLATE consistently.
1233 (get_originating_module_decl): Handle class-scope CONST_DECL.
1235 2024-02-13 Patrick Palka <ppalka@redhat.com>
1237 * lambda.cc (lambda_function): Call get_class_binding_direct
1238 instead of lookup_member to sidestep lazy loading.
1239 * name-lookup.cc (check_local_shadow): Punt if we're in a
1240 function context that's not actual parsing.
1242 2024-02-13 Jason Merrill <jason@redhat.com>
1245 * pt.cc (process_partial_specialization): Return early
1248 2024-02-13 Marek Polacek <polacek@redhat.com>
1251 * except.cc (expand_start_catch_block): Pass tf_warning_or_error to
1252 is_admissible_throw_operand_or_catch_parameter.
1253 (build_throw): Pass complain to
1254 is_admissible_throw_operand_or_catch_parameter.
1255 (complete_ptr_ref_or_void_ptr_p): Add a tsubst_flags_t parameter. Use
1256 it. Return bool. Call complete_type_or_maybe_complain instead of
1257 complete_type_or_else.
1258 (is_admissible_throw_operand_or_catch_parameter): Add a tsubst_flags_t
1259 parameter. Use it. Guard error calls.
1261 2024-02-13 Alex Coplan <alex.coplan@arm.com>
1264 * cp-objcp-common.cc (cp_feature_table): Remove entry for
1265 cxx_constexpr_string_builtins.
1267 2024-02-12 Marek Polacek <polacek@redhat.com>
1270 * constexpr.cc (cxx_eval_switch_expr): If the condition doesn't reduce
1271 to an INTEGER_CST, consider it non-constant.
1273 2024-02-10 Marek Polacek <polacek@redhat.com>
1278 * parser.cc (cp_parser_unqualified_id): Downgrade the DR2237 error to
1280 (cp_parser_constructor_declarator_p): Likewise.
1282 2024-02-10 Jakub Jelinek <jakub@redhat.com>
1284 * tree.cc (debug_binfo): Use HOST_WIDE_INT_PRINT_DEC instead of "%ld"
1286 * pt.cc (print_template_statistics): Use HOST_SIZE_T_PRINT_DEC
1287 and casts to fmt_size_t instead of "%ld" and casts to long.
1288 * class.cc (dump_class_hierarchy_1): Use HOST_WIDE_INT_PRINT_UNSIGNED
1289 instead of "%lu" and casts to unsigned long. For TYPE_ALIGN, use
1290 %u instead of %lu and drop casts to unsigned long.
1291 * parser.cc (cp_lexer_peek_nth_token): Use HOST_SIZE_T_PRINT_DEC
1292 and casts to fmt_size_t instead of "%ld" and casts to long.
1294 2024-02-09 Marek Polacek <polacek@redhat.com>
1297 * semantics.cc (finish_type_pack_element): Perform range checking
1298 before tree_to_shwi.
1300 2024-02-09 Marek Polacek <polacek@redhat.com>
1303 * coroutines.cc (coro_rewrite_function_body): Pass tf_warning_or_error
1305 (morph_fn_to_coro): Likewise.
1306 * cp-tree.h (build_throw): Adjust.
1307 * except.cc (expand_end_catch_block): Pass tf_warning_or_error to
1309 (build_throw): Add a tsubst_flags_t parameter. Use it. Remove
1310 redundant variable. Guard an inform call.
1311 * parser.cc (cp_parser_throw_expression): Pass tf_warning_or_error
1313 * pt.cc (tsubst_expr) <case THROW_EXPR>: Pass complain to build_throw.
1315 2024-02-09 Patrick Palka <ppalka@redhat.com>
1318 * module.cc (trees_in::read_class_def): When streaming in
1319 an anonymous union field of an as-base class, don't overwrite
1320 ANON_AGGR_TYPE_FIELD.
1322 2024-02-08 Patrick Palka <ppalka@redhat.com>
1325 * pt.cc (do_class_deduction): Add outer_targs parameter.
1326 Substitute outer arguments into the CTAD template.
1327 (do_auto_deduction): Pass outer_targs to do_class_deduction.
1329 2024-02-08 Jason Merrill <jason@redhat.com>
1331 * pt.cc (create_template_parm_object): Pass TARGET_EXPR to
1334 2024-02-06 Jakub Jelinek <jakub@redhat.com>
1337 * parser.cc (CP_PARSER_FLAGS_PARAMETER): New enumerator.
1338 (cp_parser_decl_specifier_seq): Parse RID_THIS only if
1339 CP_PARSER_FLAGS_PARAMETER is set in flags.
1340 (cp_parser_parameter_declaration): Or in CP_PARSER_FLAGS_PARAMETER
1341 when calling cp_parser_decl_specifier_seq.
1343 2024-02-06 Marek Polacek <polacek@redhat.com>
1345 * method.cc (early_check_defaulted_comparison): Add
1346 auto_diagnostic_group.
1348 2024-02-06 Jason Merrill <jason@redhat.com>
1351 * method.cc (early_check_defaulted_comparison): Fail if not friend.
1353 2024-02-05 Jason Merrill <jason@redhat.com>
1356 * tree.cc (rvalue): Don't drop cv-quals from an array.
1358 2024-02-03 Patrick Palka <ppalka@redhat.com>
1362 * constraint.cc (subst_info::quiet): Accomodate non-diagnostic
1364 (tsubst_valid_expression_requirement): Likewise.
1365 (tsubst_simple_requirement): Return a substituted _REQ node when
1366 processing_template_decl.
1367 (tsubst_type_requirement_1): Accomodate non-diagnostic tsubst
1369 (tsubst_type_requirement): Return a substituted _REQ node when
1370 processing_template_decl.
1371 (tsubst_compound_requirement): Likewise. Accomodate non-diagnostic
1373 (tsubst_nested_requirement): Likewise.
1374 (tsubst_requires_expr): Don't defer partial substitution when
1375 processing_constraint_expression_p is true, in which case return
1376 a substituted REQUIRES_EXPR.
1377 * pt.cc (tsubst_expr) <case REQUIRES_EXPR>: Accomodate
1378 non-diagnostic tsubst flags.
1380 2024-02-02 Jason Merrill <jason@redhat.com>
1383 * pt.cc (tsubst_function_decl): Only check a function defaulted
1384 outside the class if the class is complete.
1386 2024-02-02 Jason Merrill <jason@redhat.com>
1389 * constexpr.cc (cxx_eval_store_expression): Check empty_base
1390 before marking a CONSTRUCTOR readonly.
1392 2024-02-02 Jason Merrill <jason@redhat.com>
1395 * cp-tree.h: Adjust comment.
1396 * pt.cc (instantiate_template): Set VAR_HAD_UNKNOWN_BOUND for
1399 2024-02-01 Marek Polacek <polacek@redhat.com>
1401 * call.cc (reference_like_class_p): Consider even non-templates for
1402 std::span-like classes.
1404 2024-02-01 Patrick Palka <ppalka@redhat.com>
1407 * pt.cc (iterative_hash_template_arg) <case TEMPLATE_DECL>:
1408 Adjust hashing to match cp_tree_equal.
1409 (ctp_hasher::hash): Also hash CLASS_PLACEHOLDER_TEMPLATE.
1410 * tree.cc (cp_tree_equal) <case TEMPLATE_DECL>: Return true
1411 for ttp TEMPLATE_DECLs if their TEMPLATE_TEMPLATE_PARMs are
1413 * typeck.cc (structural_comptypes) <case TEMPLATE_TYPE_PARM>:
1414 Use cp_tree_equal to compare CLASS_PLACEHOLDER_TEMPLATE.
1416 2024-02-01 Marek Polacek <polacek@redhat.com>
1419 * typeck.cc (treat_lvalue_as_rvalue_p): Bail out on sk_namespace in
1420 the move on throw of parms loop.
1422 2024-01-30 Marek Polacek <polacek@redhat.com>
1426 * call.cc (reference_like_class_p): Don't warn for std::span-like
1429 2024-01-30 Patrick Palka <ppalka@redhat.com>
1432 * call.cc (keep_unused_object_arg): Punt for an xobj member
1435 2024-01-30 Patrick Palka <ppalka@redhat.com>
1438 * pt.cc (unify) <case INTEGER_CST>: Handle NULL_TREE type.
1440 2024-01-30 Nathaniel Shead <nathanieloshead@gmail.com>
1443 * module.cc (get_module): Bail on empty name.
1445 2024-01-29 Jason Merrill <jason@redhat.com>
1448 * pt.cc (instantiate_class_template): Don't partially instantiate.
1449 (tsubst_stmt): Likewise.
1451 2024-01-26 Nathaniel Shead <nathanieloshead@gmail.com>
1454 * module.cc (struct post_process_data): Create.
1455 (trees_in::post_decls): Use.
1456 (trees_in::post_process): Return entire vector at once.
1457 Change overload to take post_process_data instead of tree.
1458 (trees_out::write_function_def): Write needed flags from
1459 DECL_STRUCT_FUNCTION.
1460 (trees_in::read_function_def): Read them and pass to
1462 (module_state::read_cluster): Write flags into cfun.
1464 2024-01-26 Nathaniel Shead <nathanieloshead@gmail.com>
1467 * cp-tree.h (note_variable_template_instantiation): Rename to...
1468 (note_vague_linkage_variable): ...this.
1469 * decl2.cc (note_variable_template_instantiation): Rename to...
1470 (note_vague_linkage_variable): ...this.
1471 * pt.cc (instantiate_decl): Rename usage of above function.
1472 * module.cc (trees_in::read_var_def): Remember pending statics
1475 2024-01-25 Jakub Jelinek <jakub@redhat.com>
1478 * typeck2.cc (build_m_component_ref): Use convert instead of
1479 cp_convert for pointer conversion.
1481 2024-01-25 Jason Merrill <jason@redhat.com>
1484 * init.cc (build_vec_init): Don't use {} for PMF.
1486 2024-01-25 Jason Merrill <jason@redhat.com>
1489 * coroutines.cc (build_co_await): Use cxx_maybe_build_cleanup.
1490 (build_actor_fn, process_conditional, maybe_promote_temps)
1491 (morph_fn_to_coro): Likewise.
1492 (expand_one_await_expression): Use build_cleanup.
1494 2024-01-25 Nathaniel Shead <nathanieloshead@gmail.com>
1497 * module.cc (set_defining_module): Track partial specialisations
1498 for all declarations.
1500 2024-01-25 Nathaniel Shead <nathanieloshead@gmail.com>
1503 * name-lookup.cc (add_imported_namespace): Don't mark namespaces
1506 2024-01-24 Patrick Palka <ppalka@redhat.com>
1509 * call.cc (add_operator_candidates): Propagate error_mark_node
1510 result after recursing to find rewritten candidates.
1512 2024-01-23 Marek Polacek <polacek@redhat.com>
1517 * call.cc (do_warn_dangling_reference): Don't warn if the temporary
1520 2024-01-23 Nathaniel Shead <nathanieloshead@gmail.com>
1524 * module.cc (trees_out::lang_type_bools): Write interface_only
1525 and interface_unknown.
1526 (trees_in::lang_type_bools): Read the above flags.
1527 (trees_in::decl_value): Reset CLASSTYPE_INTERFACE_* except for
1529 (trees_in::read_class_def): Remove buggy extern template
1532 2024-01-19 Jason Merrill <jason@redhat.com>
1535 * pt.cc (decl_template_info): New fn.
1536 (get_template_info): Use it.
1538 2024-01-19 Jason Merrill <jason@redhat.com>
1545 * cp-tree.h (IMPLICIT_CONV_EXPR_FORCED): New.
1546 * pt.cc (expand_integer_pack): Remove 111357 workaround.
1547 (maybe_convert_nontype_argument): Add force parm.
1548 (convert_template_argument): Handle alias template args
1550 (tsubst_expr): Don't ignore IMPLICIT_CONV_EXPR_NONTYPE_ARG.
1551 * error.cc (dump_expr) [CASE_CONVERT]: Handle null optype.
1553 2024-01-18 Marek Polacek <polacek@redhat.com>
1556 * decl.cc (grokdeclarator) <case cdk_function>: Set TREE_PURPOSE to
1557 NULL_TREE when emitting an error.
1559 2024-01-17 Nathaniel Shead <nathanieloshead@gmail.com>
1562 * module.cc (trees_in::read_function_def): Don't overwrite
1565 2024-01-17 Patrick Palka <ppalka@redhat.com>
1569 * pt.cc (invalid_tparm_referent_p) <case ADDR_EXPR>: Suppress
1570 DECL_ARTIFICIAL rejection test for class NTTP objects.
1572 2024-01-16 Nathaniel Shead <nathanieloshead@gmail.com>
1575 * decl2.cc (get_tls_wrapper_fn): Set DECL_CONTEXT.
1576 (c_parse_final_cleanups): Suppress warning for no definition of
1577 TLS wrapper functions in header modules.
1578 * module.cc (trees_out::lang_decl_vals): Write wrapped variable
1579 for TLS wrapper functions.
1580 (trees_in::lang_decl_vals): Read it.
1581 (trees_out::decl_value): Write TLS model for thread-local vars.
1582 (trees_in::decl_value): Read it for new decls. Remember to emit
1583 definitions of TLS wrapper functions later.
1585 2024-01-16 Nathaniel Shead <nathanieloshead@gmail.com>
1587 * name-lookup.h (enum scope_kind): Add 'sk_count'.
1588 * name-lookup.cc (cp_binding_level_descriptor): Add missing
1589 scope kinds. Add assertion that the list is up to date. Fix
1590 handling of explicit_spec_p.
1592 2024-01-16 Marek Polacek <polacek@redhat.com>
1594 * decl.cc (grokdeclarator) <case cdk_function>: Tweak diagnostic
1597 2024-01-16 Marek Polacek <polacek@redhat.com>
1600 * decl.cc (grokdeclarator) <case cdk_function>: Clear
1601 is_xobj_member_function in case of an error.
1603 2024-01-16 waffl3x <waffl3x@protonmail.com>
1606 * parser.cc (cp_parser_parameter_declaration): Reject packs
1609 2024-01-15 Marek Polacek <polacek@redhat.com>
1612 * parser.cc (cp_parser_template_type_arg): Add auto checking.
1614 2024-01-15 Patrick Palka <ppalka@redhat.com>
1616 * parser.cc (cp_parser_check_access_in_redeclaration): Don't
1617 check access for a partial or explicit specialization.
1618 * pt.cc (maybe_new_partial_specialization): Don't set TREE_PRIVATE
1619 or TREE_PROTECTED on the newly created partial specialization.
1621 2024-01-15 Patrick Palka <ppalka@redhat.com>
1624 * pt.cc (maybe_new_partial_specialization): Propagate TREE_PUBLIC
1625 to the newly created partial specialization.
1627 2024-01-15 Patrick Palka <ppalka@redhat.com>
1630 * init.cc (build_vec_delete_1): Assume expr_noexcept_p returns
1631 false in a template context.
1633 2024-01-13 Jakub Jelinek <jakub@redhat.com>
1635 * mangle.cc (write_nested_name): Mangle explicit object
1636 member functions with H as per
1637 https://github.com/itanium-cxx-abi/cxx-abi/issues/148 non-proposal.
1639 2024-01-12 Jason Merrill <jason@redhat.com>
1642 * name-lookup.cc (lookup_elaborated_type): Look for bindings
1643 in the global namespace in the ABI namespace.
1645 2024-01-12 Jason Merrill <jason@redhat.com>
1647 * call.cc (reversed_match): New.
1648 (enum class pmatch): New enum.
1649 (cand_parms_match): Add match_kind parm.
1650 (object_parms_correspond): Add fn parms.
1652 * class.cc (xobj_iobj_parameters_correspond): Rename to...
1653 (iobj_parm_corresponds_to): ...this. Take the other
1654 type instead of a second function.
1655 (object_parms_correspond): Adjust.
1656 * cp-tree.h (iobj_parm_corresponds_to): Declare.
1658 2024-01-11 Jason Merrill <jason@redhat.com>
1661 * class.cc (xobj_iobj_parameters_correspond): Add context parm.
1662 (object_parms_correspond): Factor out of...
1663 (add_method): ...here.
1664 * method.cc (defaulted_late_check): Use it.
1665 * call.cc (class_of_implicit_object): New.
1666 (object_parms_correspond): Overload taking two candidates.
1667 (cand_parms_match): Use it.
1668 (joust): Check reversed before comparing constraints.
1669 * cp-tree.h (object_parms_correspond): Declare.
1671 2024-01-10 Tamar Christina <tamar.christina@arm.com>
1673 * parser.cc (cp_parser_pragma): Initialize to false.
1675 2024-01-09 Jason Merrill <jason@redhat.com>
1677 * semantics.cc (is_object_parameter): New.
1678 * cp-tree.h (is_object_parameter): Declare.
1679 * call.cc (maybe_warn_class_memaccess): Use it.
1680 * search.cc (field_access_p): Use it.
1681 (class_of_object_parm): New.
1682 (field_accessor_p): Adjust for explicit object parms.
1684 2024-01-09 Jason Merrill <jason@redhat.com>
1686 * call.cc (build_over_call): Refactor handle_arg lambda.
1687 * class.cc (xobj_iobj_parameters_correspond): Fix FIXME.
1688 * method.cc (defaulted_late_check): Adjust comments.
1690 2024-01-09 waffl3x <waffl3x@protonmail.com>
1694 C++23 P0847R7 (deducing this) - CWG2586.
1695 * decl.cc (copy_fn_p): Accept xobj copy assignment functions.
1696 (move_signature_fn_p): Accept xobj move assignment functions.
1697 * method.cc (do_build_copy_assign): Handle defaulted xobj member
1699 (defaulted_late_check): Comment.
1700 (defaultable_fn_check): Comment.
1702 2024-01-09 waffl3x <waffl3x@protonmail.com>
1706 C++23 P0847R7 (deducing this) - xobj lambdas.
1707 * lambda.cc (build_capture_proxy): Don't fold direct object types.
1708 * parser.cc (cp_parser_lambda_declarator_opt): Handle xobj lambdas,
1709 diagnostics. Comments also updated.
1710 * pt.cc (tsubst_function_decl): Handle xobj lambdas. Check object
1711 type of xobj lambda call operator, diagnose incorrect types.
1712 (tsubst_lambda_expr): Update comment.
1713 * semantics.cc (finish_decltype_type): Also consider by-value object
1714 parameter qualifications.
1716 2024-01-09 waffl3x <waffl3x@protonmail.com>
1720 C++23 P0847R7 (deducing this) - diagnostics.
1721 * class.cc (resolve_address_of_overloaded_function): Diagnostics.
1722 * cp-tree.h (TFF_XOBJ_FUNC): Define.
1723 * decl.cc (grokfndecl): Diagnostics.
1724 (grokdeclarator): Diagnostics.
1725 * error.cc (dump_aggr_type): Pass TFF_XOBJ_FUNC.
1726 (dump_lambda_function): Formatting for xobj lambda.
1727 (dump_function_decl): Pass TFF_XOBJ_FUNC.
1728 (dump_parameters): Formatting for xobj member functions.
1729 (function_category): Formatting for xobj member functions.
1730 * parser.cc (cp_parser_decl_specifier_seq): Diagnostics.
1731 (cp_parser_parameter_declaration): Diagnostics.
1732 * search.cc (look_for_overrides_here): Make xobj member functions
1734 (look_for_overrides_r): Reject an overriding xobj member function
1736 * semantics.cc (finish_this_expr): Diagnostics.
1737 * typeck.cc (cp_build_addr_expr_1): Diagnostics.
1739 2024-01-09 waffl3x <waffl3x@protonmail.com>
1743 C++23 P0847R7 (deducing this) - initial functionality.
1744 * class.cc (xobj_iobj_parameters_correspond): New function, checks
1745 for corresponding object parameters between xobj and iobj member
1747 (add_method): Handle object parameters of xobj member functions, use
1748 xobj_iobj_parameters_correspond.
1749 * call.cc (build_over_call): Refactor, handle xobj member functions.
1750 (cand_parms_match): Handle object parameters of xobj and iobj member
1751 functions, use xobj_iobj_parameters_correspond.
1752 * cp-tree.h (enum cp_decl_spec): Add ds_this, add comments.
1753 * decl.cc (grokfndecl): Add xobj_func_p parameter. For xobj member
1754 functions, Set xobj_flag, don't set static_function flag.
1755 (grokdeclarator): Handle xobj member functions, tell grokfndecl.
1756 (grok_op_properties): Don't error for xobj operators.
1757 * parser.cc (cp_parser_decl_specifier_seq): Handle this specifier.
1758 (cp_parser_parameter_declaration): Set default argument to
1759 "this_identifier" for xobj parameters.
1760 (set_and_check_decl_spec_loc): Add "this", add comments.
1761 * tree.cc (build_min_non_dep_op_overload): Handle xobj operators.
1762 * typeck.cc (cp_build_addr_expr_1): Handle address-of xobj member
1765 2024-01-09 waffl3x <waffl3x@protonmail.com>
1766 Jason Merrill <jason@redhat.com>
1769 * cp-tree.h (struct lang_decl_fn): New data member.
1770 (DECL_NONSTATIC_MEMBER_FUNCTION_P): Poison.
1771 (DECL_IOBJ_MEMBER_FUNCTION_P): Define.
1772 (DECL_FUNCTION_XOBJ_FLAG): Define.
1773 (DECL_XOBJ_MEMBER_FUNCTION_P): Define.
1774 (DECL_OBJECT_MEMBER_FUNCTION_P): Define.
1775 (DECL_FUNCTION_MEMBER_P): Don't use
1776 DECL_NONSTATIC_MEMBER_FUNCTION_P.
1777 (DECL_CONST_MEMFUNC_P): Likewise.
1778 (DECL_VOLATILE_MEMFUNC_P): Likewise.
1779 (DECL_NONSTATIC_MEMBER_P): Likewise.
1780 * module.cc (trees_out::lang_decl_bools): Handle xobj_flag.
1781 (trees_in::lang_decl_bools): Handle xobj_flag.
1782 * call.cc (build_this_conversion)
1783 (add_function_candidate)
1784 (add_template_candidate_real)
1786 (maybe_warn_class_memaccess)
1789 (do_warn_dangling_reference)
1790 * class.cc (finalize_literal_type_property)
1792 (resolve_address_of_overloaded_function)
1793 * constexpr.cc (is_valid_constexpr_fn)
1794 (cxx_bind_parameters_in_call)
1795 * contracts.cc (build_contract_condition_function)
1796 * cp-objcp-common.cc (cp_decl_dwarf_attribute)
1797 * cxx-pretty-print.cc (cxx_pretty_printer::postfix_expression)
1798 (cxx_pretty_printer::declaration_specifiers)
1799 (cxx_pretty_printer::direct_declarator)
1800 * decl.cc (cp_finish_decl)
1801 (grok_special_member_properties)
1802 (start_preparsed_function)
1803 (record_key_method_defined)
1804 * decl2.cc (cp_handle_deprecated_or_unavailable)
1805 * init.cc (find_uninit_fields_r)
1807 * lambda.cc (lambda_expr_this_capture)
1808 (maybe_generic_this_capture)
1809 (nonlambda_method_basetype)
1810 * mangle.cc (write_nested_name)
1811 * method.cc (early_check_defaulted_comparison)
1812 (skip_artificial_parms_for)
1813 (num_artificial_parms_for)
1814 * pt.cc (is_specialization_of_friend)
1815 (determine_specialization)
1816 (copy_default_args_to_explicit_spec)
1817 (check_explicit_specialization)
1818 (tsubst_contract_attribute)
1819 (check_non_deducible_conversions)
1820 (more_specialized_fn)
1821 (maybe_instantiate_noexcept)
1822 (register_parameter_specializations)
1823 (value_dependent_expression_p)
1824 * search.cc (shared_member_p)
1827 * semantics.cc (finish_omp_declare_simd_methods)
1828 * tree.cc (lvalue_kind)
1829 * typeck.cc (invalid_nonstatic_memfn_p): Don't use
1830 DECL_NONSTATIC_MEMBER_FUNCTION_P.
1832 2024-01-09 Julian Brown <julian@codesourcery.com>
1834 * constexpr.cc (potential_consant_expression_1): Handle
1836 * cp-tree.h (grok_omp_array_section, build_omp_array_section): Add
1838 * decl2.cc (grok_omp_array_section): New function.
1839 * error.cc (dump_expr): Handle OMP_ARRAY_SECTION.
1840 * parser.cc (cp_parser_new): Initialize parser->omp_array_section_p.
1841 (cp_parser_statement_expr): Disallow array sections.
1842 (cp_parser_postfix_open_square_expression): Support OMP_ARRAY_SECTION
1844 (cp_parser_parenthesized_expression_list, cp_parser_lambda_expression,
1845 cp_parser_braced_list): Disallow array sections.
1846 (cp_parser_omp_var_list_no_open): Remove ALLOW_DEREF parameter, add
1847 MAP_LVALUE in its place. Support generalised lvalue parsing for
1848 OpenMP map, to and from clauses. Use OMP_ARRAY_SECTION
1849 code instead of TREE_LIST to represent OpenMP array sections.
1850 (cp_parser_omp_var_list): Remove ALLOW_DEREF parameter, add MAP_LVALUE.
1851 Pass to cp_parser_omp_var_list_no_open.
1852 (cp_parser_oacc_data_clause): Update call to cp_parser_omp_var_list.
1853 (cp_parser_omp_clause_map): Add sk_omp scope around
1854 cp_parser_omp_var_list_no_open call.
1855 * parser.h (cp_parser): Add omp_array_section_p field.
1856 * pt.cc (tsubst, tsubst_copy, tsubst_omp_clause_decl,
1857 tsubst_copy_and_build): Add OMP_ARRAY_SECTION support.
1858 * semantics.cc (handle_omp_array_sections_1, handle_omp_array_sections,
1859 cp_oacc_check_attachments, finish_omp_clauses): Use OMP_ARRAY_SECTION
1860 instead of TREE_LIST where appropriate. Handle more types of map
1862 * typeck.cc (build_omp_array_section): New function.
1864 2024-01-07 Nathaniel Shead <nathanieloshead@gmail.com>
1866 * module.cc (trees_out::write_var_def): Only write initializers
1869 2024-01-07 Nathaniel Shead <nathanieloshead@gmail.com>
1872 * module.cc (depset::hash::add_binding_entity): Don't skip names
1873 in the GMF if they've been exported with a using declaration.
1875 2024-01-07 Nathaniel Shead <nathanieloshead@gmail.com>
1878 * parser.cc (cp_parser_module_name): Rewrite to handle
1879 module-names and module-partitions independently.
1880 (cp_parser_module_partition): New function.
1881 (cp_parser_module_declaration): Parse module partitions
1882 explicitly. Don't change state if parsing module decl failed.
1883 (cp_parser_import_declaration): Handle different kinds of
1884 import-declarations locally.
1886 2024-01-03 Patrick Palka <ppalka@redhat.com>
1889 * call.cc (reference_binding): Still try a conversion via a
1890 temporary if a direct conversion was bad.
1892 2024-01-03 Kwok Cheung Yeung <kcy@codesourcery.com>
1894 * parser.cc (cp_parser_omp_clause_name): Move handling of indirect
1895 clause to correspond to alphabetical order.
1898 Copyright (C) 2024 Free Software Foundation, Inc.
1900 Copying and distribution of this file, with or without modification,
1901 are permitted in any medium without royalty provided the copyright
1902 notice and this notice are preserved.