Hello Roberto,
I did attempt to run your test project on CW 6.3, and obtained the results (tmp1 = 15; tmp2 = 15; ), as was expected. Again, the default options were being used.
There were a couple of C2705: "Possible loss of data" warnings that occurred. The warnings could be eliminated by casting the result of each pointer subtraction, which did not affect the results obtained.
tmp1 = (uint16_t)(pnt.p2 - pnt.p1);
.
Since tmp1 is an unsigned variable, there would be a definite problem if (pnt.p1 > pnt.p2) were to ever occur.
Regards,
Mac