[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: undefined-behavior obstack.c:139
From: |
Bruno Haible |
Subject: |
Re: undefined-behavior obstack.c:139 |
Date: |
Sat, 02 Dec 2023 09:50:33 +0100 |
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
- Re: undefined-behavior obstack.c:139, Bruno Haible, 2023/12/01
- Re: undefined-behavior obstack.c:139, Jeffrey Walton, 2023/12/01
- Re: undefined-behavior obstack.c:139, Marc Nieper-Wißkirchen, 2023/12/01
- Re: undefined-behavior obstack.c:139, Bruno Haible, 2023/12/01
- Re: undefined-behavior obstack.c:139, Paul Eggert, 2023/12/01
- Re: undefined-behavior obstack.c:139, Marc Nieper-Wißkirchen, 2023/12/01
- Re: undefined-behavior obstack.c:139, Paul Eggert, 2023/12/01
- Re: undefined-behavior obstack.c:139, Bruno Haible, 2023/12/02
- Re: undefined-behavior obstack.c:139, Paul Eggert, 2023/12/03
- Re: undefined-behavior obstack.c:139, Marc Nieper-Wißkirchen, 2023/12/03
- Re: undefined-behavior obstack.c:139, Marc Nieper-Wißkirchen, 2023/12/01