Hacker News new | ask | show | jobs
by epcoa 597 days ago
Fair enough (though a Unisys 2200 might be a stronger example, people still use them, but neither support C99 AFAIK). But by “break” here, it's only fair to point out, if such a compiler even existed, it would have the property of definitely failing with an error at compile time for uint32_t not existing, it’s not going to compile and overflow at runtime. (And yes you will practically get a warning with the pasted code, and shame on anyone for not using -Werror, but pedantically this isn't even guaranteed sadly enough). They are completely different classes of portability defects and only one is a correctness issue.

Setting aside whether there is even a C99 compiler for anything Symbolics, or anything where uint32_t doesn’t exist (already assuming C99 or above here). Is there? Meanwhile there are a few existing supported gcc architectures where sizeof int == 2.

Pick what level of pragmatism you prefer I guess. I prefer avoiding the standard integer types unless I can comfortably fit in their guaranteed sizes. I don’t really care about obsolete machines that will never have a C99 compiler outside a novelty.

1 comments

> I don’t really care about obsolete machines that will never have a C99 compiler outside a novelty.

And you know what? I don't care about people who use C on 16-bit computers, unless I'm being paid to.

I've written plenty of assembly they can consume, like https://justine.lol/sectorlisp2/

Not sure why you're so triggered. I didn't even say you were wrong or anything. I originally thought the more pressing issue is filling half a table up with 0s. It's some idle commentary on a piece of code in a comment, relax?