This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug objc/11754] [objc-improvements-branch] receiver is evaluated twice when passing messages with the gnu runtime
- From: "alexander at malmberg dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 31 Jul 2003 23:49:47 -0000
- Subject: [Bug objc/11754] [objc-improvements-branch] receiver is evaluated twice when passing messages with the gnu runtime
- References: <20030731201655.11754.alexander@malmberg.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11754
alexander at malmberg dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |UNCONFIRMED
Resolution|FIXED |
------- Additional Comments From alexander at malmberg dot org 2003-07-31 23:49 -------
Unfortunately, there's a typo in the committed fix:
+ if (!supper_flag)
should be "super_flag", not "supper_flag".
Also, it's worth noting that this doesn't apply only to cascaded messages,
although that's where I discovered it. Incorrect code will be generated when the
expression for the receiver has any kind of side effect, and pessimal code in
other cases. Eg.
[SomeClass foo] would call objc_get_class("SomeClass") twice (which is harmless)
and
[someFunction() foo] would call someFunction() twice, which has a good chance of
not being harmless