From mboxrd@z Thu Jan 1 00:00:00 1970 From: jcapp@anteil.com (Jim Capp) Date: Thu, 23 Feb 2006 15:43:14 -0500 Subject: [TUHS] Old C code In-Reply-To: <48239d390602230841o4c11fcelba411ec8827bee83@mail.gmail.com> References: <48239d390602230841o4c11fcelba411ec8827bee83@mail.gmail.com> Message-ID: <20060223204314.GC5795@anteil.com> Shouldn't be a problem. I defined PTRSIZE and added an #include and gcc compiled it fine for me. --------------- try this ------------------- #define PTRSIZE 10 #include union reptr { struct reptr1 { char *ad1; char *ad2; char *re1; char *rhs; FILE *fcode; char command; char gfl; char pfl; char inar; char negfl; }; struct reptr2 { char *ad1; char *ad2; union reptr *lb1; char *rhs; FILE *fcode; char command; char gfl; char pfl; char inar; char negfl; }; } ptrspace[PTRSIZE], *rep; main( ) { printf( "hello world\n" ); } -------------------------------------------- On Thu, Feb 23, 2006 at 07:41:45PM +0300, Sergey Lapin wrote: > Hi, all! > I just dug into sed.h from 32V version of sed: > > gcc can't parse the following code: > union reptr { > struct reptr1 { > char *ad1; > char *ad2; > char *re1; > char *rhs; > FILE *fcode; > char command; > char gfl; > char pfl; > char inar; > char negfl; > }; > struct reptr2 { > char *ad1; > char *ad2; > union reptr *lb1; > char *rhs; > FILE *fcode; > char command; > char gfl; > char pfl; > char inar; > char negfl; > }; > } ptrspace[PTRSIZE], *rep; > > Does anyone know current form of that, or how to force this > to compile and work? > > Thanks a lot! > > S. > _______________________________________________ > TUHS mailing list > TUHS at minnie.tuhs.org > http://minnie.tuhs.org/mailman/listinfo/tuhs