https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97712
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> --- [[nodiscard]] is a function attribute rather than function type attribute, so it really doesn't apply to virtual calls (unless it can be devirtualized early).