This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/35579] [4.1/4.2/4.3/4.4 Regression] casts to void do not silence -Wunused warnings for the case of __attribute__(( warn_unused_result ))
- From: "bonzini at gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Oct 2008 09:14:52 -0000
- Subject: [Bug c/35579] [4.1/4.2/4.3/4.4 Regression] casts to void do not silence -Wunused warnings for the case of __attribute__(( warn_unused_result ))
- References: <bug-35579-15916@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #6 from bonzini at gnu dot org 2008-10-17 09:14 -------
It seems bad that *explicit* casts to void cannot silence the warning. This is
a problem for projects using -Werror and using (void) with due diligence
(including GNU coreutils).
--
bonzini at gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to fail| |4.1.2 4.2.4 4.3.2 4.4.0
Known to work| |4.0.3
Summary|__attribute__(( |[4.1/4.2/4.3/4.4 Regression]
|warn_unused_result )) warns |casts to void do not silence
|when it shouldn't, doesn't |-Wunused warnings for the
|warn when it should |case of __attribute__((
| |warn_unused_result ))
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35579