aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/ChangeLog
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/ChangeLog')
-rw-r--r--gcc/cp/ChangeLog342
1 files changed, 342 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 2944f22..3f76afd 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,345 @@
+2025-08-01 Nathaniel Shead <nathanieloshead@gmail.com>
+
+ PR c++/108080
+ * module.cc (trees_out::core_vals): Warn when streaming
+ target/optimize node; adjust comments.
+ (trees_in::core_vals): Don't stream a target/optimize node.
+
+2025-08-01 Nathaniel Shead <nathanieloshead@gmail.com>
+
+ PR c++/121238
+ * module.cc (trees_in::fn_parms_fini): Merge properties for
+ definitions.
+
+2025-07-31 Jason Merrill <jason@redhat.com>
+
+ PR c++/120800
+ * constexpr.cc (cxx_eval_vec_init_1): Suppress access control.
+
+2025-07-31 Marek Polacek <polacek@redhat.com>
+
+ PR c++/120775
+ * constexpr.cc (cxx_eval_outermost_constant_expr): Use
+ extract_call_expr.
+ * cp-tree.h (CONSTEVAL_BLOCK_P, LAMBDA_EXPR_CONSTEVAL_BLOCK_P): Define.
+ (finish_static_assert): Adjust declaration.
+ (current_nonlambda_function): Likewise.
+ * lambda.cc (current_nonlambda_function): New parameter. Only keep
+ iterating if the function represents a consteval block.
+ * parser.cc (cp_parser_lambda_expression): New parameter for
+ consteval blocks. Use it. Set LAMBDA_EXPR_CONSTEVAL_BLOCK_P.
+ (cp_parser_lambda_declarator_opt): Likewise.
+ (build_empty_string): New.
+ (cp_parser_next_tokens_are_consteval_block_p): New.
+ (cp_parser_consteval_block): New.
+ (cp_parser_block_declaration): Handle consteval blocks.
+ (cp_parser_static_assert): Use build_empty_string.
+ (cp_parser_member_declaration): Handle consteval blocks.
+ * pt.cc (tsubst_stmt): Adjust a call to finish_static_assert.
+ * semantics.cc (finish_fname): Warn for consteval blocks.
+ (finish_static_assert): New parameter for consteval blocks. Set
+ CONSTEVAL_BLOCK_P. Evaluate consteval blocks specially.
+
+2025-07-30 Nathaniel Shead <nathanieloshead@gmail.com>
+
+ PR c++/121291
+ * constraint.cc (diagnose_trait_expr): Remove assumption about
+ failures returning error_mark_node.
+ * except.cc (explain_not_noexcept): Allow expr not being
+ noexcept.
+ * method.cc (build_invoke): Adjust comment.
+ (is_trivially_xible): Always note non-trivial components if expr
+ is not null or error_mark_node.
+ (is_nothrow_xible): Likewise for non-noexcept components.
+ (is_nothrow_convertible): Likewise.
+
+2025-07-30 Jason Merrill <jason@redhat.com>
+
+ * pt.cc (convert_nontype_argument_function): Check
+ cxx_constant_value on failure.
+ (invalid_tparm_referent_p): Likewise.
+
+2025-07-30 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/121133
+ * parser.cc (cp_parser_unary_expression): Adjust
+ cp_parser_extension_opt caller and restore warn_long_long.
+ (cp_parser_declaration): Likewise.
+ (cp_parser_block_declaration): Likewise.
+ (cp_parser_member_declaration): Likewise.
+ (cp_parser_extension_opt): Add SAVED_LONG_LONG argument,
+ save previous warn_long_long state into it and clear it
+ for __extension__.
+
+2025-07-27 Nathaniel Shead <nathanieloshead@gmail.com>
+
+ * cp-tree.h (struct lang_type): Add comment mentioning modules.
+ * module.cc (trees_out::lang_type_bools): Stream new flags, use
+ gcc_checking_assert.
+ (trees_in::lang_type_bools): Likewise.
+
+2025-07-25 David Malcolm <dmalcolm@redhat.com>
+
+ * constexpr.cc: Update usage of "diagnostic_info" to explicitly
+ refer to "diagnostics::diagnostic_info".
+ * cp-tree.h: Likewise.
+ * error.cc: Likewise.
+ * module.cc: Likewise.
+
+2025-07-25 David Malcolm <dmalcolm@redhat.com>
+
+ * call.cc: Update for diagnostic_t becoming
+ enum class diagnostics::kind.
+ * constexpr.cc: Likewise.
+ * cp-tree.h: Likewise.
+ * decl.cc: Likewise.
+ * error.cc: Likewise.
+ * init.cc: Likewise.
+ * method.cc: Likewise.
+ * module.cc: Likewise.
+ * parser.cc: Likewise.
+ * pt.cc: Likewise.
+ * semantics.cc: Likewise.
+ * typeck.cc: Likewise.
+ * typeck2.cc: Likewise.
+
+2025-07-25 David Malcolm <dmalcolm@redhat.com>
+
+ * cp-tree.h: Update for renaming of diagnostic_option_id to
+ diagnostics::option_id.
+ * decl.cc: Likewise.
+ * error.cc: Likewise.
+ * name-lookup.cc: Likewise.
+
+2025-07-25 David Malcolm <dmalcolm@redhat.com>
+
+ * error.cc: Update for move of diagnostic-color.h to
+ diagnostics/color.h.
+
+2025-07-25 David Malcolm <dmalcolm@redhat.com>
+
+ * cp-tree.h: Update for diagnostic_context becoming
+ diagnostics::context.
+ * error.cc: Likewise.
+ * module.cc: Likewise.
+
+2025-07-25 David Malcolm <dmalcolm@redhat.com>
+
+ * constexpr.cc: Update to add "m_" prefix to fields of
+ diagnostic_info throughout.
+ * error.cc: Likewise.
+
+2025-07-25 David Malcolm <dmalcolm@redhat.com>
+
+ * cp-tree.h: Update for move of diagnostics output formats into
+ namespace "diagnostics" as "sinks".
+ * error.cc: Likewise.
+
+2025-07-25 Patrick Palka <ppalka@redhat.com>
+
+ * call.cc (build_new_op): If the selected candidate is
+ rewritten, communicate the LOOKUP_REWRITTEN/REVERSED flags to
+ the caller via the 'overload' out-parameter, and stop clearing
+ '*overload' in that case.
+ * tree.cc (build_min_non_dep_op_overload): Handle rebuilding all
+ C++20 rewritten comparison operator expressions.
+
+2025-07-25 Iain Sandoe <iain@sandoe.co.uk>
+
+ PR c++/121219
+ * coroutines.cc
+ (cp_coroutine_transform::build_ramp_function): Reorder the return
+ expressions for the 'normal' and 'allocation failed' cases so that
+ NRV constraints are met.
+
+2025-07-24 Nathaniel Shead <nathanieloshead@gmail.com>
+
+ PR c++/117294
+ PR c++/113854
+ * call.cc (implicit_conversion_error): Hide label when printing
+ a stub object.
+ (convert_like_internal): Likewise, and nest candidate
+ diagnostics.
+ * constexpr.cc (diagnose_failing_condition): Nest diagnostics,
+ attempt to provide more helpful diagnostics for traits.
+ * constraint.cc (satisfy_atom): Pass result before constant
+ evaluation to diagnose_atomic_constraint.
+ (diagnose_trait_expr): Adjust diagnostics for clarity and
+ detail.
+ (maybe_diagnose_standard_trait): New function.
+ (diagnose_atomic_constraint): Attempt to provide more helpful
+ diagnostics for more traits.
+ * cp-tree.h (explain_not_noexcept): Declare new function.
+ (is_trivially_xible): Add parameter.
+ (is_nothrow_xible): Likewise.
+ (is_xible): Likewise.
+ (is_convertible): Likewise.
+ (is_nothrow_convertible): Likewise.
+ (diagnose_trait_expr): Declare new function.
+ (maybe_diagnose_standard_trait): Declare new function.
+ * error.cc (dump_type) <case TREE_VEC>: Handle trait types.
+ * except.cc (explain_not_noexcept): New function.
+ * method.cc (build_trait_object): Add complain parameter.
+ (build_invoke): Propagate complain parameter.
+ (assignable_expr): Add explain parameter to show diagnostics.
+ (constructible_expr): Likewise.
+ (destructible_expr): Likewise.
+ (is_xible_helper): Replace trivial flag with explain flag,
+ add diagnostics.
+ (is_trivially_xible): New explain flag.
+ (is_nothrow_xible): Likewise.
+ (is_xible): Likewise.
+ (is_convertible_helper): Add complain flag.
+ (is_convertible): New explain flag.
+ (is_nothrow_convertible): Likewise.
+ * typeck.cc (cp_build_function_call_vec): Add handling for stub
+ objects.
+ (convert_arguments): Always return -1 on error.
+ * typeck2.cc (cxx_readonly_error): Add handling for stub
+ objects.
+
+2025-07-24 Jason Merrill <jason@redhat.com>
+
+ * pt.cc (tsubst_lambda_expr): Revert r9-5971 change.
+
+2025-07-24 Jason Merrill <jason@redhat.com>
+
+ PR c++/114632
+ PR c++/101233
+ * lambda.cc (maybe_add_lambda_conv_op): Not for xobj lambda.
+ * pt.cc (tsubst_function_decl): Add cp_evaluated.
+ (alias_ctad_tweaks): Revert PR101233 fix.
+
+2025-07-24 Nathaniel Shead <nathanieloshead@gmail.com>
+
+ PR c++/120412
+ * module.cc (trees_out::core_vals): Write TU_LOCAL_ENTITY bits.
+ (trees_in::core_vals): Read it.
+ (trees_in::tree_node): Handle TU_LOCAL_ENTITY typedefs.
+
+2025-07-23 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/121179
+ * call.cc (build_new_op): Don't clear *overload for a simple
+ != to == rewrite.
+ * tree.cc (build_min_non_dep_op_overload): Handle TRUTH_NOT_EXPR
+ appearing in a rewritten operator expression.
+
+2025-07-23 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/121055
+ * method.cc (build_invoke): Correct reference_wrapper handling.
+
+2025-07-22 Jason Merrill <jason@redhat.com>
+
+ PR c++/121068
+ * constexpr.cc (cxx_eval_store_expression): Allow ARRAY_REFs
+ when activating an array member of a union.
+
+2025-07-21 Stefan Schulze Frielinghaus <stefansf@gcc.gnu.org>
+
+ * semantics.cc (finish_asm_stmt): Pass null pointer to
+ parse_{input,output}_constraint().
+
+2025-07-16 Kwok Cheung Yeung <kcyeung@baylibre.com>
+
+ * pt.cc (tsubst_omp_clause_decl): Use OMP_ITERATOR_DECL_P.
+ * semantics.cc (handle_omp_array_sections): Likewise.
+ (finish_omp_clauses): Likewise.
+
+2025-07-16 Alfie Richards <alfie.richards@arm.com>
+
+ * class.cc (add_method): Remove argument.
+ * cp-tree.h (maybe_version_functions): Ditto.
+ * decl.cc (decls_match): Ditto.
+ (maybe_version_functions): Ditto.
+
+2025-07-16 Jeremy Rifkin <jeremy@rifkin.dev>
+
+ PR c/82134
+ * call.cc (build_call_a): Add suppress_warning
+ * cp-gimplify.cc (cp_gimplify_expr): Add suppress_warning
+
+2025-07-15 Jason Merrill <jason@redhat.com>
+
+ PR c++/44677
+ * cp-gimplify.cc (cp_fold) [CLEANUP_POINT_EXPR]: Don't force rvalue.
+ [COMPOUND_EXPR]: Likewise.
+ * cvt.cc (convert_to_void): Call mark_exp_read later.
+ * expr.cc (mark_use): Turn off read_p for any void argument.
+ (mark_exp_read): Return early for void argument.
+
+2025-07-15 Jason Merrill <jason@redhat.com>
+
+ PR c++/120577
+ * constexpr.cc (cxx_eval_call_expression): Set
+ CONSTRUCTOR_NO_CLEARING on initial value for ctor.
+ (cxx_eval_component_reference): Make value-initialization
+ of an aggregate member explicit.
+
+2025-07-15 Jakub Jelinek <jakub@redhat.com>
+ Jason Merrill <jason@redhat.com>
+
+ PR c/44677
+ * cp-gimplify.cc (cp_fold): Clear DECL_READ_P on lhs of MODIFY_EXPR
+ after cp_fold_rvalue if it wasn't set before.
+ * decl.cc (poplevel): Use OPT_Wunused_but_set_variable_
+ instead of OPT_Wunused_but_set_variable.
+ (finish_function): Use OPT_Wunused_but_set_parameter_
+ instead of OPT_Wunused_but_set_parameter.
+ * expr.cc (mark_use): Clear read_p for {PRE,POST}{IN,DE}CREMENT_EXPR
+ cast to void on {VAR,PARM}_DECL for
+ -Wunused-but-set-{parameter,variable}={2,3}.
+ (mark_exp_read): Handle {PRE,POST}{IN,DE}CREMENT_EXPR and don't handle
+ it when cast to void.
+ * module.cc (trees_in::fn_parms_fini): Remove unused but set variable
+ ix.
+ * semantics.cc (finish_unary_op_expr): Return early for
+ PRE{IN,DE}CREMENT_EXPR.
+ * typeck.cc (cp_build_unary_op): Clear DECL_READ_P
+ after mark_lvalue_use for -Wunused-but-set-{parameter,variable}={2,3}
+ on PRE{IN,DE}CREMENT_EXPR argument.
+ (cp_build_modify_expr): Clear DECL_READ_P after cp_build_binary_op
+ for -Wunused-but-set-{parameter,variable}=3.
+
+2025-07-11 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/119064
+ * cp-tree.h: Implement C++26 P2786R13 - Trivial Relocatability.
+ (struct lang_type): Add trivially_relocatable,
+ trivially_relocatable_computed, replaceable and replaceable_computed
+ bitfields. Change width of dummy from 2 to 30.
+ (CLASSTYPE_TRIVIALLY_RELOCATABLE_BIT,
+ CLASSTYPE_TRIVIALLY_RELOCATABLE_COMPUTED, CLASSTYPE_REPLACEABLE_BIT,
+ CLASSTYPE_REPLACEABLE_COMPUTED): Define.
+ (enum virt_specifier): Add VIRT_SPEC_TRIVIALLY_RELOCATABLE_IF_ELIGIBLE
+ and VIRT_SPEC_REPLACEABLE_IF_ELIGIBLE enumerators.
+ (trivially_relocatable_type_p, replaceable_type_p): Declare.
+ * cp-trait.def (IS_NOTHROW_RELOCATABLE, IS_REPLACEABLE,
+ IS_TRIVIALLY_RELOCATABLE): New traits.
+ * parser.cc (cp_parser_class_property_specifier_seq_opt): Handle
+ trivially_relocatable_if_eligible,
+ __trivially_relocatable_if_eligible, replaceable_if_eligible and
+ __replaceable_if_eligible.
+ (cp_parser_class_head): Set CLASSTYPE_REPLACEABLE_BIT
+ and/or CLASSTYPE_TRIVIALLY_RELOCATABLE_BIT if corresponding
+ conditional keywords were parsed and assert corresponding *_COMPUTED
+ macro is false.
+ * pt.cc (instantiate_class_template): Copy over also
+ CLASSTYPE_TRIVIALLY_RELOCATABLE_{BIT,COMPUTED} and
+ CLASSTYPE_REPLACEABLE_{BIT,COMPUTED} bits.
+ * semantics.cc (referenceable_type_p): Move definition earlier.
+ (trait_expr_value): Handle CPTK_IS_NOTHROW_RELOCATABLE,
+ CPTK_IS_REPLACEABLE and CPTK_IS_TRIVIALLY_RELOCATABLE.
+ (finish_trait_expr): Likewise.
+ * tree.cc (default_movable_type_p): New function.
+ (union_with_no_declared_special_member_fns): Likewise.
+ (trivially_relocatable_type_p): Likewise.
+ (replaceable_type_p): Likewise.
+ * constraint.cc (diagnose_trait_expr): Handle
+ CPTK_IS_NOTHROW_RELOCATABLE, CPTK_IS_REPLACEABLE and
+ CPTK_IS_TRIVIALLY_RELOCATABLE.
+
2025-07-10 Jakub Jelinek <jakub@redhat.com>
* cp-tree.h (struct lang_type): Add comment before key_method.