function prototype syntax

Henry Spencer henry at utzoo.uucp
Thu Mar 1 06:19:14 AEST 1990


In article <25EB0435.3408 at paris.ics.uci.edu> rfg at ics.uci.edu (Ronald Guilmette) writes:
>In article <9002270016.AA02978 at yamada-sun.UUCP> yamada-sun!eric at nosun.west.sun.com (Eric Hanchrow) writes:
>>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"...
>
>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 see nothing in ANSI C (Oct 88 draft) that would support such an assertion.
Unless I've missed something subtle, in a function declaration (as opposed
to a definition), the names are optional on a parameter-by-parameter basis.
Given that Microsoft -- as well as everybody else -- has been claiming
"ANSI C compatibility" based on drafts rather than a final standard, it's
possible that he and/or Microslop as a whole may have gotten this idea
from an earlier draft and missed the liberalization of the rules.  I
don't remember the history of function declarations very well, but there
may have been such a restriction at one point.
-- 
"The N in NFS stands for Not, |     Henry Spencer at U of Toronto Zoology
or Need, or perhaps Nightmare"| uunet!attcan!utzoo!henry henry at zoo.toronto.edu



More information about the Comp.std.c mailing list