Hello!
What is a good compiler to use? (for MS Windows, for Linux)
Any recommendations??
What's the point of having a C99 standard, if different compilers
still produce differing results?
The main reason for a standard, is (in my opinion) portabilty and
conformance.
/************** C99 Resources ***************/
C99 Standard(Committee Draft 2005 - ISO/IEC 9899:TC2) http://www.open-std.org/jtc1/sc22/wg...docs/n1124.pdf
"The New C Standard: A Cultural and Economic Commentary" by Derek M.
Jones http://www.coding-guidelines.com/cbook/cbook1_0b.pdf
( http://www.knosof.co.uk/cbook/cbook.html)
This is the ultimate C99 reference bible, since it discusses every
sentance of the C99 standard. Wow!
But no one seems to care:
I recently tried a bunch of *free* compilers...
MinGW GCC (no C99 support e.g. printf("%I64d",99999999LL)),
Lcc-Win32,
Pelles C,
Cygwin GCC
and got different results for the same code snippet
/***********************/
#include <stdio.h>
#include <math.h>
int main(void)
{
printf("%f\n", sqrt(4.0L));
printf("%lf\n", sqrt(4.0L));
printf("%Lf\n", sqrt(4.0L)); // printf("%Lf\n", (long
double)sqrt(4.0L));
return 0;
}
/***********************/
(There are probably much better examples, to show how compilers
differ!
I'm (currently) no expert in C, and certainly not on the C99 standard.
(I wonder if the C99 standard specifies, what the ouput of the 3rd
printf should be...)
I get really frustrated when even printf (yes, that "Hello World"
function) differs from implementation to implementation.
printf("%hhd %hd %d %lld", a, b, c, d); // I wonder how many compilers
support this (C99) correctly... try MinGW :)
But if I use a compiler, I expect it to work! and to have predicatable
behaviour! and to implement the C99 standard!
I think C99 has failed, if only a few compilers support it.
(Perennial http://www.peren.com/ conducts conformance tests and only a
handful of compilers are validated as C99-compliant: http://www.peren.com/pages/cvsa_isocvpl.htm)
Sun Studio 9 seems to be the only free compiler out there, that fully
supports C99. (Wow, maby I should learn and use Solaris)
For the rest... everyone else seems to be doing their own thing:
Microsoft Visual C++ are doing theirs... GCC is doing theirs... and so
on
No one seems to be really interested in following the C99 standard.
Instead everyone is happy to have a compiler that can simply produce
code (C99 is probably an ugly cryptic read anyway) and the game seems
to be played as follows:
"Forget portability! and code for the moment! Adapt your code, till it
works, with the compiler you're using.
If it needs to be ported, do it when it's necessary. Hell, the
compilers will have changed anyway!!"
???
Maby I should follow suit: Code and test it with your compiler, (be
puzzled for a moment), debug and done!
************************>>>
By the way: who is involved in the C99 standard?
Why didn't they invite C compiler writers (Visual C, GCC, Watcom) to
take part??? Is C99 really that hard to implement?
Ok, what about commercial products for C99?
***
Ah, there's Dinkumware ( http://www.dinkumware.com/)
They have a library "Dinkum Compleat" that can be bought for either MS
Windows Visual C++ ($200) or Linux GCC ($200) and allows C99 in
addition to many other things (you cannot get the C99 part
seperately). That library can be bought in binary ($200 "Dinkum
Compleat Libraries Binary" for Visual C++ xor Linux GCC, or $400 for
both) or source form ($2300) and is Perennial C99 compliant (see http://www.peren.com).
***
Ah, there's Comeau C/C++. http://www.comeaucomputing.com/
What an ugly web-page! Ugly use of font, and waving a blinking $50 at
me!
It seems as though Dinkumware libraries are included... oops no
(fooled me)... they are only available... from Dinkumware... for $200
So it seems I need to spend $ (50+200) for Comeau C/C++ with
Dinkumware for C99 compliance.
(Libcomo seems to be Comeau's own C library, but I could not find a
price - and it probably doesn't support C99.)
Ah but wait, in order to use Comeau, I need another compiler... What
is this beast!????
For MS windows: e.g. "Comeau C/C++" & "Visual C++" & "Dinkumware
Libraries" for C99
For Linux: e.g. "Comeau C/C++" & "GCC" & "Dinkumware Libraries" for
C99
OK, so "Comeau C/C++" works like this:
It is a front end that takes your C-code (C1) and generates an
"Intermediate Form" and from that another C code (C2).
Then you use another compiler (Visual C++, or GCC) to compile C2 to
"machine code".
"Comeau C/C++" don't even have their own machine code generator.
I don't see why anyone would use Comeau...
***
Ah, Edison Design Group: http://www.edg.com/ http://www.edg.com/index.php?location=c_frontend
These 4 guys have a front-end that supports C99 (see also http://www.peren.com/pages/cvsa_isocvpl.htm)
Intel's C++ compiler's front end is based on EDG, as is Comeau's
( http://www.edg.com/index.php?location=faq_q3_who)
Does this mean that Comeau is C99 compliant? (Who knows?: http://www.thescripts.com/forum/thre...9651-1-10.html)
SUIF and Zephyr also use EDG http://www.edg.com/index.php?location=faq_q4_other
Does anyone know if SUIF (with matching EDG front-end http://suif.stanford.edu/~livshits/c.../clickthru.cgi) is good? http://www-suif.stanford.edu/suif/suif2/
Are there any compiler recommendations...
Right now I'm unwilling to use commercial tools.
I think I'll just stick with GCC (in its various forms: Linux, Cygwin,
MinGW) and play the game, accepting that things just aren't perfect.
Any comments or recommendations, tips etc. will be appreciated
Kind regards,
Albert 30 2982 al********@gmail.com writes:
[big rant]
I recently tried a bunch of *free* compilers...
[...]
and got different results for the same code snippet
/***********************/
#include <stdio.h>
#include <math.h>
int main(void)
{
printf("%f\n", sqrt(4.0L));
OK. sqrt returns a double, %f takes a double.
printf("%lf\n", sqrt(4.0L));
This is also OK: the 'l' modifier has no effect on %f.
printf("%Lf\n", sqrt(4.0L)); // printf("%Lf\n", (long
double)sqrt(4.0L));
This invokes undefined behavior, because it supplies a double
argument to printf, whereas %Lf requires a long double argument.
return 0;
}
/***********************/
It should not come as a big surprise that undefined behavior
behaves differently on different C implementations.
--
Ben Pfaff http://benpfaff.org
In article <11**********************@y80g2000hsf.googlegroups .com>,
<al********@gmail.comwrote:
>What's the point of having a C99 standard, if different compilers still produce differing results?
Not sure what you mean, unless you mean different compilers
claiming to support C99 are producing differering results
for something that is not undefined et al behavior.
--
Greg Comeau / 20 years of Comeauity! Intel Mac Port now in beta!
Comeau C/C++ ONLINE == http://www.comeaucomputing.com/tryitout
World Class Compilers: Breathtaking C++, Amazing C99, Fabulous C90.
Comeau C/C++ with Dinkumware's Libraries... Have you tried it?
In article <11**********************@y80g2000hsf.googlegroups .com>,
<al********@gmail.comwrote:
>But no one seems to care: I recently tried a bunch of *free* compilers...
MinGW GCC (no C99 support e.g. printf("%I64d",99999999LL)), Lcc-Win32, Pelles C, Cygwin GCC
and got different results for the same code snippet
But none of them claim conformance to C99, only partial
features, which they list explicitly.
--
Greg Comeau / 20 years of Comeauity! Intel Mac Port now in beta!
Comeau C/C++ ONLINE == http://www.comeaucomputing.com/tryitout
World Class Compilers: Breathtaking C++, Amazing C99, Fabulous C90.
Comeau C/C++ with Dinkumware's Libraries... Have you tried it?
In article <11**********************@y80g2000hsf.googlegroups .com>,
<al********@gmail.comwrote:
>#include <math.h>
int main(void) {
printf("%f\n", sqrt(4.0L));
printf("%lf\n", sqrt(4.0L));
printf("%Lf\n", sqrt(4.0L)); // printf("%Lf\n", (long double)sqrt(4.0L));
return 0; } /***********************/ (There are probably much better examples, to show how compilers differ!
I'm (currently) no expert in C, and certainly not on the C99 standard. (I wonder if the C99 standard specifies, what the ouput of the 3rd printf should be...) I get really frustrated when even printf (yes, that "Hello World" function) differs from implementation to implementation.
So, this is not a C99 problem at all, but one that exists in
non-C99 compilers, as you've just shown.
--
Greg Comeau / 20 years of Comeauity! Intel Mac Port now in beta!
Comeau C/C++ ONLINE == http://www.comeaucomputing.com/tryitout
World Class Compilers: Breathtaking C++, Amazing C99, Fabulous C90.
Comeau C/C++ with Dinkumware's Libraries... Have you tried it?
In article <11**********************@y80g2000hsf.googlegroups .com>,
<al********@gmail.comwrote:
>I think C99 has failed, if only a few compilers support it. (Perennial http://www.peren.com/ conducts conformance tests and only a handful of compilers are validated as C99-compliant: http://www.peren.com/pages/cvsa_isocvpl.htm) Sun Studio 9 seems to be the only free compiler out there, that fully supports C99. (Wow, maby I should learn and use Solaris) For the rest... everyone else seems to be doing their own thing: Microsoft Visual C++ are doing theirs... GCC is doing theirs... and so on
That's always been the case if you look at the history of C.
Anyway, C99 has problems being adopted, for sure, but there are
a bunch of compilers supporting it, as discussed in this NG
from time to time (google for it, IBM, Comeau, Dinkumware, etc).
>No one seems to be really interested in following the C99 standard.
That's probably true, but a different issue. But, it probably
presents a circularity.
>Instead everyone is happy to have a compiler that can simply produce code (C99 is probably an ugly cryptic read anyway) and the game seems to be played as follows: "Forget portability! and code for the moment! Adapt your code, till it works, with the compiler you're using. If it needs to be ported, do it when it's necessary. Hell, the compilers will have changed anyway!!" ??? Maby I should follow suit: Code and test it with your compiler, (be puzzled for a moment), debug and done!
Well, it could be argued that C99 itself is what broke porability,
but I'll leave that for others to argue :)
--
Greg Comeau / 20 years of Comeauity! Intel Mac Port now in beta!
Comeau C/C++ ONLINE == http://www.comeaucomputing.com/tryitout
World Class Compilers: Breathtaking C++, Amazing C99, Fabulous C90.
Comeau C/C++ with Dinkumware's Libraries... Have you tried it?
In article <11**********************@y80g2000hsf.googlegroups .com>,
<al********@gmail.comwrote:
>By the way: who is involved in the C99 standard? Why didn't they invite C compiler writers (Visual C, GCC, Watcom) to take part???
Participants are volunteers, and incur their own costs, etc. However,
said folks were part of it. There is ANSI, the US committe and
ISO, the international org, both bodies have able minded persons
of the committees, inclouding many/most compiler vendors. It did
not happen in a vaccum.
>Is C99 really that hard to implement?
It has its sticking points, but compared to other things
it is generally very doable. So the reason it is not as
popular has to do with other things.
--
Greg Comeau / 20 years of Comeauity! Intel Mac Port now in beta!
Comeau C/C++ ONLINE == http://www.comeaucomputing.com/tryitout
World Class Compilers: Breathtaking C++, Amazing C99, Fabulous C90.
Comeau C/C++ with Dinkumware's Libraries... Have you tried it?
In article <11**********************@y80g2000hsf.googlegroups .com>,
<al********@gmail.comwrote:
>Ok, what about commercial products for C99? *** Ah, there's Dinkumware (http://www.dinkumware.com/) They have a library "Dinkum Compleat" that can be bought for either MS Windows Visual C++ ($200) or Linux GCC ($200) and allows C99 in addition to many other things (you cannot get the C99 part seperately). That library can be bought in binary ($200 "Dinkum Compleat Libraries Binary" for Visual C++ xor Linux GCC, or $400 for both) or source form ($2300) and is Perennial C99 compliant (see http://www.peren.com).
Yes, and it's tops.
>*** Ah, there's Comeau C/C++. http://www.comeaucomputing.com/ What an ugly web-page! Ugly use of font, and waving a blinking $50 at me!
That was put there because we literally got thousands of queries
about the price, despite it bring right on the page multiple times
(at least at the time it was), anyway, this is a not a C99 point so...
>It seems as though Dinkumware libraries are included... oops no (fooled me)... they are only available... from Dinkumware... for $200
Nope, nobody fooled you. We sell core language only.
>So it seems I need to spend $ (50+200) for Comeau C/C++ with Dinkumware for C99 compliance.
That sounds correct.
>(Libcomo seems to be Comeau's own C library, but I could not find a price - and it probably doesn't support C99.)
libcomo is C++ only, and actually, it's 100% free.
>Ah but wait, in order to use Comeau, I need another compiler... What is this beast!????
Heh.
>For MS windows: e.g. "Comeau C/C++" & "Visual C++" & "Dinkumware Libraries" for C99 For Linux: e.g. "Comeau C/C++" & "GCC" & "Dinkumware Libraries" for C99
OK, so "Comeau C/C++" works like this: It is a front end that takes your C-code (C1)
Yes.
>and generates an "Intermediate Form"
Yes.
>and from that another C code (C2).
Yes.
>Then you use another compiler (Visual C++, or GCC) to compile C2 to "machine code".
Yes.
>"Comeau C/C++" don't even have their own machine code generator.
It's a complete code generator, just that in this case the machine is C.
This is indeed a different perspective, but it works, and works well.
This way we can be faster to market, focus better on the front end,
and then leverage off the back end, which the customer already invested
in, and which the C compiler vendor already tailored to the platform
at hand, including optimizations, etc.
>I don't see why anyone would use Comeau...
Why not? You're complaining about no C99 capability, and then you
find one source, and then complain again. Indeed, it needs to be
piecemealed, but in the end it's no functionally different than
products from a single source.
Feel free to email us, since parts of the conversation would be off-topic.
>*** Ah, Edison Design Group: http://www.edg.com/ http://www.edg.com/index.php?location=c_frontend These 4 guys have a front-end that supports C99 (see also http://www.peren.com/pages/cvsa_isocvpl.htm) Intel's C++ compiler's front end is based on EDG, as is Comeau's (http://www.edg.com/index.php?location=faq_q3_who)
Correct.
>Does this mean that Comeau is C99 compliant? (Who knows?: http://www.thescripts.com/forum/thre...9651-1-10.html)
Yes.
>SUIF and Zephyr also use EDG http://www.edg.com/index.php?location=faq_q4_other
Does anyone know if SUIF (with matching EDG front-end http://suif.stanford.edu/~livshits/c.../clickthru.cgi) is good? http://www-suif.stanford.edu/suif/suif2/
We looked at it a few years back and it was very interesting
but we still going to require lots of work, it wasn't just somthing
you could plug in and just go. It can also only really be
done by folks like us, since end users don't have access to
the internal form being used.
>Are there any compiler recommendations... Right now I'm unwilling to use commercial tools.
Then it sounds like you're stuck in catch-22 C99-wise.
--
Greg Comeau / 20 years of Comeauity! Intel Mac Port now in beta!
Comeau C/C++ ONLINE == http://www.comeaucomputing.com/tryitout
World Class Compilers: Breathtaking C++, Amazing C99, Fabulous C90.
Comeau C/C++ with Dinkumware's Libraries... Have you tried it?
Greg Comeau wrote:
Yes, his is an interesting perspective. There as others too,
some of which I note in http://www.comeaucomputing.com/booklist
I wasn't best pleased by the:
alert('You must have the latest IE or Netscape to see the book blurbs on this page');
(I use Firefox and Konqueror).
--
JUC 2007, submit: http://hpl.hp.com/conferences/juc2007/submission.html
"You've spotted a flaw in my thinking, Trev" Big Al,/The Beiderbeck Connection/
Hewlett-Packard Limited Cain Road, Bracknell, registered no:
registered office: Berks RG12 1HN 690597 England
Chris Dollin said:
Greg Comeau wrote:
>Yes, his is an interesting perspective. There as others too, some of which I note in http://www.comeaucomputing.com/booklist
I wasn't best pleased by the:
alert('You must have the latest IE or Netscape to see the book
blurbs on this page');
I'm surprised by this. I wouldn't have put Greg down as the kind of
person who required people to be continually scanning the Web just in
case a new release of IE or Netscape meant they had to update their
browser so that they could read some book blurbs! Surely book blurbs
are basically text, which is trivial to encode in the kind of HTML that
even an ancient lynx can render?
(I use Firefox and Konqueror).
I use Galeon by default (because it loads quickly), switching to
something else only if Galeon can't cut it, which is rare. If I have to
switch, I tend to go for Konqueror or possibly a fairly old Netscape.
If that doesn't work, I simply find another site. Easy.
--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999 http://www.cpax.org.uk
email: rjh at the above domain, - www. al********@gmail.com wrote:
<snip>
But if I use a compiler, I expect it to work! and to have predicatable
behaviour! and to implement the C99 standard!
not many implement C99. Nearly everyone implements C89.
I think C99 has failed, if only a few compilers support it.
(Perennial http://www.peren.com/ conducts conformance tests and only a
handful of compilers are validated as C99-compliant: http://www.peren.com/pages/cvsa_isocvpl.htm)
Sun Studio 9 seems to be the only free compiler out there, that fully
supports C99. (Wow, maby I should learn and use Solaris)
For the rest... everyone else seems to be doing their own thing:
Microsoft Visual C++ are doing theirs... GCC is doing theirs... and so
on
No one seems to be really interested in following the C99 standard.
Instead everyone is happy to have a compiler that can simply produce
code (C99 is probably an ugly cryptic read anyway) and the game seems
to be played as follows:
"Forget portability! and code for the moment! Adapt your code, till it
works, with the compiler you're using.
or comply with C89
If it needs to be ported, do it when it's necessary. Hell, the
compilers will have changed anyway!!"
???
Maby I should follow suit: Code and test it with your compiler, (be
puzzled for a moment), debug and done!
you can write C89 code that is pretty damn portable.
<snip>
--
Nick Keighley
In article <eu**********@murdoch.hpl.hp.com>,
Chris Dollin <ch**********@hp.comwrote:
>Greg Comeau wrote:
>Yes, his is an interesting perspective. There as others too, some of which I note in http://www.comeaucomputing.com/booklist I wasn't best pleased by the:
alert('You must have the latest IE or Netscape to see the book blurbs on this page');
(I use Firefox and Konqueror).
If I recall the original intention, it was to get clutter out of
the list, and it was probably an experiment gone bad on my end anyway
because at least at the time the browsers were so across the board
on how to handle it. So currently you're not missing much by
not seeing the blurb.
.... back to C99...
--
Greg Comeau / 20 years of Comeauity! Intel Mac Port now in beta!
Comeau C/C++ ONLINE == http://www.comeaucomputing.com/tryitout
World Class Compilers: Breathtaking C++, Amazing C99, Fabulous C90.
Comeau C/C++ with Dinkumware's Libraries... Have you tried it?
On 28 Mar 2007 11:16:42 -0700, al********@gmail.com wrote:
>Hello!
Hello.
>By the way: who is involved in the C99 standard? Why didn't they invite C compiler writers (Visual C, GCC, Watcom) to take part??? Is C99 really that hard to implement?
OpenWatcom is an open source C compiler. Work is ongoing to make it a
C99 compliant compiler. If you'd like to help us achieve that goal,
come over to www.openwatcom.com and join in with the development
effort. I don't think we presently make any claims about being
compliant with C99.
Who is involved in the C99 standard? As I understand it, anyone can
make a submission.
Jim
On Mar 28, 11:16 am, albert....@gmail.com wrote:
>
What is a good compiler to use? (for MS Windows, for Linux)
Any recommendations??
What's the point of having a C99 standard, if different compilers
still produce differing results?
Knowing when to expext differing results.
The main reason for a standard, is (in my opinion) portabilty and
conformance.
Indeed, that's why they're useful.
>...
But if I use a compiler, I expect it to work! and to have predicatable
behaviour! and to implement the C99 standard!
Why do you expect it to implement C99? If there's little demand for
it, why should it?
I think C99 has failed, if only a few compilers support it.
As of now that's true; and it's hardly news.
No one seems to be really interested in following the C99 standard.
Instead everyone is happy to have a compiler that can simply produce
code (C99 is probably an ugly cryptic read anyway) and the game seems
to be played as follows:
"Forget portability! and code for the moment! Adapt your code, till it
works, with the compiler you're using.
If it needs to be ported, do it when it's necessary. Hell, the
compilers will have changed anyway!!"
Utter nonsense. People writing portable code stick to C90, possibly
also bravely using some of the widely implemented C99 extensions.
...
Any comments or recommendations, tips etc. will be appreciated
Stick to C90.
In article <11**********************@n59g2000hsh.googlegroups .com>, Nick
Keighley <ni******************@hotmail.comwrites
>al********@gmail.com wrote:
<snip>
>But if I use a compiler, I expect it to work! and to have predicatable behaviour! and to implement the C99 standard!
not many implement C99. Nearly everyone implements C89.
You probably mean ISO C (ISO 9899:1990) with A1 and the TC's for 1993
So most refer to it as C95 (which is when the last major TC was added).
Most compilers are actually C95+ (bits of C99)
--
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills Staffs England /\/\/\/\/
/\/\/ ch***@phaedsys.org www.phaedsys.org \/\/\
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
Chris Hills wrote:
In article <11**********************@n59g2000hsh.googlegroups .com>, Nick
Keighley <ni******************@hotmail.comwrites
al********@gmail.com wrote:
But if I use a compiler, I expect it to work! and to have predicatable
behaviour! and to implement the C99 standard!
not many implement C99. Nearly everyone implements C89.
You probably mean ISO C (ISO 9899:1990) with A1 and the TC's for 1993
So most refer to it as C95 (which is when the last major TC was added).
Most compilers are actually C95+ (bits of C99)
yes but they don't implement the *same* bits. Which effectively makes
C99
non-portable.
--
Nick Keighley
In article <11**********************@p15g2000hsd.googlegroups .com>, Nick
Keighley <ni******************@hotmail.comwrites
>Chris Hills wrote:
>In article <11**********************@n59g2000hsh.googlegroups .com>, Nick Keighley <ni******************@hotmail.comwrites
>al********@gmail.com wrote:
>But if I use a compiler, I expect it to work! and to have predicatable behaviour! and to implement the C99 standard!
not many implement C99. Nearly everyone implements C89.
You probably mean ISO C (ISO 9899:1990) with A1 and the TC's for 1993
So most refer to it as C95 (which is when the last major TC was added). Most compilers are actually C95+ (bits of C99)
yes but they don't implement the *same* bits. Which effectively makes C99 non-portable.
I agree totally.
I was querying your comment that most implement C89. You meant C90 + A1
and TC's
--
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills Staffs England /\/\/\/\/
/\/\/ ch***@phaedsys.org www.phaedsys.org \/\/\
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
Chris Hills <ch***@phaedsys.orgwrites:
In article <11**********************@p15g2000hsd.googlegroups .com>,
Nick Keighley <ni******************@hotmail.comwrites
>>Chris Hills wrote:
>>In article <11**********************@n59g2000hsh.googlegroups .com>, Nick Keighley <ni******************@hotmail.comwrites al********@gmail.com wrote:
>>But if I use a compiler, I expect it to work! and to have predicatable behaviour! and to implement the C99 standard!
not many implement C99. Nearly everyone implements C89.
You probably mean ISO C (ISO 9899:1990) with A1 and the TC's for 1993
So most refer to it as C95 (which is when the last major TC was added). Most compilers are actually C95+ (bits of C99)
yes but they don't implement the *same* bits. Which effectively makes C99 non-portable.
I agree totally.
I was querying your comment that most implement C89. You meant C90 +
A1 and TC's
C90 + A1 and TC's is C95, right?
Well, a compiler that implements C95 also implements C89 (the language
defined by the 1989 ANSI standard, which is the same language as the
one defined by the 1990 ISO standard), right?
I wonder, are there any implementations (note: this includes both the
compiler and the runtime library) that support C90 but *not* C95? For
purposes of this question, consider a compiler with different
command-line options to be the same implementation.
<OT>gcc uses "--std=iso9899:199409" to specify C95 conformance.</OT>
--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
Keith Thompson <ks***@mib.orgwrites:
I wonder, are there any implementations (note: this includes both the
compiler and the runtime library) that support C90 but *not* C95? For
purposes of this question, consider a compiler with different
command-line options to be the same implementation.
I imagine that Turbo C 3.0 does not support C95. (It was
released in 1991.)
--
Ben Pfaff http://benpfaff.org
JimS <so***@not.comwrites:
On 28 Mar 2007 11:16:42 -0700, al********@gmail.com wrote:
>>By the way: who is involved in the C99 standard? Why didn't they invite C compiler writers (Visual C, GCC, Watcom) to take part??? Is C99 really that hard to implement?
OpenWatcom is an open source C compiler. Work is ongoing to make it a
C99 compliant compiler. If you'd like to help us achieve that goal,
come over to www.openwatcom.com and join in with the development
effort. I don't think we presently make any claims about being
compliant with C99.
Who is involved in the C99 standard? As I understand it, anyone can
make a submission.
I'm not sure what you mean by a "submission". The C99 standard, as
the name implies, was completed eight years ago. There have been two
Technical Corrigenda since then, incorporated into n1124.pdf
<http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1124.pdf>. But I
don't believe there's any real work being done on a major new version
of the standard.
If you want more information about the committee, comp.std.c would be
the place to ask. New ideas are often proposed there, but there's no
offical connection between the committee and the newsgroup, and I
doubt that all the members read it.
--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
Ben Pfaff <bl*@cs.stanford.eduwrites:
Keith Thompson <ks***@mib.orgwrites:
>I wonder, are there any implementations (note: this includes both the compiler and the runtime library) that support C90 but *not* C95? For purposes of this question, consider a compiler with different command-line options to be the same implementation.
I imagine that Turbo C 3.0 does not support C95. (It was
released in 1991.)
Ok, what about compilers currently in common use?
--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
Keith Thompson wrote:
Chris Hills <ch***@phaedsys.orgwrites:
In article <11**********************@p15g2000hsd.googlegroups .com>,
Nick Keighley <ni******************@hotmail.comwrites
>Chris Hills wrote: In article <11**********************@n59g2000hsh.googlegroups .com>, Nick Keighley <ni******************@hotmail.comwrites al********@gmail.com wrote:
But if I use a compiler, I expect it to work! and to have predicatable behaviour! and to implement the C99 standard!
not many implement C99. Nearly everyone implements C89.
You probably mean ISO C (ISO 9899:1990) with A1 and the TC's for 1993
So most refer to it as C95 (which is when the last major TC was added). Most compilers are actually C95+ (bits of C99)
yes but they don't implement the *same* bits. Which effectively makes C99 non-portable.
I agree totally.
I was querying your comment that most implement C89. You meant C90 +
A1 and TC's
C90 + A1 and TC's is C95, right?
Well, a compiler that implements C95 also implements C89 (the language
defined by the 1989 ANSI standard, which is the same language as the
one defined by the 1990 ISO standard), right?
I wonder, are there any implementations (note: this includes both the
compiler and the runtime library) that support C90 but *not* C95? For
purposes of this question, consider a compiler with different
command-line options to be the same implementation.
<OT>gcc uses "--std=iso9899:199409" to specify C95 conformance.</OT>
As far as I can tell the -ansi switch for gcc is actually C95. I don't
think bare C90 is supported by gcc. Also I can't find any _commonly_
used implementation that doesn't support C95, but maybe there're
examples in the embedded or mainframe arena.
"santosh" <sa*********@gmail.comwrites:
Keith Thompson wrote:
[...]
>I wonder, are there any implementations (note: this includes both the compiler and the runtime library) that support C90 but *not* C95? For purposes of this question, consider a compiler with different command-line options to be the same implementation.
<OT>gcc uses "--std=iso9899:199409" to specify C95 conformance.</OT>
As far as I can tell the -ansi switch for gcc is actually C95. I don't
think bare C90 is supported by gcc. Also I can't find any _commonly_
used implementation that doesn't support C95, but maybe there're
examples in the embedded or mainframe arena.
With "-ansi", gcc doesn't define __STDC_VERSION__, and it doesn't
recognize digraphs, both features added in C95. With
"-std=iso9899:199409", it does.
--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
Keith Thompson said:
Ben Pfaff <bl*@cs.stanford.eduwrites:
>Keith Thompson <ks***@mib.orgwrites:
>>I wonder, are there any implementations (note: this includes both the compiler and the runtime library) that support C90 but *not* C95? For purposes of this question, consider a compiler with different command-line options to be the same implementation.
I imagine that Turbo C 3.0 does not support C95. (It was released in 1991.)
Ok, what about compilers currently in common use?
As I understand it, Turbo C 2.01 is still in common use (typically in
under-funded educational establishments).
--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999 http://www.cpax.org.uk
email: rjh at the above domain, - www.
Richard Heathfield <rj*@see.sig.invalidwrites:
Keith Thompson said:
>Ben Pfaff <bl*@cs.stanford.eduwrites:
>>Keith Thompson <ks***@mib.orgwrites: I wonder, are there any implementations (note: this includes both the compiler and the runtime library) that support C90 but *not* C95? For purposes of this question, consider a compiler with different command-line options to be the same implementation.
I imagine that Turbo C 3.0 does not support C95. (It was released in 1991.)
Ok, what about compilers currently in common use?
As I understand it, Turbo C 2.01 is still in common use (typically in
under-funded educational establishments).
Ok, any *other* examples?
The point of my question is to determine whether it's reasonable to
assume (at least) full C95 compliance, or in other words, whether C95
code is effectively as portable (or nearly as portable) as C90 code
(i.e., as portable as C99 code isn't).
For purposes of this question, "C95" code is code that conforms to the
C95 standard and uses some of the C95 features that are not in C90;
similarly for "C99 code".
(Personally, I don't think I've never run into a need to use any of
the features that were added in C95.)
--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
Keith Thompson said:
Richard Heathfield <rj*@see.sig.invalidwrites:
>Keith Thompson said:
>>Ben Pfaff <bl*@cs.stanford.eduwrites: Keith Thompson <ks***@mib.orgwrites: I wonder, are there any implementations (note: this includes both the compiler and the runtime library) that support C90 but *not* C95? For purposes of this question, consider a compiler with different command-line options to be the same implementation.
I imagine that Turbo C 3.0 does not support C95. (It was released in 1991.)
Ok, what about compilers currently in common use?
As I understand it, Turbo C 2.01 is still in common use (typically in under-funded educational establishments).
Ok, any *other* examples?
Last I checked (which, admittedly, was some years ago), C/370 did not
supply an <iso646.hheader, so presumably it's not C95-conforming
(unless things have changed fairly recently).
The point of my question is to determine whether it's reasonable to
assume (at least) full C95 compliance, or in other words, whether C95
code is effectively as portable (or nearly as portable) as C90 code
(i.e., as portable as C99 code isn't).
I think the answer is probably "no".
(Personally, I don't think I've never run into a need to use any of
the features that were added in C95.)
Likewise.
--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999 http://www.cpax.org.uk
email: rjh at the above domain, - www.
Richard Heathfield wrote:
Keith Thompson said:
Ben Pfaff <bl*@cs.stanford.eduwrites:
Keith Thompson <ks***@mib.orgwrites: I wonder, are there any implementations (note: this includes both the compiler and the runtime library) that support C90 but not C95? For purposes of this question, consider a compiler with different command-line options to be the same implementation.
>
I imagine that Turbo C 3.0 does not support C95. (It was
released in 1991.)
Ok, what about compilers currently in common use?
As I understand it, Turbo C 2.01 is still in common use (typically in
under-funded educational establishments).
As we've seen recently, it seems to have some popularity with our
friends in Asia. It is a free download from Borland, and will run on
most any MS-DOS or Windows machine. I have a copy on my XP machine here
at work.
I have a lot of reasonably fond memories of this package, as I did a
lot of work in my early days on it.
Now, if you use the IDE, it seems pretty clunky these days. There are
other solutions, of course, but this is one that's out there.
Brian
Richard Heathfield wrote:
Keith Thompson said:
.... snip ...
>
>The point of my question is to determine whether it's reasonable to assume (at least) full C95 compliance, or in other words, whether C95 code is effectively as portable (or nearly as portable) as C90 code (i.e., as portable as C99 code isn't).
I think the answer is probably "no".
>(Personally, I don't think I've never run into a need to use any of the features that were added in C95.)
Likewise.
I think that finding <iso646.havailable would indicate C95.
--
<http://www.cs.auckland.ac.nz/~pgut001/pubs/vista_cost.txt>
<http://www.securityfocus.com/columnists/423>
<http://www.aaxnet.com/editor/edit043.html>
"A man who is right every time is not likely to do very much."
-- Francis Crick, co-discover of DNA
"There is nothing more amazing than stupidity in action."
-- Thomas Matthews
--
Posted via a free Usenet account from http://www.teranews.com
CBFalconer said:
Richard Heathfield wrote:
>Keith Thompson said:
... snip ...
>>
>>The point of my question is to determine whether it's reasonable to assume (at least) full C95 compliance, or in other words, whether C95 code is effectively as portable (or nearly as portable) as C90 code (i.e., as portable as C99 code isn't).
I think the answer is probably "no".
>>(Personally, I don't think I've never run into a need to use any of the features that were added in C95.)
Likewise.
I think that finding <iso646.havailable would indicate C95.
And its absence certainly indicates unC95ness.
The compiler I use here on my desktop system is non-C95. And a quick
check through the compilers on my legacy system (the MS-Junk box) shows
that only a couple of them have that header and therefore stand any
chance of being C95-conforming. The other half-dozen or so do not.
--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999 http://www.cpax.org.uk
email: rjh at the above domain, - www.
Default User wrote:
>
Richard Heathfield wrote:
.... snip ...
>
>As I understand it, Turbo C 2.01 is still in common use (typically in under-funded educational establishments).
As we've seen recently, it seems to have some popularity with our
friends in Asia. It is a free download from Borland, and will run
on most any MS-DOS or Windows machine. I have a copy on my XP
machine here at work.
It is generally useful for checking that you haven't go any 32 bit
int dependencies left.
--
<http://www.cs.auckland.ac.nz/~pgut001/pubs/vista_cost.txt>
<http://www.securityfocus.com/columnists/423>
<http://www.aaxnet.com/editor/edit043.html>
"A man who is right every time is not likely to do very much."
-- Francis Crick, co-discover of DNA
"There is nothing more amazing than stupidity in action."
-- Thomas Matthews
--
Posted via a free Usenet account from http://www.teranews.com This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: damian birchler |
last post by:
Hi
I'm wondering of what type a structure is. Of course, it is a
_structure_, but an array isn't an _array_ either. So of what type is
a structure? I'd say a pointer, am I right?
|
by: Randy Yates |
last post by:
In Harbison and Steele's text (fourth edition, p.111)
it is stated,
The C language does not specify the range of integers that the
integral types will represent, except ot say that type int may...
|
by: Conrad Weyns |
last post by:
I have recently gone back to doing some work in c, after years of c++, but I
find the lack of templates and in particular the container in the stl to be
a huge show stopper.
There are math libs,...
|
by: Keith K |
last post by:
Having developed with VB since 1992, I am now VERY
interested in C#. I've written several applications with
C# and I do enjoy the language.
What C# Needs:
There are a few things that I do...
|
by: Fresh Air Rider |
last post by:
Hi
I understand that ASP.net 2.0 (Whidbey) is going to reduce coding by
70%.
Surely this is going to de-skill or dumb down the developer's task and
open up the task of web development to less...
| |
by: Xah Lee |
last post by:
in March, i posted a essay “What is Expressiveness in a Computer
Language”, archived at:
http://xahlee.org/perl-python/what_is_expresiveness.html
I was informed then that there is a academic...
|
by: Frederick Gotham |
last post by:
If we look at a programming language such as C++: When an updated Standard
comes out, everyone adopts it and abandons the previous one.
It seems though that things aren't so clear-cut in the C...
|
by: Jiří Paleček |
last post by:
Hello,
I know the rules for const handling in C++, but I'd like to ask what is
the "right" way to use them, eg. when is it appropriate to make a member
function const?
This came across this...
|
by: plenty900 |
last post by:
I was looking over someone's C++ code today and despite
having written perfectly readable C++ code myself,
the stuff I was looking at was worse than legalese.
The people who are guiding the...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| |