Daily bump.
[official-gcc.git] / gcc / cp / ChangeLog
blob2aa478dd51dc91d9278a126869e36a012480dabf
1 2024-02-12  Marek Polacek  <polacek@redhat.com>
3         PR c++/113545
4         * constexpr.cc (cxx_eval_switch_expr): If the condition doesn't reduce
5         to an INTEGER_CST, consider it non-constant.
7 2024-02-10  Marek Polacek  <polacek@redhat.com>
9         DR 2237
10         PR c++/107126
11         PR c++/97202
12         * parser.cc (cp_parser_unqualified_id): Downgrade the DR2237 error to
13         a pedwarn.
14         (cp_parser_constructor_declarator_p): Likewise.
16 2024-02-10  Jakub Jelinek  <jakub@redhat.com>
18         * tree.cc (debug_binfo): Use HOST_WIDE_INT_PRINT_DEC instead of "%ld"
19         and casts to long.
20         * pt.cc (print_template_statistics): Use HOST_SIZE_T_PRINT_DEC
21         and casts to fmt_size_t instead of "%ld" and casts to long.
22         * class.cc (dump_class_hierarchy_1): Use HOST_WIDE_INT_PRINT_UNSIGNED
23         instead of "%lu" and casts to unsigned long.  For TYPE_ALIGN, use
24         %u instead of %lu and drop casts to unsigned long.
25         * parser.cc (cp_lexer_peek_nth_token): Use HOST_SIZE_T_PRINT_DEC
26         and casts to fmt_size_t instead of "%ld" and casts to long.
28 2024-02-09  Marek Polacek  <polacek@redhat.com>
30         PR c++/113834
31         * semantics.cc (finish_type_pack_element): Perform range checking
32         before tree_to_shwi.
34 2024-02-09  Marek Polacek  <polacek@redhat.com>
36         PR c++/98388
37         * coroutines.cc (coro_rewrite_function_body): Pass tf_warning_or_error
38         to build_throw.
39         (morph_fn_to_coro): Likewise.
40         * cp-tree.h (build_throw): Adjust.
41         * except.cc (expand_end_catch_block): Pass tf_warning_or_error to
42         build_throw.
43         (build_throw): Add a tsubst_flags_t parameter.  Use it.  Remove
44         redundant variable.  Guard an inform call.
45         * parser.cc (cp_parser_throw_expression): Pass tf_warning_or_error
46         to build_throw.
47         * pt.cc (tsubst_expr) <case THROW_EXPR>: Pass complain to build_throw.
49 2024-02-09  Patrick Palka  <ppalka@redhat.com>
51         PR c++/112580
52         * module.cc (trees_in::read_class_def): When streaming in
53         an anonymous union field of an as-base class, don't overwrite
54         ANON_AGGR_TYPE_FIELD.
56 2024-02-08  Patrick Palka  <ppalka@redhat.com>
58         PR c++/113649
59         * pt.cc (do_class_deduction): Add outer_targs parameter.
60         Substitute outer arguments into the CTAD template.
61         (do_auto_deduction): Pass outer_targs to do_class_deduction.
63 2024-02-08  Jason Merrill  <jason@redhat.com>
65         * pt.cc (create_template_parm_object): Pass TARGET_EXPR to
66         cxx_constant_value.
68 2024-02-06  Jakub Jelinek  <jakub@redhat.com>
70         PR c++/113788
71         * parser.cc (CP_PARSER_FLAGS_PARAMETER): New enumerator.
72         (cp_parser_decl_specifier_seq): Parse RID_THIS only if
73         CP_PARSER_FLAGS_PARAMETER is set in flags.
74         (cp_parser_parameter_declaration): Or in CP_PARSER_FLAGS_PARAMETER
75         when calling cp_parser_decl_specifier_seq.
77 2024-02-06  Marek Polacek  <polacek@redhat.com>
79         * method.cc (early_check_defaulted_comparison): Add
80         auto_diagnostic_group.
82 2024-02-06  Jason Merrill  <jason@redhat.com>
84         PR c++/107291
85         * method.cc (early_check_defaulted_comparison): Fail if not friend.
87 2024-02-05  Jason Merrill  <jason@redhat.com>
89         PR c++/111286
90         * tree.cc (rvalue): Don't drop cv-quals from an array.
92 2024-02-03  Patrick Palka  <ppalka@redhat.com>
94         PR c++/110006
95         PR c++/112769
96         * constraint.cc (subst_info::quiet): Accomodate non-diagnostic
97         tsubst flags.
98         (tsubst_valid_expression_requirement): Likewise.
99         (tsubst_simple_requirement): Return a substituted _REQ node when
100         processing_template_decl.
101         (tsubst_type_requirement_1): Accomodate non-diagnostic tsubst
102         flags.
103         (tsubst_type_requirement): Return a substituted _REQ node when
104         processing_template_decl.
105         (tsubst_compound_requirement): Likewise.  Accomodate non-diagnostic
106         tsubst flags.
107         (tsubst_nested_requirement): Likewise.
108         (tsubst_requires_expr): Don't defer partial substitution when
109         processing_constraint_expression_p is true, in which case return
110         a substituted REQUIRES_EXPR.
111         * pt.cc (tsubst_expr) <case REQUIRES_EXPR>: Accomodate
112         non-diagnostic tsubst flags.
114 2024-02-02  Jason Merrill  <jason@redhat.com>
116         PR c++/110084
117         * pt.cc (tsubst_function_decl): Only check a function defaulted
118         outside the class if the class is complete.
120 2024-02-02  Jason Merrill  <jason@redhat.com>
122         PR c++/112439
123         * constexpr.cc (cxx_eval_store_expression): Check empty_base
124         before marking a CONSTRUCTOR readonly.
126 2024-02-02  Jason Merrill  <jason@redhat.com>
128         PR c++/113638
129         * cp-tree.h: Adjust comment.
130         * pt.cc (instantiate_template): Set VAR_HAD_UNKNOWN_BOUND for
131         variable template.
133 2024-02-01  Marek Polacek  <polacek@redhat.com>
135         * call.cc (reference_like_class_p): Consider even non-templates for
136         std::span-like classes.
138 2024-02-01  Patrick Palka  <ppalka@redhat.com>
140         PR c++/112737
141         * pt.cc (iterative_hash_template_arg) <case TEMPLATE_DECL>:
142         Adjust hashing to match cp_tree_equal.
143         (ctp_hasher::hash): Also hash CLASS_PLACEHOLDER_TEMPLATE.
144         * tree.cc (cp_tree_equal) <case TEMPLATE_DECL>: Return true
145         for ttp TEMPLATE_DECLs if their TEMPLATE_TEMPLATE_PARMs are
146         equivalent.
147         * typeck.cc (structural_comptypes) <case TEMPLATE_TYPE_PARM>:
148         Use cp_tree_equal to compare CLASS_PLACEHOLDER_TEMPLATE.
150 2024-02-01  Marek Polacek  <polacek@redhat.com>
152         PR c++/112437
153         * typeck.cc (treat_lvalue_as_rvalue_p): Bail out on sk_namespace in
154         the move on throw of parms loop.
156 2024-01-30  Marek Polacek  <polacek@redhat.com>
158         PR c++/110358
159         PR c++/109640
160         * call.cc (reference_like_class_p): Don't warn for std::span-like
161         classes.
163 2024-01-30  Patrick Palka  <ppalka@redhat.com>
165         PR c++/113640
166         * call.cc (keep_unused_object_arg): Punt for an xobj member
167         function.
169 2024-01-30  Patrick Palka  <ppalka@redhat.com>
171         PR c++/113644
172         * pt.cc (unify) <case INTEGER_CST>: Handle NULL_TREE type.
174 2024-01-30  Nathaniel Shead  <nathanieloshead@gmail.com>
176         PR c++/107594
177         * module.cc (get_module): Bail on empty name.
179 2024-01-29  Jason Merrill  <jason@redhat.com>
181         PR c++/113544
182         * pt.cc (instantiate_class_template): Don't partially instantiate.
183         (tsubst_stmt): Likewise.
185 2024-01-26  Nathaniel Shead  <nathanieloshead@gmail.com>
187         PR c++/113580
188         * module.cc (struct post_process_data): Create.
189         (trees_in::post_decls): Use.
190         (trees_in::post_process): Return entire vector at once.
191         Change overload to take post_process_data instead of tree.
192         (trees_out::write_function_def): Write needed flags from
193         DECL_STRUCT_FUNCTION.
194         (trees_in::read_function_def): Read them and pass to
195         post_process.
196         (module_state::read_cluster): Write flags into cfun.
198 2024-01-26  Nathaniel Shead  <nathanieloshead@gmail.com>
200         PR c++/112899
201         * cp-tree.h (note_variable_template_instantiation): Rename to...
202         (note_vague_linkage_variable): ...this.
203         * decl2.cc (note_variable_template_instantiation): Rename to...
204         (note_vague_linkage_variable): ...this.
205         * pt.cc (instantiate_decl): Rename usage of above function.
206         * module.cc (trees_in::read_var_def): Remember pending statics
207         that we stream in.
209 2024-01-25  Jakub Jelinek  <jakub@redhat.com>
211         PR c++/113599
212         * typeck2.cc (build_m_component_ref): Use convert instead of
213         cp_convert for pointer conversion.
215 2024-01-25  Jason Merrill  <jason@redhat.com>
217         PR c++/113598
218         * init.cc (build_vec_init): Don't use {} for PMF.
220 2024-01-25  Jason Merrill  <jason@redhat.com>
222         PR c++/109227
223         * coroutines.cc (build_co_await): Use cxx_maybe_build_cleanup.
224         (build_actor_fn, process_conditional, maybe_promote_temps)
225         (morph_fn_to_coro): Likewise.
226         (expand_one_await_expression): Use build_cleanup.
228 2024-01-25  Nathaniel Shead  <nathanieloshead@gmail.com>
230         PR c++/113405
231         * module.cc (set_defining_module): Track partial specialisations
232         for all declarations.
234 2024-01-25  Nathaniel Shead  <nathanieloshead@gmail.com>
236         PR c++/100707
237         * name-lookup.cc (add_imported_namespace): Don't mark namespaces
238         as imported.
240 2024-01-24  Patrick Palka  <ppalka@redhat.com>
242         PR c++/113529
243         * call.cc (add_operator_candidates): Propagate error_mark_node
244         result after recursing to find rewritten candidates.
246 2024-01-23  Marek Polacek  <polacek@redhat.com>
248         PR c++/113256
249         PR c++/111607
250         PR c++/109640
251         * call.cc (do_warn_dangling_reference): Don't warn if the temporary
252         is of lambda type.
254 2024-01-23  Nathaniel Shead  <nathanieloshead@gmail.com>
256         PR c++/112820
257         PR c++/102607
258         * module.cc (trees_out::lang_type_bools): Write interface_only
259         and interface_unknown.
260         (trees_in::lang_type_bools): Read the above flags.
261         (trees_in::decl_value): Reset CLASSTYPE_INTERFACE_* except for
262         extern templates.
263         (trees_in::read_class_def): Remove buggy extern template
264         handling.
266 2024-01-19  Jason Merrill  <jason@redhat.com>
268         PR c++/113498
269         * pt.cc (decl_template_info): New fn.
270         (get_template_info): Use it.
272 2024-01-19  Jason Merrill  <jason@redhat.com>
274         PR c++/112632
275         PR c++/112594
276         PR c++/111357
277         PR c++/104594
278         PR c++/67898
279         * cp-tree.h (IMPLICIT_CONV_EXPR_FORCED): New.
280         * pt.cc (expand_integer_pack): Remove 111357 workaround.
281         (maybe_convert_nontype_argument): Add force parm.
282         (convert_template_argument): Handle alias template args
283         specially.
284         (tsubst_expr): Don't ignore IMPLICIT_CONV_EXPR_NONTYPE_ARG.
285         * error.cc (dump_expr) [CASE_CONVERT]: Handle null optype.
287 2024-01-18  Marek Polacek  <polacek@redhat.com>
289         PR c++/113389
290         * decl.cc (grokdeclarator) <case cdk_function>: Set TREE_PURPOSE to
291         NULL_TREE when emitting an error.
293 2024-01-17  Nathaniel Shead  <nathanieloshead@gmail.com>
295         PR c++/112588
296         * module.cc (trees_in::read_function_def): Don't overwrite
297         arguments.
299 2024-01-17  Patrick Palka  <ppalka@redhat.com>
301         PR c++/113242
302         PR c++/99493
303         * pt.cc (invalid_tparm_referent_p) <case ADDR_EXPR>: Suppress
304         DECL_ARTIFICIAL rejection test for class NTTP objects.
306 2024-01-16  Nathaniel Shead  <nathanieloshead@gmail.com>
308         PR c++/113292
309         * decl2.cc (get_tls_wrapper_fn): Set DECL_CONTEXT.
310         (c_parse_final_cleanups): Suppress warning for no definition of
311         TLS wrapper functions in header modules.
312         * module.cc (trees_out::lang_decl_vals): Write wrapped variable
313         for TLS wrapper functions.
314         (trees_in::lang_decl_vals): Read it.
315         (trees_out::decl_value): Write TLS model for thread-local vars.
316         (trees_in::decl_value): Read it for new decls. Remember to emit
317         definitions of TLS wrapper functions later.
319 2024-01-16  Nathaniel Shead  <nathanieloshead@gmail.com>
321         * name-lookup.h (enum scope_kind): Add 'sk_count'.
322         * name-lookup.cc (cp_binding_level_descriptor): Add missing
323         scope kinds. Add assertion that the list is up to date. Fix
324         handling of explicit_spec_p.
326 2024-01-16  Marek Polacek  <polacek@redhat.com>
328         * decl.cc (grokdeclarator) <case cdk_function>: Tweak diagnostic
329         messages.
331 2024-01-16  Marek Polacek  <polacek@redhat.com>
333         PR c++/113340
334         * decl.cc (grokdeclarator) <case cdk_function>: Clear
335         is_xobj_member_function in case of an error.
337 2024-01-16  waffl3x  <waffl3x@protonmail.com>
339         PR c++/113307
340         * parser.cc (cp_parser_parameter_declaration): Reject packs
341         on xobj params.
343 2024-01-15  Marek Polacek  <polacek@redhat.com>
345         PR c++/110065
346         * parser.cc (cp_parser_template_type_arg): Add auto checking.
348 2024-01-15  Patrick Palka  <ppalka@redhat.com>
350         * parser.cc (cp_parser_check_access_in_redeclaration): Don't
351         check access for a partial or explicit specialization.
352         * pt.cc (maybe_new_partial_specialization): Don't set TREE_PRIVATE
353         or TREE_PROTECTED on the newly created partial specialization.
355 2024-01-15  Patrick Palka  <ppalka@redhat.com>
357         PR c++/104634
358         * pt.cc (maybe_new_partial_specialization): Propagate TREE_PUBLIC
359         to the newly created partial specialization.
361 2024-01-15  Patrick Palka  <ppalka@redhat.com>
363         PR c++/109899
364         * init.cc (build_vec_delete_1): Assume expr_noexcept_p returns
365         false in a template context.
367 2024-01-13  Jakub Jelinek  <jakub@redhat.com>
369         * mangle.cc (write_nested_name): Mangle explicit object
370         member functions with H as per
371         https://github.com/itanium-cxx-abi/cxx-abi/issues/148 non-proposal.
373 2024-01-12  Jason Merrill  <jason@redhat.com>
375         PR c++/113038
376         * name-lookup.cc (lookup_elaborated_type): Look for bindings
377         in the global namespace in the ABI namespace.
379 2024-01-12  Jason Merrill  <jason@redhat.com>
381         * call.cc (reversed_match): New.
382         (enum class pmatch): New enum.
383         (cand_parms_match): Add match_kind parm.
384         (object_parms_correspond): Add fn parms.
385         (joust): Adjust.
386         * class.cc (xobj_iobj_parameters_correspond): Rename to...
387         (iobj_parm_corresponds_to): ...this.  Take the other
388         type instead of a second function.
389         (object_parms_correspond): Adjust.
390         * cp-tree.h (iobj_parm_corresponds_to): Declare.
392 2024-01-11  Jason Merrill  <jason@redhat.com>
394         PR c++/113191
395         * class.cc (xobj_iobj_parameters_correspond): Add context parm.
396         (object_parms_correspond): Factor out of...
397         (add_method): ...here.
398         * method.cc (defaulted_late_check): Use it.
399         * call.cc (class_of_implicit_object): New.
400         (object_parms_correspond): Overload taking two candidates.
401         (cand_parms_match): Use it.
402         (joust): Check reversed before comparing constraints.
403         * cp-tree.h (object_parms_correspond): Declare.
405 2024-01-10  Tamar Christina  <tamar.christina@arm.com>
407         * parser.cc (cp_parser_pragma): Initialize to false.
409 2024-01-09  Jason Merrill  <jason@redhat.com>
411         * semantics.cc (is_object_parameter): New.
412         * cp-tree.h (is_object_parameter): Declare.
413         * call.cc (maybe_warn_class_memaccess): Use it.
414         * search.cc (field_access_p): Use it.
415         (class_of_object_parm): New.
416         (field_accessor_p): Adjust for explicit object parms.
418 2024-01-09  Jason Merrill  <jason@redhat.com>
420         * call.cc (build_over_call): Refactor handle_arg lambda.
421         * class.cc (xobj_iobj_parameters_correspond): Fix FIXME.
422         * method.cc (defaulted_late_check): Adjust comments.
424 2024-01-09  waffl3x  <waffl3x@protonmail.com>
426         PR c++/102609
427         PR c++/102609
428         C++23 P0847R7 (deducing this) - CWG2586.
429         * decl.cc (copy_fn_p): Accept xobj copy assignment functions.
430         (move_signature_fn_p): Accept xobj move assignment functions.
431         * method.cc (do_build_copy_assign): Handle defaulted xobj member
432         functions.
433         (defaulted_late_check): Comment.
434         (defaultable_fn_check): Comment.
436 2024-01-09  waffl3x  <waffl3x@protonmail.com>
438         PR c++/102609
439         PR c++/102609
440         C++23 P0847R7 (deducing this) - xobj lambdas.
441         * lambda.cc (build_capture_proxy): Don't fold direct object types.
442         * parser.cc (cp_parser_lambda_declarator_opt): Handle xobj lambdas,
443         diagnostics.  Comments also updated.
444         * pt.cc (tsubst_function_decl): Handle xobj lambdas.  Check object
445         type of xobj lambda call operator, diagnose incorrect types.
446         (tsubst_lambda_expr): Update comment.
447         * semantics.cc (finish_decltype_type): Also consider by-value object
448         parameter qualifications.
450 2024-01-09  waffl3x  <waffl3x@protonmail.com>
452         PR c++/102609
453         PR c++/102609
454         C++23 P0847R7 (deducing this) - diagnostics.
455         * class.cc (resolve_address_of_overloaded_function): Diagnostics.
456         * cp-tree.h (TFF_XOBJ_FUNC): Define.
457         * decl.cc (grokfndecl): Diagnostics.
458         (grokdeclarator): Diagnostics.
459         * error.cc (dump_aggr_type): Pass TFF_XOBJ_FUNC.
460         (dump_lambda_function): Formatting for xobj lambda.
461         (dump_function_decl): Pass TFF_XOBJ_FUNC.
462         (dump_parameters): Formatting for xobj member functions.
463         (function_category): Formatting for xobj member functions.
464         * parser.cc (cp_parser_decl_specifier_seq): Diagnostics.
465         (cp_parser_parameter_declaration): Diagnostics.
466         * search.cc (look_for_overrides_here): Make xobj member functions
467         override.
468         (look_for_overrides_r): Reject an overriding xobj member function
469         and diagnose it.
470         * semantics.cc (finish_this_expr): Diagnostics.
471         * typeck.cc (cp_build_addr_expr_1): Diagnostics.
473 2024-01-09  waffl3x  <waffl3x@protonmail.com>
475         PR c++/102609
476         PR c++/102609
477         C++23 P0847R7 (deducing this) - initial functionality.
478         * class.cc (xobj_iobj_parameters_correspond): New function, checks
479         for corresponding object parameters between xobj and iobj member
480         functions.
481         (add_method): Handle object parameters of xobj member functions, use
482         xobj_iobj_parameters_correspond.
483         * call.cc (build_over_call): Refactor, handle xobj member functions.
484         (cand_parms_match): Handle object parameters of xobj and iobj member
485         functions, use xobj_iobj_parameters_correspond.
486         * cp-tree.h (enum cp_decl_spec): Add ds_this, add comments.
487         * decl.cc (grokfndecl): Add xobj_func_p parameter.  For xobj member
488         functions, Set xobj_flag, don't set static_function flag.
489         (grokdeclarator): Handle xobj member functions, tell grokfndecl.
490         (grok_op_properties): Don't error for xobj operators.
491         * parser.cc (cp_parser_decl_specifier_seq): Handle this specifier.
492         (cp_parser_parameter_declaration): Set default argument to
493         "this_identifier" for xobj parameters.
494         (set_and_check_decl_spec_loc): Add "this", add comments.
495         * tree.cc (build_min_non_dep_op_overload): Handle xobj operators.
496         * typeck.cc (cp_build_addr_expr_1): Handle address-of xobj member
497         functions.
499 2024-01-09  waffl3x  <waffl3x@protonmail.com>
500             Jason Merrill  <jason@redhat.com>
502         PR c++/102609
503         * cp-tree.h (struct lang_decl_fn): New data member.
504         (DECL_NONSTATIC_MEMBER_FUNCTION_P): Poison.
505         (DECL_IOBJ_MEMBER_FUNCTION_P): Define.
506         (DECL_FUNCTION_XOBJ_FLAG): Define.
507         (DECL_XOBJ_MEMBER_FUNCTION_P): Define.
508         (DECL_OBJECT_MEMBER_FUNCTION_P): Define.
509         (DECL_FUNCTION_MEMBER_P): Don't use
510         DECL_NONSTATIC_MEMBER_FUNCTION_P.
511         (DECL_CONST_MEMFUNC_P): Likewise.
512         (DECL_VOLATILE_MEMFUNC_P): Likewise.
513         (DECL_NONSTATIC_MEMBER_P): Likewise.
514         * module.cc (trees_out::lang_decl_bools): Handle xobj_flag.
515         (trees_in::lang_decl_bools): Handle xobj_flag.
516         * call.cc (build_this_conversion)
517         (add_function_candidate)
518         (add_template_candidate_real)
519         (add_candidates)
520         (maybe_warn_class_memaccess)
521         (cand_parms_match)
522         (joust)
523         (do_warn_dangling_reference)
524         * class.cc (finalize_literal_type_property)
525         (finish_struct)
526         (resolve_address_of_overloaded_function)
527         * constexpr.cc (is_valid_constexpr_fn)
528         (cxx_bind_parameters_in_call)
529         * contracts.cc (build_contract_condition_function)
530         * cp-objcp-common.cc (cp_decl_dwarf_attribute)
531         * cxx-pretty-print.cc (cxx_pretty_printer::postfix_expression)
532         (cxx_pretty_printer::declaration_specifiers)
533         (cxx_pretty_printer::direct_declarator)
534         * decl.cc (cp_finish_decl)
535         (grok_special_member_properties)
536         (start_preparsed_function)
537         (record_key_method_defined)
538         * decl2.cc (cp_handle_deprecated_or_unavailable)
539         * init.cc (find_uninit_fields_r)
540         (build_offset_ref)
541         * lambda.cc (lambda_expr_this_capture)
542         (maybe_generic_this_capture)
543         (nonlambda_method_basetype)
544         * mangle.cc (write_nested_name)
545         * method.cc (early_check_defaulted_comparison)
546         (skip_artificial_parms_for)
547         (num_artificial_parms_for)
548         * pt.cc (is_specialization_of_friend)
549         (determine_specialization)
550         (copy_default_args_to_explicit_spec)
551         (check_explicit_specialization)
552         (tsubst_contract_attribute)
553         (check_non_deducible_conversions)
554         (more_specialized_fn)
555         (maybe_instantiate_noexcept)
556         (register_parameter_specializations)
557         (value_dependent_expression_p)
558         * search.cc (shared_member_p)
559         (lookup_member)
560         (field_access_p)
561         * semantics.cc (finish_omp_declare_simd_methods)
562         * tree.cc (lvalue_kind)
563         * typeck.cc (invalid_nonstatic_memfn_p): Don't use
564         DECL_NONSTATIC_MEMBER_FUNCTION_P.
566 2024-01-09  Julian Brown  <julian@codesourcery.com>
568         * constexpr.cc (potential_consant_expression_1): Handle
569         OMP_ARRAY_SECTION.
570         * cp-tree.h (grok_omp_array_section, build_omp_array_section): Add
571         prototypes.
572         * decl2.cc (grok_omp_array_section): New function.
573         * error.cc (dump_expr): Handle OMP_ARRAY_SECTION.
574         * parser.cc (cp_parser_new): Initialize parser->omp_array_section_p.
575         (cp_parser_statement_expr): Disallow array sections.
576         (cp_parser_postfix_open_square_expression): Support OMP_ARRAY_SECTION
577         parsing.
578         (cp_parser_parenthesized_expression_list, cp_parser_lambda_expression,
579         cp_parser_braced_list): Disallow array sections.
580         (cp_parser_omp_var_list_no_open): Remove ALLOW_DEREF parameter, add
581         MAP_LVALUE in its place.  Support generalised lvalue parsing for
582         OpenMP map, to and from clauses.  Use OMP_ARRAY_SECTION
583         code instead of TREE_LIST to represent OpenMP array sections.
584         (cp_parser_omp_var_list): Remove ALLOW_DEREF parameter, add MAP_LVALUE.
585         Pass to cp_parser_omp_var_list_no_open.
586         (cp_parser_oacc_data_clause): Update call to cp_parser_omp_var_list.
587         (cp_parser_omp_clause_map): Add sk_omp scope around
588         cp_parser_omp_var_list_no_open call.
589         * parser.h (cp_parser): Add omp_array_section_p field.
590         * pt.cc (tsubst, tsubst_copy, tsubst_omp_clause_decl,
591         tsubst_copy_and_build): Add OMP_ARRAY_SECTION support.
592         * semantics.cc (handle_omp_array_sections_1, handle_omp_array_sections,
593         cp_oacc_check_attachments, finish_omp_clauses): Use OMP_ARRAY_SECTION
594         instead of TREE_LIST where appropriate.  Handle more types of map
595         expression.
596         * typeck.cc (build_omp_array_section): New function.
598 2024-01-07  Nathaniel Shead  <nathanieloshead@gmail.com>
600         * module.cc (trees_out::write_var_def): Only write initializers
601         in header modules.
603 2024-01-07  Nathaniel Shead  <nathanieloshead@gmail.com>
605         PR c++/109679
606         * module.cc (depset::hash::add_binding_entity): Don't skip names
607         in the GMF if they've been exported with a using declaration.
609 2024-01-07  Nathaniel Shead  <nathanieloshead@gmail.com>
611         PR c++/110808
612         * parser.cc (cp_parser_module_name): Rewrite to handle
613         module-names and module-partitions independently.
614         (cp_parser_module_partition): New function.
615         (cp_parser_module_declaration): Parse module partitions
616         explicitly. Don't change state if parsing module decl failed.
617         (cp_parser_import_declaration): Handle different kinds of
618         import-declarations locally.
620 2024-01-03  Patrick Palka  <ppalka@redhat.com>
622         PR c++/113064
623         * call.cc (reference_binding): Still try a conversion via a
624         temporary if a direct conversion was bad.
626 2024-01-03  Kwok Cheung Yeung  <kcy@codesourcery.com>
628         * parser.cc (cp_parser_omp_clause_name): Move handling of indirect
629         clause to correspond to alphabetical order.
632 Copyright (C) 2024 Free Software Foundation, Inc.
634 Copying and distribution of this file, with or without modification,
635 are permitted in any medium without royalty provided the copyright
636 notice and this notice are preserved.