mgo

Merge lp://staging/~mwhudson/mgo/evaluation-order into lp://staging/mgo/v2

Proposed by Michael Hudson-Doyle
Status: Merged
Merged at revision: 247
Proposed branch: lp://staging/~mwhudson/mgo/evaluation-order
Merge into: lp://staging/mgo/v2
Diff against target: 43 lines (+8/-4)
1 file modified
bson/decode.go (+8/-4)
To merge this branch: bzr merge lp://staging/~mwhudson/mgo/evaluation-order
Reviewer Review Type Date Requested Status
Gustavo Niemeyer Pending
Review via email: mp+194968@code.staging.launchpad.net

Description of the change

bson: don't trust expression evaluation order

The evaluation order of

  end := d.i - 4 + int(d.readInt32())

differs when compiled with gccgo vs the gc toolchain, and is
apparently unspecified according to the spec.

To post a comment you must log in.
Revision history for this message
Dave Cheney (dave-cheney) wrote :

I've raised the question on the gccgo mailing list.

https://groups.google.com/d/msg/gofrontend-dev/y5g92hnEGfg/6tYHbfw-YtcJ

Revision history for this message
Gustavo Niemeyer (niemeyer) wrote :

*** Submitted:

bson: don't trust expression evaluation order

The evaluation order of

  end := d.i - 4 + int(d.readInt32())

differs when compiled with gccgo vs the gc toolchain, and is
apparently unspecified according to the spec.

Revision history for this message
Gustavo Niemeyer (niemeyer) wrote :

Thanks!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches