Connecting Tech Pros Worldwide Help | Site Map

Re: No return in LONG InterlockedDecrement ( LONG *lpAddend )

Harald van =?UTF-8?b?RMSzaw==?=
Guest
 
Posts: n/a
#1: Aug 27 '08
On Thu, 28 Aug 2008 07:09:32 +1200, Ian Collins wrote:
Quote:
Willem wrote:
Quote:
>Ian Collins wrote:
[ non-void functions exiting by reaching the } ]
Quote:
Quote:
>) Which really should be a constraint violation.
>>
>constraint violations are usually restricted to things that can be
>easily checked by a compiler. Ensuring that a non-void function always
>returns a value requires code path analysis at the very least.
>>
Ensuring a non-void function has at least one return statement isn't
hard.
And what if a non-void function intentionally has no return statement,
because it's not supposed to ever return? For example, int main(void)
which starts up an otherwise infinite loop containing a conditional call
to exit()?
Closed Thread