I was thinking about this yesterday, but the hard question is what should out of bounds writes be specified to do? What about UAF? I don't see how to specify this without ruling out genuine optimizations (which is not to say that many of the dumb UB shouldn't be eliminated).
It's not. It's defined formally as part of the language. Typical C implementations would not be permissible under your proposal.
-
-
Typical C implementations implement malloc in C.
-
malloc cannot be implemented in C. It can at best be implemented in a mix of C and special constructs or rule-exceptions outside the C language.
-
I assure you that I've implemented malloc in C. It was in a .c file and it compiled with a C compiler. Separately, I don't care if the spec in its current form recognizes my malloc as being written in C. That's not relevant to whether or not it's written in C.
End of conversation
New conversation -
-
-
If you want to throw that formality out and treat all the standard interfaces as implemented in C without constraints that they honor your restrictions on UB, then your restrictions really do nothing.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.