3 ms·
Compiler dev here : "and compilers see it as license to do whatever they please", isn't that the definition of undefined behavior?
by soulbadguy 10y ago
Compiler dev here :
"and compilers see it as license to do whatever they please", isn't that the definition of undefined behavior?
- qwertyuiop924 10y agoWell, yes. That's why compilers can comply to the spec and do that. But nobody EVER writes any C with no UB, so there are no guarantees about how the compiler will compile it. Most C programmers, I would guess, do not know the entire list of UB. The end result is that you can write code that looks completely safe to most, but compiles without any checks.
- deleted 10y ago[deleted]