consistency in declaration
Eric Giguere
giguere at aries5.uucp
Fri Jun 16 02:44:54 AEST 1989
In article <64 at BLEKUL11.BITNET> SAAAA04 at 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 at aries5.UWaterloo.ca "Nothing but urges from HELL!!"
More information about the Comp.lang.c
mailing list