On Sat, 2024-07-06 at 00:02 +0200, Alejandro Colomar wrote: > That's precisely the case with strtol(3): it doesn't access any objects > through *endptr, and so that pointer need not be restrict. > > Then, nptr is a read-only pointer, so is doesn't matter either if it's > accessed or not. Restrict allows to reorder any writes to other objects with an read from nptr then. In strtol at least errno can be written, and depending on the implementation of locale things there may be more. TBAA does not help here because char aliases with anything. -- Xi Ruoyao <xry111@xxxxxxxxxxx> School of Aerospace Science and Technology, Xidian University