2 ms·
You don't control the stack directly, and can't implement custom unwinding (you can piggyback on C++ exceptions). You don't control aliasing info beyond C's mi
by pornel 3y ago
You don't control the stack directly, and can't implement custom unwinding (you can piggyback on C++ exceptions).
You don't control aliasing info beyond C's minimum. You don't get true immutability, since C's const allows its target to be mutated from elsewhere.
You don't control what happens before main(). You don't get static constructors, unless you use C++.
You have almost no control over debug information.
You have very little control over inlining.
You don't control calling conventions. You can't control alignment.
There's a bit more you can do if you use non-standard C extensions, but generally you'll always be an abstraction layer away from the code you want to generate, and have your language's semantics tainted by C's semantics.
- LegionMammal978 3y ago> You don't get true immutability, since C's const allows its target to be mutated from elsewhere. FWIW, const restrict pointers in C do enforce true immutability: if an object is ever read from such a pointer (or another pointer based on it), then nothing can have modified that object since the pointer's corresponding block began, and nothing can later modify that object until the pointer's block ends. Otherwise, UB occurs.