On Jun 19 2021, Paul Smith wrote: > But, as human programmers we can examine this code and understand that > actually, it's never possible for p to point to the first character of > the array: we know that eval_strings->idx is never 0, so we know that p > will always be incremented past the beginning of the memory buffer: > > p = value = alloca (len); > for (i = 0; i < eval_strings->idx; ++i) > { > ... > *(p++) = ' '; > } > p[-1] = '\0';
The crux is of course to tell the compiler that eval_strings->idx is always > 0, which is pretty hard for the compiler to deduce. Andreas. -- Andreas Schwab, SUSE Labs, sch...@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different."