Path: utzoo!utgpu!utstat!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!bloom-beacon!apple!amdahl!shs From: shs@uts.amdahl.com (Steve Schoettler) Newsgroups: comp.sys.amiga.tech Subject: Bug: lc1 HANGS with bad input Message-ID: <19D8W3daRw1010.c0UY@amdahl.uts.amdahl.com> Date: 14 Apr 89 19:17:38 GMT Reply-To: shs@uts.amdahl.com (Steve Schoettler) Organization: Amdahl Corporation, Sunnyvale CA Lines: 33 OK. Here's the simple case: ------------------------ #define y(a) 2*a myfunc(y) char *y { return(0); } ---------------------- Note that I forgot the semi-colon after "char *y". If you add the semi-colon, everything compiles as expected. If you remove the #define, lc1 warns about a missing semi-colon. This program as-is, hangs when compiled with "lc1 test", where test.c is the program above and lc1 is version 5.02. In case you're wondering, my stack size is 50000. I admit it's probably bad practice to use variable names that clash with #define'd functions, but a compiler should never hang, no matter how stupid the programmer is. -- Steve Schoettler shs@uts.amdahl.com {sun,decwrl,pyramid,ames,uunet}!amdahl!shs Amdahl Corp., M/S 213, 1250 E. Arques Ave, Sunnyvale, CA 94088