This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: -Werror=unused-value does not give error when ignoring return value of function with attribute warn_unused_result
- From: Ian Lance Taylor <iant at google dot com>
- To: Erik <esigra at gmail dot com>
- Cc: MSX to GCC <gcc-help at gcc dot gnu dot org>
- Date: Wed, 01 Jul 2009 19:30:33 -0700
- Subject: Re: -Werror=unused-value does not give error when ignoring return value of function with attribute warn_unused_result
- References: <4A4BE586.4070805@gmail.com>
Erik <esigra@gmail.com> writes:
> 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.
Unfortunately there is no way to specifically control this warning.
This is a bug.
Ian