> So, in short, if your question was really only the subject: tcc aims to a large subset of ISO/IEC 9899:1999, hosted implementation, minus _Complex and minus IEC 559. Modulo bugs, and modulo missing features I forgot :), if you have any specific in mind, tell us.
Yes, and you replied to my question perfectly. This is a guidance on how tcc should evolve (toward better, possibly full, ISO/IEC 9899:1999 (E) support). Having ported some of my projects on more than 100 different systems, I rely on what C macros tells me to try to have a "portable" source code. POSIX macros also give me hints of what I can use. autoconf + ./configure is one help but, unfortunately, it does on run on all possible system. I member the nightmare to port on Vax VMS, IBM OS390 not counting exotic systems like BeOS, SkyOS, QNX ... Christian -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Michael Matz Sent: samedi 16 février 2013 21:18 To: [email protected] Subject: Re: [Tinycc-devel] What C version tcc is supposed to implement? Am 16.02.2013 20:16, schrieb Christian Jullien: > Thank you Michael, > > I'm really sorry, my intention was not that someone tried to debug > this silly program. > The purpose of this small program was to illustrate that I don't know > what C version tcc is supposed to implement, with which feature. > I admit that this quick and dirty program is odd. > > If __STDC_VERSION__ is set to 199901L we can assume that other > features of ISO/IEC 9899:1999 (E) are present which it not true. Then you have to be a bit more specific about which features you're missing, as wchar_t's aren't. There are of course some, but usually arcane ones that even GCC doesn't implement (e.g. strict adherence to the floating point environment model, and the associated pragmas). I can tell you that tcc aims to implement c99 (when reasonably possible), so setting __STDC_VERSION__ to the value it has right now is sensible. Not necessarily all optional features of it (e.g. _Complex support is missing right now, but that's mentioned in the TODO). You cited some macros that are supposed to be set, and the state of them is: __STDC__ : set correctly __STDC_VERSION__ : set correctly __STDC_HOSTED__ : not set (incorrectly, it should probably be set to 1 given that tcc assumes a normal main() and that the rest of the provided facilities is provided by the C library not under tcc control) __STDC_IEC_559__ : Optional, correctly not set __STDC_IEC_559_COMPLEX__ : Optional, correctly not set __STDC_ISO_10646 : Optional, setting it would require quite some testing because it would have to be matched against a certain version of the 10646 standard. Not much value in doing that. So, in short, if your question was really only the subject: tcc aims to a large subset of ISO/IEC 9899:1999, hosted implementation, minus _Complex and minus IEC 559. Modulo bugs, and modulo missing features I forgot :), if you have any specific in mind, tell us. Ciao, Michael. _______________________________________________ Tinycc-devel mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/tinycc-devel _______________________________________________ Tinycc-devel mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/tinycc-devel
