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

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

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

commit r13-6958-ga35e8042fbc7a3eb9cece1fba4cdd3b6cdfb906f
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.

Reply via email to