This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/25509] can't disable __attribute__((warn_unused_result))
- From: "bkorb at gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 30 Aug 2010 14:42:53 -0000
- Subject: [Bug c/25509] can't disable __attribute__((warn_unused_result))
- References: <bug-25509-3563@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #25 from bkorb at gnu dot org 2010-08-30 14:42 -------
> > gcc currently has no middle option.
>
> Also this attribute is not on by default in glibc so you are asking to
> turn on the style based warnings.
(In reply to comment #24)
> FIXED in GCC 4.5
After having waded through this long series of comments, I am left
wondering just how this got addressed. Does --no-warn-unused-result
mean that fwrite() usage may be cast to void, or that it may be
treated as if it were a void procedure? I think it is very reasonable
to warn if a returned result is not handled. Casting to void is
a valid way to handle the result. I would like warnings when returned
results are not handled. What does the fix do?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25509