It is a matter of IDE's optimization, it will optimize on that variable value update to be not aligned with the code sequence. To prohibit the IDE from variable optimization , the variable should be declared as volatile.-Hannibal-
You would declare it as an unsigned fixed width integer instead of using ''int'' on different bit machines which can results in subtle bugs cause by compilation optimization technics.
you write it as follow: