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

--- Comment #7 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:c8b024fa4b76bfd914e96dd3cecfbb6ee8e91316

commit r12-2773-gc8b024fa4b76bfd914e96dd3cecfbb6ee8e91316
Author: Jonathan Wakely <jwak...@redhat.com>
Date:   Thu Aug 5 16:46:00 2021 +0100

    libstdc++: Move [[nodiscard]] attributes again [PR101782]

    Where I moved these nodiscard attributes to made them apply to the
    function type, not to the function. This meant they no longer generated
    the desired -Wunused-result warnings, and were ill-formed with Clang
    (but only a pedwarn with GCC).

    Clang also detected ill-formed attributes in <queue> which this fixes.

    Signed-off-by: Jonathan Wakely <jwak...@redhat.com>

    libstdc++-v3/ChangeLog:

            PR libstdc++/101782
            * include/bits/ranges_base.h (ranges::begin, ranges::end)
            (ranges::rbegin, ranges::rend, ranges::size, ranges::ssize)
            (ranges::empty, ranges::data): Move attribute after the
            declarator-id instead of at the end of the declarator.
            * include/bits/stl_iterator.h (__gnu_cxx::__normal_iterator):
            Move attributes back to the start of the function declarator,
            but move the requires-clause to the end.
            (common_iterator): Move attribute after the declarator-id.
            * include/bits/stl_queue.h (queue): Remove ill-formed attributes
            from friend declaration that are not definitions.
            * include/std/ranges (views::all, views::filter)
            (views::transform, views::take, views::take_while,
            views::drop) (views::drop_while, views::join,
            views::lazy_split) (views::split, views::counted,
            views::common, views::reverse) (views::elements): Move
            attributes after the declarator-id.

Reply via email to