This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/66425] (void) cast doesn't suppress __attribute__((warn_unused_result))
- From: "manu at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 05 Jun 2015 07:21:06 +0000
- Subject: [Bug c/66425] (void) cast doesn't suppress __attribute__((warn_unused_result))
- Auto-submitted: auto-generated
- References: <bug-66425-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66425
Manuel LÃpez-IbÃÃez <manu at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |manu at gcc dot gnu.org
--- Comment #1 from Manuel LÃpez-IbÃÃez <manu at gcc dot gnu.org> ---
I am not the one who decides, but the conclusion of the previous discussion was
that users of _wur (which are the API maintainers adding it) do want to get a
warning even with (void) and GCC's testsuite explicitly tests for it.
It is fairly easy to use -Wno-unused-result or "#pragma GCC diagnostics" if you
want more fine-tuning. The location info in GCC has improved to the point that
it is possible to ignore individual warnings using #pragmas. That seems far
clearer to a reader and makes obvious which warning is ignored on purpose.
Of course, we are happy to get as much help as we can, but I would not want you
to waste your time on something that is likely not going to get approved.