logo       

Re: C89: msg#00608

lang.perl.perl6.internals

Subject: Re: C89

Thanks for the info...

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

On Thu, 21 Oct 2004 22:41:36 -0700, Jeff Clites <jclites@xxxxxxx> wrote:
> On Oct 21, 2004, at 11:51 AM, Dan Sugalski wrote:
>
> > 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
>
>



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise