https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120529

--- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Marek Polacek <[email protected]>:

https://gcc.gnu.org/g:e82a8e51848b5a74edb530f7597861f7080662c3

commit r16-5489-ge82a8e51848b5a74edb530f7597861f7080662c3
Author: Marek Polacek <[email protected]>
Date:   Thu Nov 20 13:57:43 2025 -0500

    c++: make __reference_*_from_temporary honor access [PR120529]

    This PR reports that our __reference_*_from_temporary ignore access
    control.  The reason is that we only check if implicit_conversion
    works, but not if the conversion can actually be performed, via
    convert_like.

            PR c++/120529

    gcc/cp/ChangeLog:

            * call.cc (ref_conv_binds_to_temporary): Don't ignore access
control.

    gcc/testsuite/ChangeLog:

            * g++.dg/ext/reference_xes_from_temporary1.C: New test.

    Reviewed-by: Jason Merrill <[email protected]>

Reply via email to