Re: undefined-behavior obstack.c:139

Bruno Haible <[email protected]> Sat, 02 Dec 2023 09:50:33 +0100
Newsgroups gmane.comp.gnu.m4.bugs,gmane.comp.lib.gnulib.bugs
Message-ID <10750775.NtUAy9VM4c@nimes>
Andreas F. Borchert wrote:
> In summary, null pointer constants are not pointers to an object
> or an element of an array object and thereby must not be used
> for pointer arithmetic.

Thanks for the explanations.

I still don't know whether it's OK to have pointers to arrays with
0 elements (which are not "array objects", since "objects" are non-
empty (ยง 6.2.6.1.(2))). And if so, whether adding 0 to such a pointer
would be valid. For the moment, it's not relevant, fortunately.

> [1] https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3096.pdf

Thanks for this new URL as well. I missed it.

Bruno