[Bug c++/87408] Enhance -Wunused-value to catch more complex expressions
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Sep 24 11:14:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87408
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2018-09-24
Ever confirmed|0 |1
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Our warning talks about the statement, and without interprocedural analysis it
can't see that get() doesn't have an effect. Clang's warning is better because
it doesn't say anything about whether get() has an effect, just that get()->a
doesn't use the result of the class member access.
More information about the Gcc-bugs
mailing list