Dave Vandervies wrote:
> In article <>,
> CBFalconer <> wrote:
>
>>Chris Croughton wrote:
>>
>>><> wrote:
>>>
>>>>If you use -std=c99 -pedantic, it should do so. However, the C99
>>>>status page (gcc.gnu.org/c99status.html) admits that this is still
>>>>not guaranteed. OTOH, even -ansi -pedantic does not grant that gcc
>>>>will do the right thing for standard conforming C89 programs.
>>>
>>>Does any compiler "do the right thing" with either of the standards?
I do not know that.
>>>If so, which (preferably a free one which runs on any platform)?
>>>All the compilers I've ever used either don't reach the standard or
>>>they have nonstandard extensions (in particular, I've never seen a
>>>library which supports all of the C99 functions correctly).
If I knew one, I would gladly advertise it

The Dinkumware library claims C99 compliance.
>>While I am sure that faults can be found with "gcc -ansi -pedantic"
>>operation, I have yet to run into them. AFAICT it suppresses all
>>the gnu extensions. Libraries are a separate matter, and you
>>should probably report any library failings. The only C99 library
>>known to me is from Gimpel.
Well, the things I ran into are mainly related to the problem that
typecasting to a certain floating point type does not work on x86
architectures because the gcc people rather accept excess precision
plus fast execution than the right precision plus slow execution...
There are some algorithms which do not work as expected when
you have excess precision for some expressions but not for others.
The thing I am unhappy about is that they do not document this
where everyone finds it. A mention along with the -std=... option
would suffice.
> Dinkumware also has one, don't they?
Yep.
> Most compilers will do C90, modulo bugs, if you can figure out how to
> ask them to. A lot are making serious efforts at C99, but I don't have
> up-to-date knowledge on which ones are how close. Comeau was, I believe,
> the first to advertise complete compliance (on the language side only,
> but it plays nicely with the Dinkumware library to get a complete
> implementation); I'm not sure if it's been joined by others yet.
AFAIK, Comeau plus Dinkumware libraries is still the only compliant
combination.
--
E-Mail: Mine is an /at/ gmx /dot/ de address.