[Bug go/66431] [go] Unexpected function return value after it is redefined in closure
ian at airs dot com
gcc-bugzilla@gcc.gnu.org
Fri Jun 5 13:26:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66431
Ian Lance Taylor <ian at airs dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |INVALID
--- Comment #2 from Ian Lance Taylor <ian at airs dot com> ---
This is not a bug in either toolchain. The Go language does not fully specify
the order of evaluation. In the line
return value, closure()
it is not specified whether value is read before after closure is called. The
two toolchains are making different choices. Both are correct. The program is
indeterminate.
This is already explained at the code.google.com link that you attached.
More information about the Gcc-bugs
mailing list