3 ms·
Writing C in the blind for a quiz and deploying tested C to known platforms are two entirely different things.
by akira2501 3y ago
Writing C in the blind for a quiz and deploying tested C to known platforms are two entirely different things.
- dwattttt 3y agoNot as different as we'd like; "we deployed our C to the platforms we need" works until the minute you change compiler/version/flags, and find out you were relying on something not guaranteed at all. My personal gotcha was finding out I was relying on shifting an unsigned integer by the bit size of the integer to be 0, as if "you shifted every bit out of the integer, leaving 0". Shift any size under the integer's size in bits? Yep, those bits were shifted out leaving 0. Shift that last bit? Nope, that's Undefined Behaviour, and suddenly it's not 0 just because you changed a flag.