2 ms·
Yea, postgres certainly assumes a lot more than the standard guarantees. Besides the above, if you look at it formally, it's pretty much impossible to have a mu
by anarazel 10y ago
Yea, postgres certainly assumes a lot more than the standard guarantees. Besides the above, if you look at it formally, it's pretty much impossible to have a multi-process program, connected over shared memory, that's actually fully standard compliant. Especially not when using a pre C11 environment (postgres requires C89).
I think we really should have "official" variants of C that are a bit more predictable. But I guess that's not happening.
- anarazel 10y agoOh, and whoever designed the strict aliasing specs: To me they seem widely impractical. The fact that there's essentially no way to explicitly alias, without memcpy'ing, is just absurd. The standard's language is also so cryptic, that well versed people (like Regehr you linked to) can't agree with each other what the exact requirements are. The union aliasing trick isn't, to my knowledge, actually precisely standards conforming.