Path: utzoo!attcan!uunet!snorkelwacker!bloom-beacon!eru!hagbard!sunic!nuug!sigyn.idt.unit.no!hanche From: hanche@imf.unit.no (Harald Hanche-Olsen) Newsgroups: comp.sys.apollo Subject: Re: CC Bug? Message-ID: Date: 18 Oct 90 17:14:18 GMT References: <9010170052.AA00467@umix.cc.umich.edu> Sender: news@idt.unit.no (Usenet news admin) Organization: The Norwegian Institute of Technology, Trondheim, Norway. Lines: 35 In-Reply-To: derstad@cim-vax.honeywell.com's message of 17 Oct 90 01:52:00 GMT In article <9010170052.AA00467@umix.cc.umich.edu> derstad@cim-vax.honeywell.com ("DAVE ERSTAD") writes: OK, campers, here's yet another (probable) compiler bug. This time, it's CC: test(int a,) { printf("Hello"); } main() { test(); } The above program is syntactically incorrect. The prototype for test has an extraneous comma. However, CC compiles this with no errors and no warnings. [...[ The question: Is there any reason why CC should be accepting the above code as legal? No, like you said that comma constitutes a syntax error (at least as far as I am able to decode what K&R<2> says about it). And not only that, the error is still around in cc 6.8(beta). I have reported it, and if we're really really lucky it will be fixed before 6.8 is out. But the beta period is almost over, and I think they are reluctant about changes that are not absolutely essential to do at this stage. Let's just wait and see... - Harald Hanche-Olsen Division of Mathematical Sciences The Norwegian Institute of Technology N-7034 Trondheim, NORWAY