https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101545
--- Comment #1 from Alejandro Colomar <colomar.6.4.3 at gmail dot com> --- The same code with [[gnu::warn_unused_result]] instead of [[nodiscard]] doesn't trigger the warning.
colomar.6.4.3 at gmail dot com via Gcc-bugs Wed, 21 Jul 2021 00:07:59 -0700
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101545
--- Comment #1 from Alejandro Colomar <colomar.6.4.3 at gmail dot com> --- The same code with [[gnu::warn_unused_result]] instead of [[nodiscard]] doesn't trigger the warning.