Periodic reminder: Don’t compile to C.
If you generate C you can ensure it doesn't have any UB (assuming no interfacing with unsafe arbitrary C code), & can even do GC if you want (but GC is uhg).
-
-
It’s a big pain, though. Signed integer overflow, float<->int casting UB, etc. are all things people often don’t want in their language and makes the generated C really ugly. And you can’t do *good* GC. :) You need stack and register maps, which are impossible in C.
-
If your HL lang wants trap on overflow you need to generate the cobditionals & then the UB in C never happens. If it wants wrap, model your signed types as C unsigneds.
-
I’m not saying it can’t be done, it’s just that it’s really ugly :)
End of conversation
New conversation -
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.