Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 (Tek) 9/26/83; site tekecs.UUCP Path: utzoo!linus!decvax!tektronix!orca!tekecs!joemu From: joemu@tekecs.UUCP Newsgroups: net.lang.c Subject: PCC bugs Message-ID: <4141@tekecs.UUCP> Date: Tue, 30-Oct-84 12:50:18 EST Article-I.D.: tekecs.4141 Posted: Tue Oct 30 12:50:18 1984 Date-Received: Thu, 1-Nov-84 04:10:19 EST Sender: joemu@tekecs.UUCP Organization: Tektronix, Wilsonville OR Lines: 55 Don Seely (sp?) asked a while back for some "programs" that will cause PCC to core dump. He originally stated that he wanted to start a contest to find the shortest program that would core dump the compiler. What I would ask is that we forget about this type of "contest" and concentrate on finding and fixing bugs. I applaud Don's activities on the f77 compiler and would be more than happy to see him set up something similar to it for pcc. I would like to see all types of bugs reported, not just "core dumpers". Here are a couple bugs that come to mind. ------------------------------------------------------------------------ This causes cpp to core dump on many systems: #if 1/0 #endif ------------------------------------------------------------------------ This causes ccom to die on many systems: char foo[-1]; /* the -1 turns into a huge number */ ------------------------------------------------------------------------ This causes ccom to generate bogus instructions on the vax: float foo; /* double works just as well */ foo++; /* the infamous incf instruction */ foo--; /* the infamous decf instruction */ predecrement and preincrement work just as well. ------------------------------------------------------------------------ The scope of typedef's is screwed on most systems: Typedefs should behave as ordinary identifiers (i.e. they can be redeclared in inner blocks). Most compilers handle typedefs as global identifiers independent of scoping rules. Try the fragment of code from K&R pp. 206 typedef float distance; ... { auto int distance; ... This generates a syntax error on many implementations. ------------------------------------------------------------------------ I hope this gets us off to a better start. Keep up the great work Don! Joe Mueller UUCP: ...!{ucbvax or decvax}!tektronix!tekecs!joemu ARPA: tekecs!joemu.tektronix @ udel-relay