Path: csiph.com!news.swapon.de!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: Tim Rentsch
Newsgroups: comp.lang.c++
Subject: Re: Inline functions and locals
Date: Mon, 25 Apr 2022 03:42:48 -0700
Organization: A noiseless patient Spider
Lines: 29
Message-ID: <86k0bd8mvr.fsf@linuxsc.com>
References: <865yqirl61.fsf@linuxsc.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: reader02.eternal-september.org; posting-host="2b2bd3060d7fb14ae545fc6b32585799"; logging-data="4133"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+oJbUbPg6EnbLBL3GVcptmuczDtvYKZ84="
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:LlaIpDVd54f9IJj2Wh7WZMXO1DY= sha1:k86g0BsFx7f9ij90n5ASAQAkNS4=
Xref: csiph.com comp.lang.c++:83714
"james...@alumni.caltech.edu" writes:
> On Monday, January 17, 2022 at 6:35:03 PM UTC-5, Tim Rentsch wrote:
>
>> James Kuyper writes:
>
> ...
>
>>> A key difference between C and C++ that is relevant to this thread is
>>> that, in C++, 'inline' is an ignorable hint that inline substitution
>>> should be performed. In C, it's an ignorable hint that "that calls to
>>> the function be as fast as possible.", with the method where by that
>>> might be achieved being unspecified.
>>
>> Note the sentence in the semantics portion of 6.7.4 of the C
>> standard that says The extent to which such suggestions are
>> effective is implementation-defined. So I think
>> "implementation-defined" is more accurate than "unspecified".
>
> "implementation-defined" behavior is unspecified behavior that an
> implementation is required to document, so both terms are correct,
> but "implementation-defined" is more specific. However, the point I
> was making was about what the standard failed to specify, so
> "unspecified" was relevant - that an implementation is required
> to document the behavior wasn't.
On the contrary, it is quite relevant. The requirement of being
documented means a developer can read the documentation and rely on
a particular behavior, and that is a huge difference.