spec: document that Alignof, Offsetof, and Sizeof do not evaluate their arguments #12946
Labels
Documentation
Issues describing a change to documentation.
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
At least in cmd/compile, unsafe.Alignof, unsafe.Offsetof, and unsafe.Sizeof do not evaluate their arguments: http://play.golang.org/p/4QE3mVrFaS
Although unsurprising and consistent with C/C++, the Go spec doesn't mention this. It does say
but I don't think that's necessarily mutually exclusive with evaluating the argument expression.
The text was updated successfully, but these errors were encountered: