public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: nathan@gcc.gnu.org To: gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, lindahlb@hotmail.com, nobody@gcc.gnu.org, unifex@yuidesigns.net Subject: Re: c++/7135: Faulty Operator Precedence Date: Thu, 27 Jun 2002 05:00:00 -0000 [thread overview] Message-ID: <20020627111444.16432.qmail@sources.redhat.com> (raw) Synopsis: Faulty Operator Precedence State-Changed-From-To: open->feedback State-Changed-By: nathan State-Changed-When: Thu Jun 27 04:14:43 2002 State-Changed-Why: I beleive the code is ill-formed. I agree the code is equivalent to operator<<(operator<<(cout, a.set(5).get()), a.set(30).get()); which I'll rewrite as Foo (Baz (cout a.Wibble (5)), a.Wobble (30))) There are 4 sequence points in that, each between evaluating the parameters to a call, and the call itself. These sequence points are partially ordered, but not completely ordered. In particular there is no ordering between the a.Wobble (30) call and the a.Wibble (5) call. i.e. in evaluating the argyments to Foo, I could a.Wobble (30) a.Wibble (5) cout call Baz call Foo I cout reorder the a.Wibble and a.Wobble calls. your example had a.Wobble (5).Fetch1 () and a.Wibble (30).Fetch2 (), those fetch calls are similarly unorderd. Provided the appropriate Fetch occurs after the Wibble/Wobble call, C++ semantics are maintained. Let me know if you disagree with my analysis http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7135
next reply other threads:[~2002-06-27 11:14 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2002-06-27 5:00 nathan [this message] -- strict thread matches above, loose matches on Subject: below -- 2002-06-30 2:57 Nathan Sidwell 2002-06-30 2:56 nathan 2002-06-27 13:16 Brian Lindahl 2002-06-26 17:46 lindahlb
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=20020627111444.16432.qmail@sources.redhat.com \ --to=nathan@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ --cc=gcc-gnats@gcc.gnu.org \ --cc=gcc-prs@gcc.gnu.org \ --cc=lindahlb@hotmail.com \ --cc=nobody@gcc.gnu.org \ --cc=unifex@yuidesigns.net \ /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).