diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2021-08-05 16:46:00 +0100 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2021-08-05 19:01:51 +0100 |
commit | c8b024fa4b76bfd914e96dd3cecfbb6ee8e91316 (patch) | |
tree | afb7a2985f449804455cbe65e9c7c848d63dc5d6 /libgo/go | |
parent | 4739344d36e6d24764cbedde44a3fff6edc70f6c (diff) | |
download | gcc-c8b024fa4b76bfd914e96dd3cecfbb6ee8e91316.zip gcc-c8b024fa4b76bfd914e96dd3cecfbb6ee8e91316.tar.gz gcc-c8b024fa4b76bfd914e96dd3cecfbb6ee8e91316.tar.bz2 |
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 <jwakely@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.
Diffstat (limited to 'libgo/go')
0 files changed, 0 insertions, 0 deletions