Andreas F. Borchert wrote:
> > 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))).
>
> From § 6.7.6.2 about array declarators:
>
>If the expression is a constant expression, it s
On Sat, Dec 02, 2023 at 09:50:33AM +0100, Bruno Haible wrote:
> 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))).
From § 6.7.6.2 about array declarators:
If the expression is a cons
Paul Eggert wrote:
> > Which integer types on CHERI have "holes"?
>
> intptr_t and uintptr_t, since they consume 128 bits of storage but have
> only 64 bits of integer value payload.
Oh, indeed. I had through that intptr_t and uintptr_t support normal 128-bit
integer arithmetic, but this is not
Paul Eggert wrote:
> > Indeed, this sentence appears to forbid ((char *) NULL) + something.
>
> Yes. However, Gnulib code can still use ((char *) NULL) + something)
> because the Gnulib portability guidelines allow it.
>
> The issue with clang false positives is covered here:
>
> https://www.gn
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