Xref: utzoo gnu.gcc.bug:2031 comp.std.c:2519 Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!orion.oac.uci.edu!uci-ics!rfg From: rfg@ics.uci.edu (Ronald Guilmette) Newsgroups: gnu.gcc.bug,comp.std.c Subject: Re: function prototype syntax Message-ID: <25EB0435.3408@paris.ics.uci.edu> Date: 27 Feb 90 22:50:30 GMT References: <9002270016.AA02978@yamada-sun.UUCP> Reply-To: rfg@ics.uci.edu (Ronald Guilmette) Distribution: gnu Organization: UC Irvine Department of ICS Lines: 33 In article <9002270016.AA02978@yamada-sun.UUCP> yamada-sun!eric@nosun.west.sun.com (Eric Hanchrow) writes: > >Here's an entire program which compiles just fine with gcc-1.37 >(Sparc, SunOS 4.0.c). > extern int fred(int a, int ); >I tried compiling the same program with Microsoft C 5.1, and it said >unto me, quote, > junk3.c(1) : error C2059: syntax error : ',' >I promptly got on the phone to Microsoft to chew them out about this >obvious ANSI non-compatibility. The fella on the phone said, "No, the >ANSI standard requires that you either name all the arguments in a >function prototype, or none of them". Therefore, he claimed, the >error generaed by Microsoft was correct (although not very >informative). > >Now, I don't have a copy of the Standard, but if the guy at Microsoft >was right, then gcc should also complain when presented with this >code. I think that GCC is correct and that Microsoft is wrong. I'm looking at section 3.5.4.3 of the draft standard and I see no such restriction stated there. If there was such a restriction, it would belong in 3.5.4.3. You had better call back that guy at Microsoft and insist that he cite chapter and verse from the standard to back up his assertion. I am cross posting this to comp.std.c where some *real* C standard guru's may be willing to comment. // Ron Guilmette (rfg@ics.uci.edu) // C++ Entomologist // Motto: If it sticks, force it. If it breaks, it needed replacing anyway.