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

--- Comment #14 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Jonathan Wakely
<r...@gcc.gnu.org>:

https://gcc.gnu.org/g:47880309516fd5c913102eb4c52dc86da7051983

commit r12-9486-g47880309516fd5c913102eb4c52dc86da7051983
Author: Jonathan Wakely <jwak...@redhat.com>
Date:   Fri Mar 31 13:38:14 2023 +0100

    libstdc++: Avoid -Wmaybe-uninitialized warning in std::stop_source
[PR109339]

    We pass a const-reference to *this before it's constructed, and GCC
    assumes that all const-references are accessed. Add the access attribute
    to say it's not accessed.

    libstdc++-v3/ChangeLog:

            PR libstdc++/109339
            * include/std/stop_token (_Stop_state_ptr(const stop_source&)):
            Add attribute access with access-mode 'none'.
            * testsuite/30_threads/stop_token/stop_source/109339.cc: New test.

    (cherry picked from commit a35e8042fbc7a3eb9cece1fba4cdd3b6cdfb906f)

Reply via email to