DeVault: Announcing the Hare programming language
DeVault: Announcing the Hare programming language
Posted May 5, 2022 14:08 UTC (Thu) by khim (subscriber, #9252)In reply to: DeVault: Announcing the Hare programming language by wtarreau
Parent article: DeVault: Announcing the Hare programming language
> I have to use asm statements to prevent the compiler from being smart!
That's wrong way of doing things and you know that. Code outside of asm block have to follow the rules.
> But at least it doesn't know my pointer's value and doesn't play games in my back with it.GCC doesn't know anything. It just emits asm blocks blindly. Clang certainly does know what happens in your asm block, it has a built-in assembler specifically for such cases.
I think what you actually want is std::launder (in C you can just call __builtin_launder directly).
