Path: utzoo!utgpu!watmath!maytag!aries5!giguere From: giguere@aries5.uucp (Eric Giguere) Newsgroups: comp.lang.c Subject: Re: consistency in declaration Summary: not a bug Message-ID: <263@maytag.waterloo.edu> Date: 15 Jun 89 16:44:54 GMT References: <64@BLEKUL11.BITNET> Sender: daemon@maytag.waterloo.edu Reply-To: giguere@aries5.waterloo.edu (Eric Giguere) Organization: Computer Systems Group, University of Waterloo Lines: 27 In article <64@BLEKUL11.BITNET> SAAAA04@BLEKUL11.BITNET writes: >To my surprise the following happened with the waterloo C compiler (for VM/CMS) Wow! An IBM mainframe user reading this group... >it refuses: >void foo(int , int y); >but (of course) accepts: >void foo(int x, int y); >void foo(int , int); >Do I have to be consistent ? Or is this a bug in the compiler ? It's not a bug.... it's a feature. Seriously, the ANSI specs state that a function prototype can accept types or types with IDs but not both in the same declaration. So, yes, you do have to be consistent. (I should know, I spent a lot of time debugging all the ANSI stuff we put into the compiler...) Eric Giguere 268 Phillip St #CL-46 For the curious: it's French ("jee-gair") Waterloo, Ontario N2L 6G9 Bitnet : GIGUERE at WATCSG (519) 746-6565 Internet: giguere@aries5.UWaterloo.ca "Nothing but urges from HELL!!"