ansigpt: c89 implementation of microgpt
8 points by y0b1byte
8 points by y0b1byte
Is there an argument for c89 over c99?
Particularly, not having the explicit sized types hurts.
Sadly, it's probably more portable being C89 than C99. A lot of C compilers out there haven't been updated. Microsoft, notoriously, didn't support C99 for years. Also, looking over the code, there isn't much there that C99 would help with. It's mostly floating point math, not integer math.
Microsoft hasn’t supported it for years but it does now, and the basic things that C99 introduced were supported anyway (and things that were not are controversial, like VLAs). Moreover in this specific case I don’t see any use of a GPT implementation on an architecture so small and weird to not have a C99 compiler (99% of embedded architectures have a GNU toolchain which supports everything well).
I am thinking of writing a C89 compiler one day. I am pretty sure, making a C99 compiler will be much harder. For me personally it's the extension of this: https://lobste.rs/s/lin8d0/self_reliant_programmer_manifesto/