Path: csiph.com!news.mixmin.net!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Tim Rentsch
Newsgroups: comp.std.c
Subject: Re: Function calls
Date: Wed, 04 Oct 2023 19:21:27 -0700
Organization: A noiseless patient Spider
Lines: 20
Message-ID: <86bkdddd20.fsf@linuxsc.com>
References:
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: dont-email.me; posting-host="a39e5ee1c6dfe7b41e0e8f641c3ae6d1"; logging-data="788311"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/jbNaF9w0ySKg0cLi4YpI/fNFDLZQoXA4="
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:mp1zEmbditPEfR2K0/xCFuvSHJQ= sha1:86wpVc4uNeNJujNotaM/4Dg6ZvQ=
Xref: csiph.com comp.std.c:6579
ram@zedat.fu-berlin.de (Stefan Ram) writes:
> A recent draft of the C specification says about "return":
>
> |A return statement terminates execution of the current
> |function and returns control to its caller.
>
> . There's also a section "Function calls" in a recent draft.
> I expect that this section says something similar, to the effect that
> during the evaluation of a function call, control is transferred to
> the called function, but I was not able to find such wording!
AFAICT the C standard does not say explicitly that a function
call gives or transfers control to the function being called.
It has been pointed out that the standard does say that calling
a function suspends execution of the current block.
Considering those facts, do you think there is a problem with
the current wording used in the standard? If you do, what
would you say the problem is, and why is it a problem?