3 ms·
Obviously, you cannot write portable system code. You can do conditional compilation to target multiple platforms though. And when you do that you realize two t
by pandaman 13y ago
Obviously, you cannot write portable system code. You can do conditional compilation to target multiple platforms though. And when you do that you realize two things:
1. No compiler is fully compliant with any standard.
2. Every compiler has bugs so even the compliant parts can be unusable.
And then you realize it's not a big deal. Changes between platforms are greater than changes between compilers. When your targets have different endianness or, even better, mixed endianness between different PUs - the standard compliance of your code is the least of your worries.
>It works if you only care about one specific compiler.
Also works if you care about a finite number of specific compilers and architectures.
>On those days the standard was the AT&T UNIX compiler.
There were, probably, hundreds of compilers and C flavors even before the ANSI C. What one thought was "the standard" was very subjective.
- pjmlp 13y ago> Obviously, you cannot write portable system code.. Sure, but the goal is to minimize system dependencies as much as possible. Relying on language extensions works against it. > There were, probably, hundreds of compilers and C flavors even before the ANSI C. What one thought was "the standard" was very subjective. Yes, I do remember variants like Small C.