473,890 Members | 1,430 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

C99 Versus ANSI.

Hi All

What is C99 Standard is all about. is it portable, i mean i saw
-std=C99 option in GCC
but there is no such thing in VC++.?

which one is better ANSI C / C99?
can i know the major difference between C99 & ANSI C standards?

Sep 27 '06 #1
83 11668
sunny said:
Hi All

What is C99 Standard is all about.
It's the replacement to C, and popular implementations might be porting to
C99 Any Decade Now.
is it portable,
No. Some compilers implement some bits of it. Other compiler implement other
bits. Some implement some bits of it /wrong/ (or, at least, differently to
what C99 requires, perhaps through bugginess or ignorance, but possibly for
good reasons of their own). Some compilers don't implement any of it. And a
handful of (not so well-known) compilers implement it all.
i mean i saw
-std=C99 option in GCC
It's a misnomer. What it means is "the bits of C99 which we can be bothered
to implement" (which, to be fair, is quite a lot of it). But not all gcc
versions have a -std=C99 option. Mine, for instance, does not.
but there is no such thing in VC++.?
Right. Microsoft are not actively seeking to support C99.
which one is better ANSI C / C99?
That depends on what you mean by "better".
can i know the major difference between C99 & ANSI C standards?
http://home.tiscalinet.ch/t_wolf/tw/c/c9x_changes.html
--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
Sep 27 '06 #2
sunny wrote:
Hi All

What is C99 Standard is all about.
It is the current C standard, as defined by ANSI/ISO. The old standard
(C89) is now obsolete.

is it portable

Yes. There are compilers for it under linux, windows, and many
other operating systems and implementations . Microsoft doesn't
implement it, but you can find compilers like intel compiler
that implements it. Comeau C/C++ implements C99 also.

, i mean i saw
-std=C99 option in GCC
but there is no such thing in VC++.?
VC++ doesn't care about C development and has abandonend
most C development to concentrate on C# C++ and other languages.
>
which one is better ANSI C / C99?
C99 offers most of the all standard (including warts like gets())
and adds significant functionality.

can i know the major difference between C99 & ANSI C standards?
http://home.tiscalinet.ch/t_wolf/tw/c/c9x_changes.html
Sep 27 '06 #3
jacob navia said:
sunny wrote:
>Hi All

What is C99 Standard is all about.

It is the current C standard, as defined by ANSI/ISO. The old standard
(C89) is now obsolete.
Merriam-Webster defines "obsolete" as "no longer in use or no longer
useful", which is certainly not true of C89. It also offers "of a kind or
style no longer current", which again is not true of C89.
is it portable

Yes.
Provided you are prepared to spend money replacing your C90 compilers with
newer versions, and provided you aren't too picky about which platforms you
want to port to.
There are compilers for it under linux, windows, and many
other operating systems and implementations .
How about OS390? VM/CMS? UNICOS? SHARC?
Microsoft doesn't implement it,
So it is effectively non-portable, since a great many C programmers are
required to use the compiler supplied by their employer, and for a great
many employers, Microsoft is the preferred supplier for Windows-based
development software.

<snip>

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
Sep 27 '06 #4
sunny wrote:
Hi All

What is C99 Standard is all about.
It takes a long time for standards to become widely adopted in the field.
is it portable
It is portable among systems implementing the standard, if you can find
any.

i mean i saw
-std=C99 option in GCC
GCC is working towards C99 conformance, but it's not complete.
but there is no such thing in VC++.?
And Microsoft reports having no plans to implement this standard.
which one is better ANSI C / C99?
Which one is better, ketchup or mustard?
can i know the major difference between C99 & ANSI C standards?
What qualifies as "major" is a matter of opinion. Some important
differences

.. Identifiers have increased significant length
.. "//" style comments are allowed
.. Variable arguments in macros
.. Inline functions
.. Restricted pointers (can be "restricted " from pointing to the same
object.)
.. a _Bool type
.. Vars can be declared anywhere in a block
.. Functions no longer return 'int' by default
.. Last data member of a struct can be an array of unspecified size
.. Complex number type
.. Repeated type qualifier is folded into a single qualifier. (Though a
special case is made for "long long" which provides a 64 bit integer type.
The "restricted pointer" (two pointers cannot reference the same memory
address) allows compiler implementors to perform certain optimizations:
http://www.accu.informika.ru/accu/ev...lic/c_news.htm

Complex (and a distinct "Imaginary" ) type will have applications in
signal processing and number-theoretic algorithms. With Complex numbers
being a language feature, implementations may be able to optimize
arithmetic operations, so that for instance, library calls will not be
necessary for arithmetic.

Some of these standards are already de-facto standards in many systems,
like "//" comments, long identifiers, inline functions, 64-bit "long
long", incomplete array in a struct.

Some are no doubt going to lead to more obfuscation opportunities.
Vararg macros? I can see very useful application for that, but I can
see more potential for abuse.

Read "The Rationale for the C99 Standard"

http://std.dkuug.dk/JTC1/SC22/WG14/w...onaleV5.10.pdf
Sep 27 '06 #5
jmcgill said:
sunny wrote:
>Hi All

What is C99 Standard is all about.

It takes a long time for standards to become widely adopted in the field.
>is it portable

It is portable among systems implementing the standard, if you can find
any.
Beautifully put.

>i mean i saw
-std=C99 option in GCC

GCC is working towards C99 conformance, but it's not complete.
When was the last change to GCC that increased its C99 conformance?

(I'm guessing four or five years ago, but I'll be glad to be proved wrong.
It would be nice to know they're at least still having a crack at it...)

<snip>
>which one is better ANSI C / C99?

Which one is better, ketchup or mustard?
Ketchup. No, mustard! Er, ketc...must...k e... mu.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
Sep 27 '06 #6
jmcgill wrote:
sunny wrote:
>>Hi All

What is C99 Standard is all about.


It takes a long time for standards to become widely adopted in the field.

>>is it portable


It is portable among systems implementing the standard, if you can find
any.
I find linux and windows are quite a big part of
the workstation market.
Sep 27 '06 #7
jacob navia wrote:
I find linux and windows are quite a big part of
the workstation market.
Linux and Windows having what, exactly, to do with the C99 standard?
Sep 27 '06 #8
jmcgill wrote:
jacob navia wrote:

>>I find linux and windows are quite a big part of
the workstation market.


Linux and Windows having what, exactly, to do with the C99 standard?
because you said:
It is portable among systems implementing the standard, if you can find
any.

I found two
Sep 27 '06 #9
jacob navia wrote:
jmcgill wrote:
>jacob navia wrote:

>>I find linux and windows are quite a big part of
the workstation market.


Linux and Windows having what, exactly, to do with the C99 standard?

because you said:
It is portable among systems implementing the standard, if you can find
any.

I found two
Neither "windows" nor "linux" is a C99 compiler or runtime library, so I
really have no idea what you are trying to claim.
Sep 27 '06 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.