C 99 compiler access

E

E. Robert Tisdale

I have access to a wide variety of different platforms here at JPL
and they all have pretty good C 99 compilers.

Some people claim that they have not moved to the new standard
because of the lack of C 99 compliant compilers.
Is this just a lame excuse for back-sliding?
 
R

Richard Tobin

E. Robert Tisdale said:
I have access to a wide variety of different platforms here at JPL
and they all have pretty good C 99 compilers.

If JPL pays me to write some C code for them, I'll bear it in mind.

-- Richard
 
E

Eric Sosman

E. Robert Tisdale said:
I have access to a wide variety of different platforms here at JPL
and they all have pretty good C 99 compilers.

Some people claim that they have not moved to the new standard
because of the lack of C 99 compliant compilers.
Is this just a lame excuse for back-sliding?

Yes; see Section 1.42.8 paragraph 9. It is permitted
to back-slide to any valid array element or to one element
before the start of the array, provided the element is not
actually referenced. Back-sliding by an amount greater than
the number of padding bits is undefined; "lame" refers to the
condition of the user after blistering his gluteal muscles
by back-sliding with insufficient padding.

However, "excuse" is used only as a synonym for "rationale,"
and as we all know the Rationale is non-normative.
 
M

Mac

I have access to a wide variety of different platforms here at JPL
and they all have pretty good C 99 compilers.

Some people claim that they have not moved to the new standard
because of the lack of C 99 compliant compilers.
Is this just a lame excuse for back-sliding?

As I understand it, the argument against moving to C99 rests on the
premise that there is a lack of conforming implementations.

It sounds like you are claiming that there are actually a wide variety
of conforming implementations at your disposal. If this is the case,
then maybe your point is a good one. And it would seem that there is
nothing holding you back from using C99 features in your code.

But just to confirm, do the authors or vendors of the compilers and
libraries you are referring to actually claim C99 conformance for them?
And are they widely available to other people on other platforms?

--Mac
 
E

E. Robert Tisdale

Mac said:
As I understand it,
the argument against moving to C99 rests on the premise that
there is a lack of conforming implementations.

It sounds like you are claiming that there are actually a wide variety
of conforming implementations at your disposal. If this is the case,
then maybe your point is a good one. And it would seem that there is
nothing holding you back from using C99 features in your code.

But just to confirm, do the authors or vendors of the compilers and
libraries you are referring to actually claim C99 conformance for them?
And are they widely available to other people on other platforms?

I don't even know of *any* implementation
that actually claims C 89/90 compliance (conformance)
let alone C 99 compliance.
That doesn't prevent people from writing C 89/90 code.

So far, the closest to compliance are the Comeau compilers:

http://www.comeaucomputing.com/

I have GNU, MIPSPro and Intel C compilers
that support all of the C99 features that I have found useful so far.
 
C

CBFalconer

Richard said:
If JPL pays me to write some C code for them, I'll bear it in
mind.

Considering the normal accuracy of his comments, I have grave
doubts. You will note he fails to specify the compilers involved,
which makes this just another Trollsdale troll.
 
M

Mike Wahler

E. Robert Tisdale said:
I have access to a wide variety of different platforms here at JPL
and they all have pretty good C 99 compilers.

Some people claim that they have not moved to the new standard
because of the lack of C 99 compliant compilers.
Is this just a lame excuse for back-sliding?

Why do you believe JPL's 'wide variety' of platforms contains
all those used by everyone else?


-Mike
 
E

E. Robert Tisdale

Mike said:
Why do you believe JPL's 'wide variety' of platforms
contains all those used by everyone else?

I didn't say that it does.
We might have one of every platform here at JPL
but I'm not sure that we do.
But I'm pretty sure that we have most viable platforms
and I've used C 99 compilers on most of them.
 
M

Mike Wahler

E. Robert Tisdale said:
I didn't say that it does.
We might have one of every platform here at JPL
but I'm not sure that we do.
But I'm pretty sure

Why are you pretty sure?
that we have most viable platforms

'Viable'? That's subject to context.
and I've used C 99 compilers on most of them.

So, what's your point? From your original post:

"Some people claim that they have not moved to the new standard
because of the lack of C 99 compliant compilers.
Is this just a lame excuse for back-sliding?"


Who cares if or why someone does or does not use new C99
features? And for some platforms, yes, lack of an implementation
(or at least one of 'acceptable' quality) is indeed a legitimate
reason. But that needn't be the *only* reason. Perhaps
a developer's target platform does have a good C99 implementation
available. Why would someone switch when c90 is still sufficient?

You're implying that not using the 'latest and greatest'
tools, simply because they exist, is somehow 'backsliding'.
That's utter nonsense.

-Mike
 
M

Malcolm

Mike Wahler said:
You're implying that not using the 'latest and greatest'
tools, simply because they exist, is somehow 'backsliding'.
That's utter nonsense.
The difference is that C99 was designed by a standards body. There is no
point in having a "standard" that is not widely implemented. So the present
situation is very undesireable, but it is largely ANSI's fault, because the
extensions were neither so minimal that they could be trivially implemented
(a #define for bool, a vnsprintf() function, etc) nor were like the C++
extensions, very far reaching and offering greatly enhanced functionality.
Instead we had a lot of feature of dubious use which require rewrites of the
compiler. For instance variables can now be declared anywhere, which seems
to be just a way of making code less organised and harder to read, and
variable arrays are allowed. Since a variable length array cannot fail, and
the programmer won't know the array length at run time, this is asking for a
security exploit.
 
E

E. Robert Tisdale

Malcolm said:
The difference is that C99 was designed by a standards body.
There is no point in having a "standard" that is not widely implemented.

Which begs the question,
"Is the ANSI/ISO C 99 standard 'widely implemented'?"
It appears to me to be widely implemented now.
So the present situation is very undesireable but it is largely ANSI's fault
because the extensions were neither so minimal that they could be trivially implemented
(a #define for bool, a vnsprintf() function, etc.) nor were like the C++ extensions,
very far reaching and offering greatly enhanced functionality. Instead,
we had a lot of feature of dubious use which require rewrites of the compiler.
For instance, variables can now be declared anywhere,
which seems to be just a way of making code less organised
and harder to read, and variable arrays are allowed.
Since a variable length array cannot fail,
and the programmer won't know the array length at run time,
this is asking for a security exploit.

I suppose you would describe yourself as a backslider. :)
 
M

Malcolm

E. Robert Tisdale said:
I suppose you would describe yourself as a backslider. :)
I wasn't on the C99 committee, nor did I make any suggestions to it. So I am
under no obligation to defend its actions nor to see that its decisions are
implemented.
The situation is that very few C99 compilers are in existence, five years
after the standard was proposed. I am not going to use what influence I have
to encourage vendors to ship C99-compliant compilers, but on the other hand
if the standard did take off and customers started asking for C99-conforming
code, then I would oblige.
 
E

E. Robert Tisdale

Malcolm said:
I wasn't on the C99 committee, nor did I make any suggestions to it.
So I am under no obligation to defend its actions
nor to see that its decisions are implemented.
The situation is that very few C99 compilers are in existence
five years after the standard was proposed.

What do you mean by "very few".
There aren't many C compilers that comply with C 89
fifteen years after the standard was proposed.
I am not going to use what influence I have
to encourage vendors to ship C99-compliant compilers
but, on the other hand, if the standard did take off
and customers started asking for C99-conforming code,
then I would oblige.

I think that the C 99 standard is
"backward compatible" with the C 89 standard
so C 89 code is. by definition, "C99-conforming code".

How will you know when the [C 99] standard does "take off"?
What evidence are you looking for?
Maybe it has already "taken off" and you just didn't notice.
 
J

Jens.Toerring

E. Robert Tisdale said:
Malcolm wrote:
What do you mean by "very few".
There aren't many C compilers that comply with C 89
fifteen years after the standard was proposed.

Can you name just a few commonly used ones that don't?
My impression is that basically all are C89 compliant.

Regards, Jens
 
E

E. Robert Tisdale

Can you name just a few commonly used ones that don't?
My impression is that basically all are C89 compliant.

To my knowledge,

there are no C compilers that claim to be fully compliant
with the ANSI/ISO C 89/90 language standard.

The only C compiler that comes close is the Comeau compiler:

http://www.comeaucomputing.com/

All C compilers come with a disclaimer
something like the one that came with my GNU C compiler:

GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.

Do you know of any C compiler that *does* claim to comply
with the ANSI/ISO C 89/90 standard?
 
R

Robert Wessel

E. Robert Tisdale said:
I don't even know of *any* implementation
that actually claims C 89/90 compliance (conformance)
let alone C 99 compliance.


OK, from page xii of the "C Language Reference" from the MS VC7.0
(circa 1991) package (it was handy):

"ANSI Conformance: Microsoft C version 7.0 conforms to the standard
for the C language as set forth in the American National Standard
(hereinafter referred to as the ANSI C standard). Microsoft
extensions to the ANSI C standard are noted in the text and syntax of
this manual as well as in the online references. Because the
extensions are not a part of the ANSI C standard, their use may
restrict portability of programs between systems. By default the
Microsoft extensions are enabled. To disable the extensions, specify
/Za on the command line. With /Za, all non-ANSI code generates errors
or warnings." (Retyped from the original hardcopy by RW, apologies in
advance for any transcription errors).

Essentially the identical paragraph is included in the online doc of
several of the newer versions of the compiler.

While one might quibble about the degree to which the MS compilers
actual meet that claim, the claim of C89/90 compliance is clearly
made.
 
R

Robert Gamble

I don't even know of *any* implementation
that actually claims C 89/90 compliance (conformance)
let alone C 99 compliance.
That doesn't prevent people from writing C 89/90 code.

So far, the closest to compliance are the Comeau compilers:

http://www.comeaucomputing.com/

I have GNU, MIPSPro and Intel C compilers
that support all of the C99 features that I have found useful so far.

Can you point out where gcc does not support full c90 compliance? The
documentation implies full conformance to c90:

"GCC supports three versions of the C standard, although support for the
most recent version is not yet complete."

Where the 3 versions are c89/c90, c94/c95, and c99 respectively.

Rob Gamble
 
M

Mike Wahler

E. Robert Tisdale said:
I think that the C 99 standard is
"backward compatible" with the C 89 standard
Nope.

so C 89 code is. by definition, "C99-conforming code".

The following conforms to C89 but not C99:

main()
{
return 0;
}

-Mike
 
E

E. Robert Tisdale

Robert said:
"GCC supports three versions of the C standard,
although support for the most recent version is not yet complete."

Can you give us a pointer (URL) for this quote?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top