public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "nico at josuttis dot de" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/91415] Invalid warning for C++17 sequencing of shift operator E1<<E2. Date: Thu, 10 Dec 2020 16:38:16 +0000 [thread overview] Message-ID: <bug-91415-4-jiSwAbh8YE@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-91415-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91415 --- Comment #13 from Nicolai Josuttis <nico at josuttis dot de> --- Oh, sorry, your are right, the example indeed works. BUT: I used in fact a slightly different example (sorry, didn't expect that there is a difference): int main() { int i = 0; int j = i++ << i++; // OK, NO WARNING std::cout << i++ << i++; // still WARNING } see https://wandbox.org/permlink/ioZnOv3oAp5F0BsQ According to my understanding the warning should especially also not come when we pass i++ twice to std::cout (to sequence output was a key goal of this fix in C++17). But may be I am missing something.
next prev parent reply other threads:[~2020-12-10 16:38 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <bug-91415-4@http.gcc.gnu.org/bugzilla/> 2020-12-04 7:51 ` nico at josuttis dot de 2020-12-07 19:31 ` mpolacek at gcc dot gnu.org 2020-12-10 16:38 ` nico at josuttis dot de [this message] 2023-07-29 18:10 ` pinskia at gcc dot gnu.org
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-91415-4-jiSwAbh8YE@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).