This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/49863] -Wunused-result not behaving correctly
- From: "jim.king at simplivity dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 23 May 2012 17:15:46 +0000
- Subject: [Bug c/49863] -Wunused-result not behaving correctly
- Auto-submitted: auto-generated
- References: <bug-49863-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49863
James E. King, III <jim.king at simplivity dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jim.king at simplivity dot
| |com
--- Comment #3 from James E. King, III <jim.king at simplivity dot com> 2012-05-23 17:15:46 UTC ---
I would like to recommend that this issue be re-opened. By leaving this issue
alone, debug and optimized builds behave differently. I would like to have the
same warnings enabled for both debug and optimized builds, and currently the
only way to do that is to disable the unused result code checking for the
release build. This seems counter-productive. If I declare
-D_FORTIFY_SOURCE=2 on the command line, the headers should not override me
just because it is not an optimized build. Is there some other unforeseen
reason for this rule, such as that the compiler actually cannot check for this
warning unless doing optimizations?