drh / lcc

The lcc retargetable ANSI C compiler
https://drh.github.io/lcc/
2.02k stars 440 forks source link

Have a version of LCC retargetable to C99 #47

Open amyipdev opened 3 years ago

amyipdev commented 3 years ago

Other compilers allow for switching between C89 and C99 - for example, GCC. To maintain compilation compatibility with other programs, LCC should have a C99 mode as well.

lassehp commented 2 years ago

At this point, with the most recent standard being C18 as defined in ISO 9899:2018 and C23 ISO 9899:2023 being very close, it would be nice if the documentation noted somewhere more prominently what exactly is meant by "ANSI C". Is it C89, C99, C11, C18? On closer inspection I suspect it is C89, and while that can still be useful, it is quite antique.

amyipdev commented 2 years ago

@lassehp it's already been defined somewhere (I don't know where) that it is C89. A lot of projects, such as the movfuscator, depend on this. In fact, I opened this issue because of movfuscator. Based on the publication date of the book, this should be obvious, although I think it could definitely be clarified more. I'm gonna make a quick PR adding that to the README and hope devs approve.