tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] What C version tcc is supposed to implement?


From: Michael Matz
Subject: Re: [Tinycc-devel] What C version tcc is supposed to implement?
Date: Sat, 16 Feb 2013 21:17:32 +0100
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Thunderbird/17.0

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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]