@Listens to Baroque while coding murder.exe :newt: @Dire Sock :verified: @pistolero My train of thought got derailed in the process and I haven't finished stating my though :marseynosleep: > if that resulting C code is guaranteed free from UB Exactly! I think that this is the best approach to eliminate undefined behaviour: just wrap the cases that the standard, ehm… defines as undefined behaviour around with some boilerplate to make it consistent — et voila!
@m0xEE @Dire Sock :verified: @pistolero no, the best way would be to nuke C as it is now. Look, the C standard is written probably even more vaguely than the Bible. It's inconsistent. It has terms that aren't explicitly defined or even explained with examples, but the definition of UB sometimes relies on these terms (look up "pointer provenance", for one). The very fact of existence of this mess is a testament to how much "software engineering" is an oxymoron, really. https://stereophonic.space/media/1bd93a6dbd5ddd472c6e2bd4413ae1b39a0d40035d8cda9b44bb86b11b522535.mp4
@m0xEE @Dire Sock :verified: @pistolero on a related note, pointer provenance seems to finally become described in the upcoming C23 standard. Maybe. I hope. https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2263.htm