News for hackers. Stuff that matters.
Re:C Portability Lessons from Weird Machines by int_19h on Friday November 16, 2018 @08:33AM (#18468586)
ISO C does not guarantee that int32_t etc are present. It says that they must be present if the platform can offer them, but if you rely on them being present, your code is no longer portable from a standard C perspective. If you want to be strictly portable, you need to use int32_least_t, int32_fast_t etc.

And yes, you can do that. The question is, why have all this complexity when in practice int32_t is there pretty much all the time - as you've said yourself - and when lots of existing code relies on it?

Same thing on other counts. Yes, you can work without all these assumptions. But why waste time on making the effort, when it simply doesn't matter?

There are no comments on this comment yet.