Re:Arena Allocator Tips and Tricks
by matheusmoreira on Wednesday September 27, 2023 @06:29AM
(#37672731)
The compiler knows the size of statically allocated buffers and can be told about alignments with:
Is this information sufficient for correct code generation?
[ Parent
| on HN ]
Re:Arena Allocator Tips and Tricks
by LoganDark on Wednesday September 27, 2023 @09:24AM
(#37674321)
No, because strict aliasing doesn't allow the compiler to magically decide that someplace you are writing happens to be in a statically allocated buffer. Strict aliasing says you have a pointer of some type and what you do with it has to agree with the type of that pointer. That's the "strict" in it.