2 ms·
"Unsequenced modification and access to 'p'" for: func[p/102]( p++ ) ; A quick search brought me to http://www.bionoren.com/blog/2013/07/unsequenced-modif
by npongratz 12y ago
"Unsequenced modification and access to 'p'" for:
func[p/102]( p++ ) ;
A quick search brought me to http://www.bionoren.com/blog/2013/07/unsequenced-modification-and-access/ http://www.bionoren.com/blog/2013/07/unsequenced-modificatio... : 'Basically, the compiler is free to reorder anything and everything until it hits a “sequence point”. Things like return, if, assignment, variable declaration, etc are all sequence points.'
In the parent code sample, it seems the compiler is free to execute "p++" before the "p/102" since there is no sequence point between them.
I was previously unaware of this undefined behavior. Thanks for this, rertrree!