Comment by CodeArtisan
10 hours ago
>That's why array indexing is signed in C
C23 updated the definition of the [] operator to disallow negative subscripts with array type. I think you have to explicitly convert the array to a pointer type now.
int a[2];
a[-1]; // not ok
(&a[0])[-1] // ok
No comments yet
Contribute on Hacker News ↗