3 ms·
I have almost no idea about C compilation but would it be possible with macros or somehow redefining int?
by yladiz 4y ago
I have almost no idea about C compilation but would it be possible with macros or somehow redefining int?
- mnw21cam 4y agoI don't think it'd be possible to get the compiler to treat unsigned integer overflow as defined using macros. But I'm not a subject matter expert.
- variadix 4y agoNot cleanly, but if you assume 2s complement and wrap all signed addition in a macro function you could cast to unsigned before the add and cast the result back to signed.