public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "manu at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/54194] misleading suggestion about arithmetic in operand of '|' Date: Fri, 05 Oct 2012 16:26:00 -0000 [thread overview] Message-ID: <bug-54194-4-yn0Z4oNg21@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-54194-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54194 --- Comment #4 from Manuel López-Ibáñez <manu at gcc dot gnu.org> 2012-10-05 16:26:22 UTC --- Using warning_at is an improvement, yes. It still doesn't clarify where the parentheses should go, or why the parentheses are suggested. This is why clang changed the text of the warning. I seem to remember this as an example of cryptic diagnostic from GCC in some Clang presentation. Perhaps the massive takedown by Carruth at GoingNative2012 ? Bah, I am not going to watch that again just to check. I personally, find the "& within |" message quite cryptic. My suggestion would be something like: warning: precedence of '&' within '|' may be confusing without parentheses note: if correct, place parentheses around '&' expression to silence this warning The warning could point to '|', the note could point to '&'. Alternatively, there may be a way to say everything in an even shorter line.
next prev parent reply other threads:[~2012-10-05 16:26 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-08-07 15:28 [Bug c++/54194] New: GCC 4.8 gives " csaba_22 at yahoo dot co.uk 2012-08-07 15:35 ` [Bug c++/54194] " redi at gcc dot gnu.org 2012-08-07 19:35 ` manu at gcc dot gnu.org 2012-10-05 15:37 ` [Bug c++/54194] " paolo.carlini at oracle dot com 2012-10-05 16:26 ` manu at gcc dot gnu.org [this message] 2012-10-05 16:32 ` paolo.carlini at oracle dot com 2012-10-05 16:33 ` paolo.carlini at oracle dot com 2012-10-05 16:42 ` manu at gcc dot gnu.org 2012-10-05 16:47 ` paolo.carlini at oracle dot com 2012-10-09 10:01 ` paolo at gcc dot gnu.org 2012-10-09 10:03 ` paolo.carlini at oracle dot com
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-54194-4-yn0Z4oNg21@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).