Paul Eggert wrote:
> Does the unaligned read trick work even with CheriBSD's memory-safe 
> model? That is an edge case that might need an ifdef or something.

Good question...

> The aligned read trick reminds me a bit of the "adding 0 to a null 
> pointer gives you a null pointer" trick. That also is a violation of ISO 
> C but it works everywhere (even on CheriBSD) and Gnulib assumes it in 
> places.
> 
> I hope the null pointer trick will be blessed in a future standard. 

It already has been blessed by ISO C:
According to [1][2], N3322 [3] has been accepted for inclusion in ISO C.

Bruno

[1] https://sourceware.org/pipermail/libc-alpha/2024-October/160375.html
[2] https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3372.pdf
[3] https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3322.pdf




Reply via email to