I would like to ask for confirmation if I understand correctly few items. Thank in advance for the answer(s).
Bellow let's consider only correct, valid, race-free "normal" programs that do not use CGO or directly call assembler routines etc. 1. Once 'p := &v' is executed, the program always observes, through *p, the same value v had before the assignment unless the program mutates p or *p by itself. 2. The value of p per se is not guaranteed to be the same all the times. The program may observe different values of p without the program mutating p by itself. 3. The well known existing Go compilers, up to and including version 1.9, may move *p and update p iff *p is located in a goroutine stack. (Not a specification guarantee, just an implementation detail.) Is all of the above correct? -- -j -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.