News for hackers. Stuff that matters.
Re:Zig: a system language which prioritizes optimality, safe... by qwertyuiop924 on Sunday August 28, 2016 @10:18PM (#12379580)
It's lowlevel, that's why there's so much spec. And much of it is just defining that behaviour is implementation defined.

And as I said, it's as lowlevel as an HLL can be.

I wish we could check the carry flag. You could totally write a C library for that, I bet, by mixing in some asm, and using conditional compilation. Language extension!

Re:Zig: a system language which prioritizes optimality, safe... by versteegen on Monday August 29, 2016 @04:35AM (#12380739)
GCC since 5.0 and Clang since longer ago than that support (the same) set of builtin functions to check carry and overflow bits:

https://gcc.gnu.org/onlinedocs/gcc/Integer-Overflow-Builtins...

http://clang.llvm.org/docs/LanguageExtensions.html#checked-a...