Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!cwjcc!gatech!ukma!nrl-cmf!cmcl2!lanl!unm-la!unmvax!nmtsun!warner@hydrovax.nmt.edu
From: warner@hydrovax.nmt.edu (M. Warner Losh)
Newsgroups: comp.lang.fortran
Subject: Re: Fortran versus C for numerical anal
Message-ID: <1183@nmtsun.nmt.edu>
Date: 23 Sep 88 19:19:24 GMT
Sender: news@nmtsun.nmt.edu
Organization: New Mexico Tech Hydrology Program
Lines: 26

In article <4031@lanl.gov>, jlg@lanl.gov (Jim Giles) writes...
>(I hear that YACC has a reference to 
>x[-1] in it somewhere - illegal, but oft used.)

YACC does have this reference, sort of.  As I recall from the generated code,
it is used in two places.  Once is an initialization (a lot of stuff is
pre increment).  This usage is dubious at best.  The other place is where 
it addresses the previous thing in some array, which is cool by anyone's
definition of C.  eg

	x = &y[10];
	x[-1] = 3;

(or some such garbage).

So what Jim is saying is correct, but people generally don't try to port 
the C code generated by YACC.  They just run the .y file through YACC on 
the target machine (which we surely can assume will work).

>J. Giles
>Los Alamos
--
Warner Losh
warner@hydrovax.nmt.edu		...!unmvax!nmtsun!warner%hydrovax
Insert quote here.  A nice cure little quote.
My spelling and views are my own.  Only the letters have been changed...