This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/25509] can't voidify __attribute__((warn_unused_result))
- From: "mueller at kde dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 Dec 2005 04:02:46 -0000
- Subject: [Bug c/25509] can't voidify __attribute__((warn_unused_result))
- References: <bug-25509-3563@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #7 from mueller at kde dot org 2005-12-21 04:02 -------
ok, lets assume that you meant with "can not be ignored" actually "must not be
ignored". now thats where the definitions in RFC2119 kick in:
2. MUST NOT This phrase, or the phrase "SHALL NOT", mean that the
definition is an absolute prohibition of the specification.
4. SHOULD NOT This phrase, or the phrase "NOT RECOMMENDED" mean that
there may exist valid reasons in particular circumstances when the
particular behavior is acceptable or even useful, but the full
implications should be understood and the case carefully weighed
before implementing any behavior described with this label.
The documentation correctly states SHOULD NOT, and thats distinctively
different from MUST NOT.
I already agreed that glibc is over the top, nevertheless the (void)ify trick
doesn't suppress the warning, and either that behaviour is a bug or the
behaviour that assigning to a dummy variable (which is never read and therefore
dead storage) doesn't warn is a bug. you choose.
--
mueller at kde dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |UNCONFIRMED
Resolution|INVALID |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25509