public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "romato.san1337 at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c/66425] (void) cast doesn't suppress __attribute__((warn_unused_result)) Date: Thu, 10 Aug 2023 12:25:52 +0000 [thread overview] Message-ID: <bug-66425-4-hyJqUdTmwT@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-66425-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66425 --- Comment #57 from Roman Krotov <romato.san1337 at gmail dot com> --- (In reply to Ed Catmur from comment #55) > So this problem will resolve itself, over time. But I don't see any reasons not to implement the switch right now... Late is better than never. > we can expect that attribute to be adopted where people intend that behavior > as opposed to the > warning not suppressible by cast to void I see your point and I partially agree with it, but what about the projects what don't agree with the distinction of these 2 attributes? Or just want to be more compatible with clang? Or they just may not agree with the choice of a library, that decided to put wur instead of nodiscard for a specific function. Something like -Wno-void-unused would still be better for them than -Wno-unused-result, for the reasons in my previous comment. (In reply to Martin Uecker from comment #56) > works as expected and is supported for older language modes Even if one day projects, that will prefer to stay on C99 or C11 and use -Wpedantic (which warns about [[]] right now), will be able to use [[syntax]] without any warning, they may still not like it. Even if gcc will include nodiscard into the __attribute__ syntax, there, for sure, will be the libraries that won't prefer to update or use the new attribute. For these situations, or even if they **will** use the new attribute, see my previous paragraph.
next prev parent reply other threads:[~2023-08-10 12:25 UTC|newest] Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-06-05 0:38 [Bug c/66425] New: " rusty at rustcorp dot com.au 2015-06-05 7:21 ` [Bug c/66425] " manu at gcc dot gnu.org 2015-06-11 0:51 ` filbranden at google dot com 2015-06-11 5:39 ` pinskia at gcc dot gnu.org 2015-06-11 5:52 ` koct9i at gmail dot com 2015-06-11 5:55 ` filbranden at google dot com 2015-06-11 6:06 ` pinskia at gcc dot gnu.org 2015-06-11 6:37 ` filbranden at google dot com 2015-06-11 6:46 ` filbranden at google dot com 2015-06-11 6:49 ` lucas.de.marchi at gmail dot com 2015-06-11 8:41 ` manu at gcc dot gnu.org 2015-06-11 14:10 ` schwab@linux-m68k.org 2015-06-11 14:25 ` manu at gcc dot gnu.org 2015-06-11 15:08 ` lucas.de.marchi at gmail dot com 2015-06-11 15:49 ` joseph at codesourcery dot com 2015-06-11 16:57 ` filbranden at google dot com 2015-06-14 17:29 ` segher at gcc dot gnu.org 2015-08-20 5:35 ` rusty at rustcorp dot com.au 2015-08-20 6:05 ` filbranden at google dot com 2020-03-28 11:07 ` pskocik at gmail dot com 2021-07-27 19:33 ` ndesaulniers at google dot com 2023-04-22 21:20 ` achurch+gcc at achurch dot org 2023-04-23 7:07 ` sjames at gcc dot gnu.org 2023-04-23 7:53 ` achurch+gcc at achurch dot org 2023-04-23 20:00 ` segher at gcc dot gnu.org 2023-04-23 21:51 ` achurch+gcc at achurch dot org 2023-04-23 22:03 ` pinskia at gcc dot gnu.org 2023-04-23 23:06 ` achurch+gcc at achurch dot org 2023-04-24 6:45 ` rusty at rustcorp dot com.au 2023-04-24 8:21 ` achurch+gcc at achurch dot org 2023-04-24 8:26 ` jakub at gcc dot gnu.org 2023-04-24 8:35 ` fw at gcc dot gnu.org 2023-04-24 9:06 ` segher at gcc dot gnu.org 2023-04-24 9:18 ` jengelh at inai dot de 2023-04-24 9:41 ` achurch+gcc at achurch dot org 2023-08-09 22:33 ` romato.san1337 at gmail dot com 2023-08-09 23:09 ` ed at catmur dot uk 2023-08-10 9:23 ` muecker at gwdg dot de 2023-08-10 12:25 ` romato.san1337 at gmail dot com [this message] 2023-08-10 18:12 ` ed at catmur dot uk 2023-08-17 13:09 ` romato.san1337 at gmail dot com 2023-09-06 11:07 ` segher at gcc dot gnu.org 2023-09-06 11:51 ` achurch+gcc at achurch dot org 2024-02-14 11:32 ` groessler_christian at yahoo dot de
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-66425-4-hyJqUdTmwT@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).