Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!uwm.edu!bionet!agate!ucbvax!cim-vax.honeywell.com!derstad From: derstad@cim-vax.honeywell.com ("DAVE ERSTAD") Newsgroups: comp.sys.apollo Subject: CC Bug? Message-ID: <9010170052.AA00467@umix.cc.umich.edu> Date: 17 Oct 90 01:52:00 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 32 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. If one gets the info messages out (how many people actually do?) it turns out that the compiler doesn't think a prototype exists: ******** Line 4: [Information #213] No prototype in scope, default prototype "test(...)" assumed. We ran into this due to a cut-and-pasted prototype which had such an extraneous comma. Finding the source of our illegal address problem was less than fun. The question: Is there any reason why CC should be accepting the above code as legal? Dave Erstad Honeywell SSEC DERSTAD@cim-vax.honeywell.com