Why does the LED turn on after the while loop becomes false?

the pre-increment is performed first before the value is used for other operations.

arduino uses the industry standard GNU CC compiler

i don't understand what is underfined. the compiler needs to access the value of the variable. the value is affected by the increment -- first.