[Bug c++/105130] gcc does not warn about unused return value of last expression of statement expr

dani at danielbertalan dot dev gcc-bugzilla@gcc.gnu.org
Fri Apr 1 20:14:05 GMT 2022


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

--- Comment #1 from Daniel Bertalan <dani at danielbertalan dot dev> ---
Created attachment 52740
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52740&action=edit
Proposed patch #2

Actually, my proposed patch was definitely incorrect. It didn't allow me to
circumvent the warning by explicitly casting to void. This new version fixes
that issue.


More information about the Gcc-bugs mailing list