2 ms·
But because the behaviour is undefined, it doesn't matter how the computer would handle it, because the compiler is free to rework it into any arbitrary sequenc
by shakna 6y ago
But because the behaviour is undefined, it doesn't matter how the computer would handle it, because the compiler is free to rework it into any arbitrary sequence of instructions, including removing it altogether.
- ncmncm 6y agoThere are exactly zero undefined behaviors around operations on unsigned integer types in C or in C++. To get meaningful results may require some care, but the languages provide everything needed to exercise such care.
- shakna 6y agoPerhaps you missed my earlier comment. > Except signed overflow invoking Undefined Behaviour in any C compiler, whereas unsigned overflow does not. We aren't talking about unsigned integer types. We're talking about the behaviour of signed integer types.