Thanks,
- Bill
I don't think the ANSI C89 spec is freely available, though I may be
wrong. (Google didn't find it easily, but I don't always get along
well with Google) If the patch builds without warning with parrot's
standard switches then you should be OK. (ANSI C89 was the first big
rev of C after the original K&R C. If you've got the second edition
or later of the K&R C book, it uses the C89 spec)
--
Dan
--------------------------------------it's like this-------------------
Dan Sugalski even samurai
d...@sidhe.org have teddy bears and even
teddy bears get drunk
Its available for the low, low price of $18. Makes a great stocking stuffer.
Or frightening accessory this Halloween!
http://webstore.ansi.org/ansidocstore/product.asp?sku=INCITS%2FISO%2FIEC+9899%2D1999
(That's the C99 spec but it should be clear from it what was C89 and what's
been introduced with C99).
--
Michael G Schwern sch...@pobox.com http://www.pobox.com/~schwern/
Beef Coronary
> At 11:25 AM -0700 10/21/04, Bill Coffman wrote:
>> I read somewhere that the requirement for parrot code is that it
>> should be compliant with the ANSI C'89 standard. Can someone point me
>> to a description of the C89 spec, so I can make sure my reg_alloc.c
>> patch is C89 compliant?
>
> I don't think the ANSI C89 spec is freely available, though I may be
> wrong. (Google didn't find it easily, but I don't always get along
> well with Google) If the patch builds without warning with parrot's
> standard switches then you should be OK. (ANSI C89 was the first big
> rev of C after the original K&R C. If you've got the second edition or
> later of the K&R C book, it uses the C89 spec)
Also, if you're compiling with gcc, then you can pass "-std=c89" to the
compiler to enforce that particular standard. (Apparently--though I
haven't tried it.) I believe "-ansi" does the same thing.
JEff
Apparently,
gcc -ansi -pedantic
is supposed to be ANSI C '89. Equiv to -std=c89. Also, my
Configure.pl generated make file uses neither -ansi nor -pedantic. I
do have access to a K&R C v2, but it doesn't look like it's going to
match the actual practice. Oh well. So long, as my code works, I'm
happy.
Incidentally, I tried adding -ansi and -pedantic and I got lots of
warnings, like "long long" not supported by ANSI C'89, etc. (how can
you do 64 bit ints then?). I also got errors that caused outright
failure. Perhaps it's best to forget the whole C'89 thing. But maybe
someone should remove that from the documentation? Just a thought.
-Bill
> Apparently,
> gcc -ansi -pedantic
> is supposed to be ANSI C '89.
Not really. It's pedantic ;)
> Incidentally, I tried adding -ansi and -pedantic and I got lots of
> warnings, like "long long" not supported by ANSI C'89, etc. (how can
> you do 64 bit ints then?).
A C compiler on a 64-bit machine uses long.
> ... I also got errors that caused outright
> failure. Perhaps it's best to forget the whole C'89 thing.
Not the C'89 thing, but the "-ansi" thing of gcc.
> -Bill
leo
I thought long long was only defined in C99, not C89?
--
bd