https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94379
Martin Sebor <msebor at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2020-03-28
CC| |msebor at gcc dot gnu.org
Ever confirmed|0 |1
Severity|normal |enhancement
Status|UNCONFIRMED |NEW
--- Comment #1 from Martin Sebor <msebor at gcc dot gnu.org> ---
Confirmed.
C2X will likely have the same [[nodiscard]] attribute as C++. GCC 10
recognizes [[nodiscard]] but ignores it with a warning. In both languages the
attribute can be applied to enums, structures, and unions as well. The latest
proposal is http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2267.pdf. But I
think it makes sense to extend warn_unused_result so that it can be used in
earlier language conformance modes, and for compatibility with Clang.