YALF (yet another lint foulup)
Doug Gwyn
gwyn at smoke.BRL.MIL
Mon Jan 2 12:56:53 AEST 1989
In article <14672 at cisunx.UUCP> cmf at unix.cis.pittsburgh.edu (Carl M. Fongheiser) writes:
>In article <9228 at smoke.BRL.MIL> gwyn at brl.arpa (Doug Gwyn (VLD/VMB) <gwyn>) writes:
>>Function value type and whether a function returns are orthogonal.
>Really? I'm having a good deal of difficulty thinking of any reason why
>one would declare a function which never returns as anything other than
>void.
Where did you get the word "never"?
unsigned int Square(unsigned int n)
{ extern void exit(int);
extern void /*also nonreturning*/ Fatal(char*);
if (n >= 0x80)
Fatal("overflow in Square");
return n*n;
}
This, not entirely implausible, function sometimes returns and
sometimes doesn't. But that has nothing to do with its type.
More information about the Comp.lang.c
mailing list