https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109673
Bug ID: 109673
Summary: warn_unused_result warnings are incorrect (and/or
missing) and vary when -Os is specified
Product: gcc
Version: 12.2.0
Status: UNCONFIRMED
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109673
--- Comment #2 from Parke ---
Thank you for the explanation.
It seems to me that it would (should?) be possible for -Os to detect the
cast-to-void and therefore suppress the second warning (line 5).
It also seems to me the above change, if imp