elliott@bunker.UUCP (Elliott Kleinrock) (04/29/89)
While making GB I got: cc -DVER_4.3 -pipe -g -c makeplanet.c "makeplanet.c", line 289: compiler error: expression causes compiler loop: try simplifying *** Exit 1 Stop. this is line 289: s->fert = (float)(landsectors + 5) / (float)Numlandsects * 100; here is the function it came from: int Volcano(pptr,landsectors,Numlandsects) planettype *pptr; int landsectors,Numlandsects; { int x,y; sectortype *s; (void)Getxysect(pptr,&x,&y,0); /*x = int_rand(0,pptr->Maxx-1); y = int_rand(0,pptr->Maxy-1);*/ s = &Sector(*pptr,x,y); if (s->des==DES_SEA) { if (Numneighbors(pptr,x,y,DES_LAND)||Numneighbors(pptr,x,y,DES_MOUNT)) { s->des=(landsectors>(MAP_MOUNT_PERCENT*Numlandsects))?DES_LAND:DES_MOUNT; s->resource = round_rand((float)(Numlandsects - landsectors + 5) / (float)Numlandsects * 100); /* min content prop to dist from sea */ s->fert = (float)(landsectors + 5) / (float)Numlandsects * 100; /* fert content prop to dist from center of continent */ return(1); } else return(0); } else return(0); } could someone tell me how to fix this - Elliott
mal4477@ultb.UUCP (M.A. Lefebvre) (05/01/89)
In article <4968@bunker.UUCP> elliott@clunker.UUCP (Elliott Kleinrock) writes: >While making GB I got: > >cc -DVER_4.3 -pipe -g -c makeplanet.c >"makeplanet.c", line 289: compiler error: expression causes compiler loop: try simplifying >*** Exit 1 > >Stop. > I have had the same problem, and can't seem to find the fix. Does anyone have any ideas?? Also, in the files.h how do you set up the paths. Do I have to change permissions on the directories that it access?? Thanks, -- ========================= Marc "Sting" Lefebvre ============================ |All flames: Computer Science House "Soccer Mania" | | /dev/null ---- Rochester Institute of Technology ---- | ==== UUCP: uunet!ccicpg!cci632!ritcsh!marc or BITNET: mal4477@ritvax =======
mike@cs.keele.ac.uk (Michael A. Green) (05/02/89)
> In article <4968@bunker.UUCP> elliott@clunker.UUCP (Elliott Kleinrock) writes: >>While making GB I got: >> >>cc -DVER_4.3 -pipe -g -c makeplanet.c >>"makeplanet.c", line 289: compiler error: expression causes compiler loop: try simplifying >>*** Exit 1 >> Just a few comments. I tried making GB under Ultrix 2.2. After getting many errors I finally cludged the header files to remove the size limitations on the structure components, ie changed all the 1..17 bit ones to int. This will get rid of any segmentation violation errors you have. It compiled after that, right up to this loop. I cannot remember what I changed but it went away. On of my major gripes is the way that things like the data files are defined in a .h file... and then used with explicit paths in half the files!!. I spent quite a while going through it sorting out all of the "idiocincracies" like that. There is also a bug in the planet.list file... it creates a universe with 3 systems... not 30 as per the README... it is simple to fix. It looks promising but is too "young" to play yet. Post it again when it is finished and a lot more people might play it. -- |Michael A. Green. |JANET: mike@uk.ac.keele.cs | |Department of Computer Science |BITNET: mike%cs.kl.ac.uk@ukacrl | |University of Keele, Keele, |ARPANET:mike%cs.kl.ac.uk@nfsnet-relay.ac.uk| |Staffordshire. ST5 5BG. U.K. |VOICE: +44 782 621111 ex. 3357/3347 |