Path: utzoo!attcan!uunet!tut.cis.ohio-state.edu!ucbvax!DDATHD21.BITNET!XBR2D96D From: XBR2D96D@DDATHD21.BITNET (Knobi der Rechnerschrat) Newsgroups: comp.sys.sgi Subject: Compiler bugs? Message-ID: <8912040056.aa01435@SMOKE.BRL.MIL> Date: 4 Dec 89 05:45:14 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 52 Hallo, I discovered the following two bugs in the C and f77 compiler of 3.2. I know I should report them directly to Calvin Vu, but I've lost his e-mail address. First I have the following Fortran Code: program test write(*,4177) numatm = -1 4711 format('Next comes the bug',i4) 1 numatm end The program compiles fine, but tell me where does is put the continuation line? To the format statement? That's nonsense? To the write statement? That would be the meaning, but to late and it doesn't. I found that one when I tested the IBM-VS-Fortran product for their AIX/370 system on the 25000 line MOPAC package. That compiler REALLY test the syntax of programs. It has only one small flaw. The executable isn't.... Btw. f77 on a 3100 tells me there's a syntax error following the format statement. Second, a colleague asked me to test the following c code on our 4D/70-GT. #include main() { int i=0; if (i) f(); else/*comment*/f1(); } f() {return;} f1() {return;} The code compiles fine (that's ok), but ld complains about not finding _elsef1. That means it just removes the comment without replacing it by a white space character as stated by K&R. Thats either a violation of K&Rs' definiton of comments, or a violation of the rule that comments may appear at places where white space characters are allowed whitout changing the semantics of the program. The same can be seen on a 3100 running 3.6. Enjoy Martin Knoblauch TH-Darmstadt Physical Chemistry 1 Petersenstrasse 20 D-6100 Darmstadt, FRG BITNET: