This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
-Werror=unused-value does not give error when ignoring return value of function with attribute warn_unused_result
- From: Erik <esigra at gmail dot com>
- To: MSX to GCC <gcc-help at gcc dot gnu dot org>
- Date: Thu, 02 Jul 2009 00:39:02 +0200
- Subject: -Werror=unused-value does not give error when ignoring return value of function with attribute warn_unused_result
I need to get an error when the return value of a function with
attribute warn_unused_result is ignored. I added
-Werror=unused-function, -Werror=unused-label and -Werror=unused-value
but nothing seems to work.