Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Uncompensated overtime? Just Say No.


devel / comp.lang.c++ / Re: What does this code print ?

SubjectAuthor
* What does this code print ?Bonita Montero
`* Re: What does this code print ?Ben Bacarisse
 +* Re: What does this code print ?Kenny McCormack
 |`* Re: What does this code print ?Bonita Montero
 | +* Re: What does this code print ?Scott Lurndal
 | |+- Re: What does this code print ?Bo Persson
 | |`* Re: What does this code print ?Bonita Montero
 | | `* Re: What does this code print ?Ben Bacarisse
 | |  `- Re: What does this code print ?Bonita Montero
 | `* Re: What does this code print ?Richard Damon
 |  +- Re: What does this code print ?Scott Lurndal
 |  `* Re: What does this code print ?Bonita Montero
 |   `* Re: What does this code print ?Richard Damon
 |    `* Re: What does this code print ?Bonita Montero
 |     +- Re: What does this code print ?Chris M. Thomasson
 |     `* Re: What does this code print ?Richard Damon
 |      `- Re: What does this code print ?Chris M. Thomasson
 +- Re: What does this code print ?Bonita Montero
 +* Re: What does this code print ?Chris M. Thomasson
 |+- Re: What does this code print ?Chris M. Thomasson
 |`- Re: What does this code print ?Bonita Montero
 `* Re: What does this code print ?Chris M. Thomasson
  `* Re: What does this code print ?Bonita Montero
   +* Re: What does this code print ?Richard Damon
   |`* Re: What does this code print ?Bonita Montero
   | `* Re: What does this code print ?Richard Damon
   |  `* Re: What does this code print ?Bonita Montero
   |   `* Re: What does this code print ?Richard Damon
   |    `* Re: What does this code print ?Bonita Montero
   |     `- Re: What does this code print ?Chris M. Thomasson
   +* Re: What does this code print ?Kaz Kylheku
   |+* Re: What does this code print ?Chris M. Thomasson
   ||`* Re: What does this code print ?Kaz Kylheku
   || +- Re: What does this code print ?Chris M. Thomasson
   || `* Re: What does this code print ?Paavo Helde
   ||  `* Re: What does this code print ?Chris M. Thomasson
   ||   `* Re: What does this code print ?Kaz Kylheku
   ||    `* Re: What does this code print ?Paavo Helde
   ||     `* Re: What does this code print ?Kaz Kylheku
   ||      `* Re: What does this code print ?Chris M. Thomasson
   ||       `- Re: What does this code print ?Chris M. Thomasson
   |`* Re: What does this code print ?Bonita Montero
   | `* Re: What does this code print ?Kaz Kylheku
   |  +- Re: What does this code print ?Richard Damon
   |  `- Re: What does this code print ?Bonita Montero
   +* Re: What does this code print ?Richard Damon
   |`* Re: What does this code print ?Bonita Montero
   | +* Re: What does this code print ?Bonita Montero
   | |+* Re: What does this code print ?Bonita Montero
   | ||`* Re: What does this code print ?Richard Damon
   | || `* Re: What does this code print ?Bonita Montero
   | ||  `* Re: What does this code print ?Richard Damon
   | ||   +* Re: What does this code print ?Bonita Montero
   | ||   |`- Re: What does this code print ?Richard Damon
   | ||   `* Re: What does this code print ?Bonita Montero
   | ||    `* Re: What does this code print ?Kaz Kylheku
   | ||     `* Re: What does this code print ?Bonita Montero
   | ||      `* Re: What does this code print ?Kaz Kylheku
   | ||       +- Re: What does this code print ?Richard Damon
   | ||       `* Re: What does this code print ?Chris M. Thomasson
   | ||        `* Re: What does this code print ?Kaz Kylheku
   | ||         `* Re: What does this code print ?Bonita Montero
   | ||          +* Re: What does this code print ?Richard Damon
   | ||          |`* Re: What does this code print ?Bonita Montero
   | ||          | `* Re: What does this code print ?Richard Damon
   | ||          |  `* Re: What does this code print ?Bonita Montero
   | ||          |   `* Re: What does this code print ?Richard Damon
   | ||          |    `* Re: What does this code print ?Bonita Montero
   | ||          |     `* Re: What does this code print ?Richard Damon
   | ||          |      `* Re: What does this code print ?Bonita Montero
   | ||          |       `* Re: What does this code print ?Richard Damon
   | ||          |        `* Re: What does this code print ?Bonita Montero
   | ||          |         `* Re: What does this code print ?Richard Damon
   | ||          |          `* Re: What does this code print ?Bonita Montero
   | ||          |           +- Re: What does this code print ?Branimir Maksimovic
   | ||          |           `* Re: What does this code print ?Richard Damon
   | ||          |            `* Re: What does this code print ?Bonita Montero
   | ||          |             `* Re: What does this code print ?Richard Damon
   | ||          |              `* Re: What does this code print ?Bonita Montero
   | ||          |               +* Re: What does this code print ?Richard Damon
   | ||          |               |+* Re: What does this code print ?Bonita Montero
   | ||          |               ||+* Re: What does this code print ?Richard Damon
   | ||          |               |||`* Re: What does this code print ?Bonita Montero
   | ||          |               ||| `* Re: What does this code print ?Richard Damon
   | ||          |               |||  `* Re: What does this code print ?Bonita Montero
   | ||          |               |||   `* Re: What does this code print ?Richard Damon
   | ||          |               |||    `* Re: What does this code print ?Bonita Montero
   | ||          |               |||     `* Re: What does this code print ?Kaz Kylheku
   | ||          |               |||      `* Re: What does this code print ?Bonita Montero
   | ||          |               |||       `* Re: What does this code print ?Richard Damon
   | ||          |               |||        `- Re: What does this code print ?Bonita Montero
   | ||          |               ||`* Re: What does this code print ?Branimir Maksimovic
   | ||          |               || `- Re: What does this code print ?Bonita Montero
   | ||          |               |`* Re: What does this code print ?Scott Lurndal
   | ||          |               | `- Re: What does this code print ?Richard Damon
   | ||          |               `* Re: What does this code print ?Kaz Kylheku
   | ||          |                `- Re: What does this code print ?Bonita Montero
   | ||          `* Re: What does this code print ?Kaz Kylheku
   | ||           +* Re: What does this code print ?Bo Persson
   | ||           |`- Re: What does this code print ?Kaz Kylheku
   | ||           `* Re: What does this code print ?Bonita Montero
   | |`* Re: What does this code print ?Richard Damon
   | +* Re: What does this code print ?Scott Lurndal
   | `- Re: What does this code print ?Richard Damon
   `* Re: What does this code print ?Chris M. Thomasson

Pages:123456
Re: What does this code print ?

<20231019162423.200@kylheku.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=2212&group=comp.lang.c%2B%2B#2212

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: 864-117-...@kylheku.com (Kaz Kylheku)
Newsgroups: comp.lang.c++
Subject: Re: What does this code print ?
Date: Thu, 19 Oct 2023 23:26:42 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 40
Message-ID: <20231019162423.200@kylheku.com>
References: <ug54sf$1ki2m$1@dont-email.me> <87lec95n0t.fsf@bsb.me.uk>
<ugaeqo$2vefi$1@dont-email.me> <ugapal$31eim$1@dont-email.me>
<ugegmt$3uo8b$1@dont-email.me> <ugg33f$cf8s$3@dont-email.me>
<ugg3c2$ckp0$1@dont-email.me> <ugg3l3$cmg4$1@dont-email.me>
<ugh7s8$1k9qh$3@i2pn2.org> <ugl77t$2pe6u$2@dont-email.me>
<ugnhvc$1t8hq$1@i2pn2.org> <ugrqok$fto1$1@dont-email.me>
<20231019110532.810@kylheku.com> <ugrrh1$fto1$4@dont-email.me>
<20231019120451.638@kylheku.com> <ugs82g$j12c$2@dont-email.me>
Injection-Date: Thu, 19 Oct 2023 23:26:42 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="64bcebc3b5860e088dcc03f1303d75db";
logging-data="675223"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18KX/O0Ul+20P+lTT9oY71EJUVFIziuONQ="
User-Agent: slrn/pre1.0.4-9 (Linux)
Cancel-Lock: sha1:5drQNpVY9EtpCDSTA3Eu69x9ZrM=
 by: Kaz Kylheku - Thu, 19 Oct 2023 23:26 UTC

On 2023-10-19, Chris M. Thomasson <chris.m.thomasson.1@gmail.com> wrote:
> On 10/19/2023 12:20 PM, Kaz Kylheku wrote:
>> On 2023-10-19, Bonita Montero <Bonita.Montero@gmail.com> wrote:
>>> Am 19.10.2023 um 20:06 schrieb Kaz Kylheku:
>>>
>>>> Can you point to any documentation (MSDN?) that would give us confidence
>>>> that all which happened is a committed, robust feature that will work
>>>> across different versions of MSVC, with different code generation
>>>> options?
>>>
>>> Which option do you think would make MSVC drop the optimization barrier
>>> of volatile function pointers? The only volatile compiler option is
>>> ISO or MSVC volatile behaviour.
>>
>> Possibly, options that turn off optimization entirely, so that the barrier is not
>> considered.
>>
>> It's the wrong question. What piece of documentation specifies that
>> there is such an optimization barrier? Not just the optimization
>> barrier, but an optimization barrier that causes calling convention
>> attributes from a pointer to regenerate the called function body.
>>
>> Where did you get this belief?
>>
>> It is really weird. It similar to a situation like:
>>
>> struct foo { int x; int y } foo_obj = { 1, 2 };
>> struct bar { int y; int x };
>>
>> bar *volatile bar_ptr = (struct bar *) &foo_obj;
> ^^^^^^^^^^^^^^^^^
>
> Nasal demons regardless of volatile?

Yes; like in the original code. Calling a function through
incompatible calling conventions is (compiler-specific) nasal demons
(unless the situation is documented otherwise).

It seems like an unintended fluke that the inlining and
deinlining of the function squeezes out that problem.

Re: What does this code print ?

<ugt9lg$ue68$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=2213&group=comp.lang.c%2B%2B#2213

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Bonita.M...@gmail.com (Bonita Montero)
Newsgroups: comp.lang.c++
Subject: Re: What does this code print ?
Date: Fri, 20 Oct 2023 09:19:13 +0200
Organization: A noiseless patient Spider
Lines: 8
Message-ID: <ugt9lg$ue68$1@dont-email.me>
References: <ug54sf$1ki2m$1@dont-email.me> <87lec95n0t.fsf@bsb.me.uk>
<ugaeqo$2vefi$1@dont-email.me> <ugapal$31eim$1@dont-email.me>
<ugegmt$3uo8b$1@dont-email.me> <ugg33f$cf8s$3@dont-email.me>
<ugg3c2$ckp0$1@dont-email.me> <ugg3l3$cmg4$1@dont-email.me>
<ugh7s8$1k9qh$3@i2pn2.org> <ugl77t$2pe6u$2@dont-email.me>
<ugnhvc$1t8hq$1@i2pn2.org> <ugrqok$fto1$1@dont-email.me>
<20231019110532.810@kylheku.com> <ugrrh1$fto1$4@dont-email.me>
<20231019120451.638@kylheku.com> <ugs82g$j12c$2@dont-email.me>
<20231019162423.200@kylheku.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 20 Oct 2023 07:19:12 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="52b1ae1a8a0a70ea854bf4ae23c7cfd0";
logging-data="997576"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18tChaY7jI+ue4bHMGZk3haV3Tfz/QN0wg="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:JVuu29nu/7f7IqnwUPOpzQdFIgs=
Content-Language: de-DE
In-Reply-To: <20231019162423.200@kylheku.com>
 by: Bonita Montero - Fri, 20 Oct 2023 07:19 UTC

Am 20.10.2023 um 01:26 schrieb Kaz Kylheku:

> Yes; like in the original code. Calling a function through
> incompatible calling conventions is (compiler-specific)
> nasal demons (unless the situation is documented otherwise).

The calling convention isn't incompatible but the lambda
is compiled twice.

Re: What does this code print ?

<ugtiar$26i7n$2@i2pn2.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=2214&group=comp.lang.c%2B%2B#2214

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!.POSTED!not-for-mail
From: rich...@damon-family.org (Richard Damon)
Newsgroups: comp.lang.c++
Subject: Re: What does this code print ?
Date: Fri, 20 Oct 2023 05:47:07 -0400
Organization: i2pn2 (i2pn.org)
Message-ID: <ugtiar$26i7n$2@i2pn2.org>
References: <ug54sf$1ki2m$1@dont-email.me> <87lec95n0t.fsf@bsb.me.uk>
<ugaeqo$2vefi$1@dont-email.me> <ugapal$31eim$1@dont-email.me>
<ugegmt$3uo8b$1@dont-email.me> <ugg33f$cf8s$3@dont-email.me>
<ugg3c2$ckp0$1@dont-email.me> <ugg3l3$cmg4$1@dont-email.me>
<ugh7s8$1k9qh$3@i2pn2.org> <ugl77t$2pe6u$2@dont-email.me>
<ugnhvc$1t8hq$1@i2pn2.org> <ugrqok$fto1$1@dont-email.me>
<20231019110532.810@kylheku.com> <ugrrh1$fto1$4@dont-email.me>
<20231019120451.638@kylheku.com> <ugs82g$j12c$2@dont-email.me>
<20231019162423.200@kylheku.com> <ugt9lg$ue68$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 20 Oct 2023 09:47:07 -0000 (UTC)
Injection-Info: i2pn2.org;
logging-data="2312439"; mail-complaints-to="usenet@i2pn2.org";
posting-account="diqKR1lalukngNWEqoq9/uFtbkm5U+w3w6FQ0yesrXg";
User-Agent: Mozilla Thunderbird
Content-Language: en-US
In-Reply-To: <ugt9lg$ue68$1@dont-email.me>
 by: Richard Damon - Fri, 20 Oct 2023 09:47 UTC

On 10/20/23 3:19 AM, Bonita Montero wrote:
> Am 20.10.2023 um 01:26 schrieb Kaz Kylheku:
>
>> Yes; like in the original code. Calling a function through
>> incompatible calling conventions is (compiler-specific)
>> nasal demons (unless the situation is documented otherwise).
>
> The calling convention isn't incompatible but the lambda
> is compiled twice.

No, the compiler seems to decide to create a conversion thunk to fix the
calling convention and then includes the lambda inline in that thunk.

It "Compiled" it once into the internal coding, but generated code
twice, as it was used inline twice.

Re: What does this code print ?

<20231020074449.603@kylheku.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=2215&group=comp.lang.c%2B%2B#2215

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!rocksolid2!news.neodome.net!news.nntp4.net!news.gegeweb.eu!gegeweb.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: 864-117-...@kylheku.com (Kaz Kylheku)
Newsgroups: comp.lang.c++
Subject: Re: What does this code print ?
Date: Fri, 20 Oct 2023 14:50:17 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 36
Message-ID: <20231020074449.603@kylheku.com>
References: <ug54sf$1ki2m$1@dont-email.me> <87lec95n0t.fsf@bsb.me.uk>
<ugaeqo$2vefi$1@dont-email.me> <ugapal$31eim$1@dont-email.me>
<ugegmt$3uo8b$1@dont-email.me> <ugg33f$cf8s$3@dont-email.me>
<ugg3c2$ckp0$1@dont-email.me> <ugg3l3$cmg4$1@dont-email.me>
<ugh7s8$1k9qh$3@i2pn2.org> <ugl77t$2pe6u$2@dont-email.me>
<ugnhvc$1t8hq$1@i2pn2.org> <ugrqok$fto1$1@dont-email.me>
<20231019110532.810@kylheku.com> <ugrrh1$fto1$4@dont-email.me>
<20231019120451.638@kylheku.com> <ugs82g$j12c$2@dont-email.me>
<20231019162423.200@kylheku.com> <ugt9lg$ue68$1@dont-email.me>
Injection-Date: Fri, 20 Oct 2023 14:50:17 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="64bcebc3b5860e088dcc03f1303d75db";
logging-data="1214448"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/hu4/oLRMg4AQP9yyPScsx7sQogMgcFd8="
User-Agent: slrn/pre1.0.4-9 (Linux)
Cancel-Lock: sha1:dhg/ZTLiFfyYw4TvK7+uw7/+pk4=
 by: Kaz Kylheku - Fri, 20 Oct 2023 14:50 UTC

On 2023-10-20, Bonita Montero <Bonita.Montero@gmail.com> wrote:
> Am 20.10.2023 um 01:26 schrieb Kaz Kylheku:
>
>> Yes; like in the original code. Calling a function through
>> incompatible calling conventions is (compiler-specific)
>> nasal demons (unless the situation is documented otherwise).
>
> The calling convention isn't incompatible

Uh, yes it obviously is! The lambda is declared without any calling
conventions attributes, but the function pointer has them.

> but the lambda is compiled twice.

That has no meaning without defining your terms.

Are the tokens lexically analyzed twice?

Is the syntax parsed twice?

Or is the body of the lambda checked twice for type errors?

There is evidence that some code is generated twice.

If we have for (i = 0; i < N; i++) loop and we see four
copies of the body in the machine code, with a loop
index being incremented by 4, we don't say that
the loop body was compiled four times. There may have
been four copies of some intermediate code which got
code-generated four times.

--
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Mastodon: @Kazinator@mstdn.ca
NOTE: If you use Google Groups, I don't see you, unless you're whitelisted.

Re: What does this code print ?

<kpfl13F20fpU1@mid.individual.net>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=2216&group=comp.lang.c%2B%2B#2216

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: bo...@bo-persson.se (Bo Persson)
Newsgroups: comp.lang.c++
Subject: Re: What does this code print ?
Date: Fri, 20 Oct 2023 17:34:59 +0200
Lines: 21
Message-ID: <kpfl13F20fpU1@mid.individual.net>
References: <ug54sf$1ki2m$1@dont-email.me> <87lec95n0t.fsf@bsb.me.uk>
<ugaeqo$2vefi$1@dont-email.me> <ugapal$31eim$1@dont-email.me>
<ugegmt$3uo8b$1@dont-email.me> <ugg33f$cf8s$3@dont-email.me>
<ugg3c2$ckp0$1@dont-email.me> <ugg3l3$cmg4$1@dont-email.me>
<ugh7s8$1k9qh$3@i2pn2.org> <ugl77t$2pe6u$2@dont-email.me>
<ugnhvc$1t8hq$1@i2pn2.org> <ugrqok$fto1$1@dont-email.me>
<20231019110532.810@kylheku.com> <ugrrh1$fto1$4@dont-email.me>
<20231019120451.638@kylheku.com> <ugs82g$j12c$2@dont-email.me>
<20231019162423.200@kylheku.com> <ugt9lg$ue68$1@dont-email.me>
<20231020074449.603@kylheku.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: individual.net jOxp+kUm3CJGL4RifjG32w5fW2Bwvi9scxgByCd0lRdLw5t5T0
Cancel-Lock: sha1:8S28I3OQmhjrS8kTGbbaN0h8t4A= sha256:mwhipyRK0MIoWLWL7H0E/7q2X+NTqBvzYIh5Dj7tHwo=
User-Agent: Mozilla Thunderbird
Content-Language: sv
In-Reply-To: <20231020074449.603@kylheku.com>
 by: Bo Persson - Fri, 20 Oct 2023 15:34 UTC

On 2023-10-20 at 16:50, Kaz Kylheku wrote:
> On 2023-10-20, Bonita Montero <Bonita.Montero@gmail.com> wrote:
>> Am 20.10.2023 um 01:26 schrieb Kaz Kylheku:
>>
>>> Yes; like in the original code. Calling a function through
>>> incompatible calling conventions is (compiler-specific)
>>> nasal demons (unless the situation is documented otherwise).
>>
>> The calling convention isn't incompatible
>
> Uh, yes it obviously is! The lambda is declared without any calling
> conventions attributes, but the function pointer has them.
>

The "trick" is that MSVC in x64 mode only offers one calling convention,
so it is always the same.

The compiler assumes that the attributes are some leftovers from 32-bit
code, so they can be ignored.

Re: What does this code print ?

<ugu84s$1685u$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=2217&group=comp.lang.c%2B%2B#2217

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Bonita.M...@gmail.com (Bonita Montero)
Newsgroups: comp.lang.c++
Subject: Re: What does this code print ?
Date: Fri, 20 Oct 2023 17:59:26 +0200
Organization: A noiseless patient Spider
Lines: 8
Message-ID: <ugu84s$1685u$1@dont-email.me>
References: <ug54sf$1ki2m$1@dont-email.me> <87lec95n0t.fsf@bsb.me.uk>
<ugaeqo$2vefi$1@dont-email.me> <ugapal$31eim$1@dont-email.me>
<ugegmt$3uo8b$1@dont-email.me> <ugg33f$cf8s$3@dont-email.me>
<ugg3c2$ckp0$1@dont-email.me> <ugg3l3$cmg4$1@dont-email.me>
<ugh7s8$1k9qh$3@i2pn2.org> <ugl77t$2pe6u$2@dont-email.me>
<ugnhvc$1t8hq$1@i2pn2.org> <ugrqok$fto1$1@dont-email.me>
<20231019110532.810@kylheku.com> <ugrrh1$fto1$4@dont-email.me>
<20231019120451.638@kylheku.com> <ugs82g$j12c$2@dont-email.me>
<20231019162423.200@kylheku.com> <ugt9lg$ue68$1@dont-email.me>
<ugtiar$26i7n$2@i2pn2.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 20 Oct 2023 15:59:24 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="52b1ae1a8a0a70ea854bf4ae23c7cfd0";
logging-data="1253566"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18J1xAep/W0HNurVuHcrdxe/bkXVFOXLQU="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:74zY5Y4M3aR6UXm7OYFqFk/G8F8=
In-Reply-To: <ugtiar$26i7n$2@i2pn2.org>
Content-Language: de-DE
 by: Bonita Montero - Fri, 20 Oct 2023 15:59 UTC

Am 20.10.2023 um 11:47 schrieb Richard Damon:

> No, the compiler seems to decide to create a conversion thunk to fix the
> calling convention and then includes the lambda inline in that thunk.

No, theres no CALL inside my assembly. And for parameters which are
non-trivial objects that are on the stack this wouldn't work since
they would have to be copy-constructed; no one would accept that.

Re: What does this code print ?

<20231020085713.834@kylheku.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=2218&group=comp.lang.c%2B%2B#2218

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: 864-117-...@kylheku.com (Kaz Kylheku)
Newsgroups: comp.lang.c++
Subject: Re: What does this code print ?
Date: Fri, 20 Oct 2023 15:59:25 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 33
Message-ID: <20231020085713.834@kylheku.com>
References: <ug54sf$1ki2m$1@dont-email.me> <87lec95n0t.fsf@bsb.me.uk>
<ugaeqo$2vefi$1@dont-email.me> <ugapal$31eim$1@dont-email.me>
<ugegmt$3uo8b$1@dont-email.me> <ugg33f$cf8s$3@dont-email.me>
<ugg3c2$ckp0$1@dont-email.me> <ugg3l3$cmg4$1@dont-email.me>
<ugh7s8$1k9qh$3@i2pn2.org> <ugl77t$2pe6u$2@dont-email.me>
<ugnhvc$1t8hq$1@i2pn2.org> <ugrqok$fto1$1@dont-email.me>
<20231019110532.810@kylheku.com> <ugrrh1$fto1$4@dont-email.me>
<20231019120451.638@kylheku.com> <ugs82g$j12c$2@dont-email.me>
<20231019162423.200@kylheku.com> <ugt9lg$ue68$1@dont-email.me>
<20231020074449.603@kylheku.com> <kpfl13F20fpU1@mid.individual.net>
Injection-Date: Fri, 20 Oct 2023 15:59:25 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="64bcebc3b5860e088dcc03f1303d75db";
logging-data="1252753"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18ImY2O0B9tzVXuJHPjzRFZXFAKc/T00uc="
User-Agent: slrn/pre1.0.4-9 (Linux)
Cancel-Lock: sha1:+GM22KaOsc+K4GNMmbYLAgeU4Hs=
 by: Kaz Kylheku - Fri, 20 Oct 2023 15:59 UTC

On 2023-10-20, Bo Persson <bo@bo-persson.se> wrote:
> On 2023-10-20 at 16:50, Kaz Kylheku wrote:
>> On 2023-10-20, Bonita Montero <Bonita.Montero@gmail.com> wrote:
>>> Am 20.10.2023 um 01:26 schrieb Kaz Kylheku:
>>>
>>>> Yes; like in the original code. Calling a function through
>>>> incompatible calling conventions is (compiler-specific)
>>>> nasal demons (unless the situation is documented otherwise).
>>>
>>> The calling convention isn't incompatible
>>
>> Uh, yes it obviously is! The lambda is declared without any calling
>> conventions attributes, but the function pointer has them.
>>
>
> The "trick" is that MSVC in x64 mode only offers one calling convention,
> so it is always the same.

No, that's not it; the discussion is definitely about that code being
compiled x86 where those extensions are relevant.

The example machine language disassembly listing actually shows two
copies of the generated code, which are being called according to the
two different convntions, and access the argument accordingly: the
fastcall generation gets it from a register, whereas the stdcall gets it
from the stack.

--
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Mastodon: @Kazinator@mstdn.ca
NOTE: If you use Google Groups, I don't see you, unless you're whitelisted.

Re: What does this code print ?

<ugu879$1685u$2@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=2219&group=comp.lang.c%2B%2B#2219

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Bonita.M...@gmail.com (Bonita Montero)
Newsgroups: comp.lang.c++
Subject: Re: What does this code print ?
Date: Fri, 20 Oct 2023 18:00:43 +0200
Organization: A noiseless patient Spider
Lines: 14
Message-ID: <ugu879$1685u$2@dont-email.me>
References: <ug54sf$1ki2m$1@dont-email.me> <87lec95n0t.fsf@bsb.me.uk>
<ugaeqo$2vefi$1@dont-email.me> <ugapal$31eim$1@dont-email.me>
<ugegmt$3uo8b$1@dont-email.me> <ugg33f$cf8s$3@dont-email.me>
<ugg3c2$ckp0$1@dont-email.me> <ugg3l3$cmg4$1@dont-email.me>
<ugh7s8$1k9qh$3@i2pn2.org> <ugl77t$2pe6u$2@dont-email.me>
<ugnhvc$1t8hq$1@i2pn2.org> <ugrqok$fto1$1@dont-email.me>
<20231019110532.810@kylheku.com> <ugrrh1$fto1$4@dont-email.me>
<20231019120451.638@kylheku.com> <ugs82g$j12c$2@dont-email.me>
<20231019162423.200@kylheku.com> <ugt9lg$ue68$1@dont-email.me>
<20231020074449.603@kylheku.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 20 Oct 2023 16:00:41 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="52b1ae1a8a0a70ea854bf4ae23c7cfd0";
logging-data="1253566"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18lJ099JMCRvYod4W2PpHvgIu5UG+V9ZMU="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:a0o2OuIUaMJzznoPfxoB9J59Kw8=
Content-Language: de-DE
In-Reply-To: <20231020074449.603@kylheku.com>
 by: Bonita Montero - Fri, 20 Oct 2023 16:00 UTC

Am 20.10.2023 um 16:50 schrieb Kaz Kylheku:

> Uh, yes it obviously is! The lambda is declared without any calling
> conventions attributes, but the function pointer has them.

The lambda is compiled for each destination pointer's calling convention.

> Are the tokens lexically analyzed twice?

As I described both compiled functions to the same and share
static and thread-local variables.

Rest unread.

Re: What does this code print ?

<20231020090555.863@kylheku.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=2220&group=comp.lang.c%2B%2B#2220

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!rocksolid2!news.neodome.net!news.mixmin.net!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: 864-117-...@kylheku.com (Kaz Kylheku)
Newsgroups: comp.lang.c++
Subject: Re: What does this code print ?
Date: Fri, 20 Oct 2023 16:06:17 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 15
Message-ID: <20231020090555.863@kylheku.com>
References: <ug54sf$1ki2m$1@dont-email.me> <87lec95n0t.fsf@bsb.me.uk>
<ugaeqo$2vefi$1@dont-email.me> <ugapal$31eim$1@dont-email.me>
<ugegmt$3uo8b$1@dont-email.me> <ugg33f$cf8s$3@dont-email.me>
<ugg3c2$ckp0$1@dont-email.me> <ugg3l3$cmg4$1@dont-email.me>
<ugh7s8$1k9qh$3@i2pn2.org> <ugl77t$2pe6u$2@dont-email.me>
<ugnhvc$1t8hq$1@i2pn2.org> <ugrqok$fto1$1@dont-email.me>
<20231019110532.810@kylheku.com> <ugrrh1$fto1$4@dont-email.me>
<20231019120451.638@kylheku.com> <ugs82g$j12c$2@dont-email.me>
<20231019162423.200@kylheku.com> <ugt9lg$ue68$1@dont-email.me>
<20231020074449.603@kylheku.com> <ugu879$1685u$2@dont-email.me>
Injection-Date: Fri, 20 Oct 2023 16:06:17 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="64bcebc3b5860e088dcc03f1303d75db";
logging-data="1257596"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19+uI+WKFcPGfMsd6PQxUCpjOtnRmZ/vpo="
User-Agent: slrn/pre1.0.4-9 (Linux)
Cancel-Lock: sha1:8nGlf8YcU08dbJLkuNO4/r8y6kk=
 by: Kaz Kylheku - Fri, 20 Oct 2023 16:06 UTC

On 2023-10-20, Bonita Montero <Bonita.Montero@gmail.com> wrote:
> Am 20.10.2023 um 16:50 schrieb Kaz Kylheku:
>
>> Uh, yes it obviously is! The lambda is declared without any calling
>> conventions attributes, but the function pointer has them.
>
> The lambda is compiled for each destination pointer's calling convention.

At this point you're just stringing together computer sciency words.

--
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Mastodon: @Kazinator@mstdn.ca
NOTE: If you use Google Groups, I don't see you, unless you're whitelisted.

Re: What does this code print ?

<uguai0$16sc9$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=2221&group=comp.lang.c%2B%2B#2221

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!1.us.feeder.erje.net!2.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.mixmin.net!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Bonita.M...@gmail.com (Bonita Montero)
Newsgroups: comp.lang.c++
Subject: Re: What does this code print ?
Date: Fri, 20 Oct 2023 18:40:34 +0200
Organization: A noiseless patient Spider
Lines: 7
Message-ID: <uguai0$16sc9$1@dont-email.me>
References: <ug54sf$1ki2m$1@dont-email.me> <87lec95n0t.fsf@bsb.me.uk>
<ugaeqo$2vefi$1@dont-email.me> <ugapal$31eim$1@dont-email.me>
<ugegmt$3uo8b$1@dont-email.me> <ugg33f$cf8s$3@dont-email.me>
<ugg3c2$ckp0$1@dont-email.me> <ugg3l3$cmg4$1@dont-email.me>
<ugh7s8$1k9qh$3@i2pn2.org> <ugl77t$2pe6u$2@dont-email.me>
<ugnhvc$1t8hq$1@i2pn2.org> <ugrqok$fto1$1@dont-email.me>
<20231019110532.810@kylheku.com> <ugrrh1$fto1$4@dont-email.me>
<20231019120451.638@kylheku.com> <ugs82g$j12c$2@dont-email.me>
<20231019162423.200@kylheku.com> <ugt9lg$ue68$1@dont-email.me>
<20231020074449.603@kylheku.com> <ugu879$1685u$2@dont-email.me>
<20231020090555.863@kylheku.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 20 Oct 2023 16:40:32 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="52b1ae1a8a0a70ea854bf4ae23c7cfd0";
logging-data="1274249"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX191HoIsyfJUHPs7vLxEPFCiYLvcmjsvQ+U="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:YjNU4iIfq+qyGMqUm6uuHFEKIKg=
Content-Language: de-DE
In-Reply-To: <20231020090555.863@kylheku.com>
 by: Bonita Montero - Fri, 20 Oct 2023 16:40 UTC

Am 20.10.2023 um 18:06 schrieb Kaz Kylheku:

> At this point you're just stringing together computer sciency words.

The calling convention is part of the function pointer.

Re: What does this code print ?

<uguml4$2eo3g$1@news.xmission.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=2223&group=comp.lang.c%2B%2B#2223

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!xmission!nnrp.xmission!.POSTED.shell.xmission.com!not-for-mail
From: gaze...@shell.xmission.com (Kenny McCormack)
Newsgroups: comp.lang.c++
Subject: Re: What does this code print ?
Date: Fri, 20 Oct 2023 20:07:00 -0000 (UTC)
Organization: The official candy of the new Millennium
Message-ID: <uguml4$2eo3g$1@news.xmission.com>
References: <ug54sf$1ki2m$1@dont-email.me> <ugu879$1685u$2@dont-email.me> <20231020090555.863@kylheku.com> <uguai0$16sc9$1@dont-email.me>
Injection-Date: Fri, 20 Oct 2023 20:07:00 -0000 (UTC)
Injection-Info: news.xmission.com; posting-host="shell.xmission.com:166.70.8.4";
logging-data="2580592"; mail-complaints-to="abuse@xmission.com"
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: gazelle@shell.xmission.com (Kenny McCormack)
 by: Kenny McCormack - Fri, 20 Oct 2023 20:07 UTC

In article <uguai0$16sc9$1@dont-email.me>,
Bonita Montero <Bonita.Montero@gmail.com> wrote:
>Am 20.10.2023 um 18:06 schrieb Kaz Kylheku:
>
>> At this point you're just stringing together computer sciency words.
>
>The calling convention is part of the function pointer.
>
>

At this point you're just stringing together computer sciency words.

Quoting The Rockford Files:

We're ghosting at 9600 Kbaud.

--
It's possible that leasing office space to a Starbucks is a greater liability
in today's GOP than is hitting your mother on the head with a hammer.

Re: What does this code print ?

<ugvca1$2918j$1@i2pn2.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=2225&group=comp.lang.c%2B%2B#2225

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!.POSTED!not-for-mail
From: rich...@damon-family.org (Richard Damon)
Newsgroups: comp.lang.c++
Subject: Re: What does this code print ?
Date: Fri, 20 Oct 2023 19:16:32 -0700
Organization: i2pn2 (i2pn.org)
Message-ID: <ugvca1$2918j$1@i2pn2.org>
References: <ug54sf$1ki2m$1@dont-email.me> <87lec95n0t.fsf@bsb.me.uk>
<ugaeqo$2vefi$1@dont-email.me> <ugapal$31eim$1@dont-email.me>
<ugegmt$3uo8b$1@dont-email.me> <ugg33f$cf8s$3@dont-email.me>
<ugg3c2$ckp0$1@dont-email.me> <ugg3l3$cmg4$1@dont-email.me>
<ugh7s8$1k9qh$3@i2pn2.org> <ugl77t$2pe6u$2@dont-email.me>
<ugnhvc$1t8hq$1@i2pn2.org> <ugrqok$fto1$1@dont-email.me>
<20231019110532.810@kylheku.com> <ugrrh1$fto1$4@dont-email.me>
<20231019120451.638@kylheku.com> <ugs82g$j12c$2@dont-email.me>
<20231019162423.200@kylheku.com> <ugt9lg$ue68$1@dont-email.me>
<ugtiar$26i7n$2@i2pn2.org> <ugu84s$1685u$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 21 Oct 2023 02:16:33 -0000 (UTC)
Injection-Info: i2pn2.org;
logging-data="2393363"; mail-complaints-to="usenet@i2pn2.org";
posting-account="diqKR1lalukngNWEqoq9/uFtbkm5U+w3w6FQ0yesrXg";
User-Agent: Mozilla Thunderbird
Content-Language: en-US
In-Reply-To: <ugu84s$1685u$1@dont-email.me>
 by: Richard Damon - Sat, 21 Oct 2023 02:16 UTC

On 10/20/23 8:59 AM, Bonita Montero wrote:
> Am 20.10.2023 um 11:47 schrieb Richard Damon:
>
>> No, the compiler seems to decide to create a conversion thunk to fix
>> the calling convention and then includes the lambda inline in that thunk.
>
> No, theres no CALL inside my assembly. And for parameters which are
> non-trivial objects that are on theĀ  stack this wouldn't work since
> they would have to be copy-constructed; no one would accept that.

So, you don't understand what it means to inline code?

Or, how thunks work.

Re: What does this code print ?

<ugvpi4$1js55$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=2226&group=comp.lang.c%2B%2B#2226

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Bonita.M...@gmail.com (Bonita Montero)
Newsgroups: comp.lang.c++
Subject: Re: What does this code print ?
Date: Sat, 21 Oct 2023 08:02:47 +0200
Organization: A noiseless patient Spider
Lines: 6
Message-ID: <ugvpi4$1js55$1@dont-email.me>
References: <ug54sf$1ki2m$1@dont-email.me> <87lec95n0t.fsf@bsb.me.uk>
<ugaeqo$2vefi$1@dont-email.me> <ugapal$31eim$1@dont-email.me>
<ugegmt$3uo8b$1@dont-email.me> <ugg33f$cf8s$3@dont-email.me>
<ugg3c2$ckp0$1@dont-email.me> <ugg3l3$cmg4$1@dont-email.me>
<ugh7s8$1k9qh$3@i2pn2.org> <ugl77t$2pe6u$2@dont-email.me>
<ugnhvc$1t8hq$1@i2pn2.org> <ugrqok$fto1$1@dont-email.me>
<20231019110532.810@kylheku.com> <ugrrh1$fto1$4@dont-email.me>
<20231019120451.638@kylheku.com> <ugs82g$j12c$2@dont-email.me>
<20231019162423.200@kylheku.com> <ugt9lg$ue68$1@dont-email.me>
<ugtiar$26i7n$2@i2pn2.org> <ugu84s$1685u$1@dont-email.me>
<ugvca1$2918j$1@i2pn2.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 21 Oct 2023 06:02:44 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="0fd5b4d5e9f2566d18d7dba48cef1e60";
logging-data="1700005"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19M9XA8xUS3Fv9v9KW+GeGO/b/D8bm9w3g="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:7oPq2sydOtBnhK0NPKBwHQujElo=
In-Reply-To: <ugvca1$2918j$1@i2pn2.org>
Content-Language: de-DE
 by: Bonita Montero - Sat, 21 Oct 2023 06:02 UTC

Am 21.10.2023 um 04:16 schrieb Richard Damon:

> So, you don't understand what it means to inline code?

I've described why the "invoker" can never be a separate function.

Re: What does this code print ?

<ugvpke$1jsdj$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=2227&group=comp.lang.c%2B%2B#2227

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Bonita.M...@gmail.com (Bonita Montero)
Newsgroups: comp.lang.c++
Subject: Re: What does this code print ?
Date: Sat, 21 Oct 2023 08:04:00 +0200
Organization: A noiseless patient Spider
Lines: 18
Message-ID: <ugvpke$1jsdj$1@dont-email.me>
References: <ug54sf$1ki2m$1@dont-email.me> <ugu879$1685u$2@dont-email.me>
<20231020090555.863@kylheku.com> <uguai0$16sc9$1@dont-email.me>
<uguml4$2eo3g$1@news.xmission.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 21 Oct 2023 06:03:58 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="0fd5b4d5e9f2566d18d7dba48cef1e60";
logging-data="1700275"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19nVjybnWkfv0m94L4BRcAYF27asbdR6G8="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:W21j+Exl+qZZOeelvXq207zrn7U=
In-Reply-To: <uguml4$2eo3g$1@news.xmission.com>
Content-Language: de-DE
 by: Bonita Montero - Sat, 21 Oct 2023 06:04 UTC

Am 20.10.2023 um 22:07 schrieb Kenny McCormack:

> In article <uguai0$16sc9$1@dont-email.me>,

> Bonita Montero <Bonita.Montero@gmail.com> wrote:

>> The calling convention is part of the function pointer.

> At this point you're just stringing together computer sciency words.
> Quoting The Rockford Files:

Look at this:

int (__fastcall *volatile pFnFastcall)( int ) = lambda;
int (__stdcall *volatile pFnStdcall)( int ) = lambda;

This are functin pointers with separate calling conventions.

Re: What does this code print ?

<uh0r9b$2b12n$2@i2pn2.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=2228&group=comp.lang.c%2B%2B#2228

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!.POSTED!not-for-mail
From: rich...@damon-family.org (Richard Damon)
Newsgroups: comp.lang.c++
Subject: Re: What does this code print ?
Date: Sat, 21 Oct 2023 08:38:18 -0700
Organization: i2pn2 (i2pn.org)
Message-ID: <uh0r9b$2b12n$2@i2pn2.org>
References: <ug54sf$1ki2m$1@dont-email.me> <87lec95n0t.fsf@bsb.me.uk>
<ugaeqo$2vefi$1@dont-email.me> <ugapal$31eim$1@dont-email.me>
<ugegmt$3uo8b$1@dont-email.me> <ugg33f$cf8s$3@dont-email.me>
<ugg3c2$ckp0$1@dont-email.me> <ugg3l3$cmg4$1@dont-email.me>
<ugh7s8$1k9qh$3@i2pn2.org> <ugl77t$2pe6u$2@dont-email.me>
<ugnhvc$1t8hq$1@i2pn2.org> <ugrqok$fto1$1@dont-email.me>
<20231019110532.810@kylheku.com> <ugrrh1$fto1$4@dont-email.me>
<20231019120451.638@kylheku.com> <ugs82g$j12c$2@dont-email.me>
<20231019162423.200@kylheku.com> <ugt9lg$ue68$1@dont-email.me>
<ugtiar$26i7n$2@i2pn2.org> <ugu84s$1685u$1@dont-email.me>
<ugvca1$2918j$1@i2pn2.org> <ugvpi4$1js55$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 21 Oct 2023 15:38:19 -0000 (UTC)
Injection-Info: i2pn2.org;
logging-data="2458711"; mail-complaints-to="usenet@i2pn2.org";
posting-account="diqKR1lalukngNWEqoq9/uFtbkm5U+w3w6FQ0yesrXg";
User-Agent: Mozilla Thunderbird
In-Reply-To: <ugvpi4$1js55$1@dont-email.me>
Content-Language: en-US
 by: Richard Damon - Sat, 21 Oct 2023 15:38 UTC

On 10/20/23 11:02 PM, Bonita Montero wrote:
> Am 21.10.2023 um 04:16 schrieb Richard Damon:
>
>> So, you don't understand what it means to inline code?
>
> I've described why the "invoker" can never be a separate function.
>

Its "called" by the code, so it IS a "function" at the assembly level.

Why do you disagree with clear facts?

Have you tried doing the same thing with a function that can not be
inlined?

Re: What does this code print ?

<uh12dd$1sgmt$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=2229&group=comp.lang.c%2B%2B#2229

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Bonita.M...@gmail.com (Bonita Montero)
Newsgroups: comp.lang.c++
Subject: Re: What does this code print ?
Date: Sat, 21 Oct 2023 19:40:00 +0200
Organization: A noiseless patient Spider
Lines: 7
Message-ID: <uh12dd$1sgmt$1@dont-email.me>
References: <ug54sf$1ki2m$1@dont-email.me> <87lec95n0t.fsf@bsb.me.uk>
<ugaeqo$2vefi$1@dont-email.me> <ugapal$31eim$1@dont-email.me>
<ugegmt$3uo8b$1@dont-email.me> <ugg33f$cf8s$3@dont-email.me>
<ugg3c2$ckp0$1@dont-email.me> <ugg3l3$cmg4$1@dont-email.me>
<ugh7s8$1k9qh$3@i2pn2.org> <ugl77t$2pe6u$2@dont-email.me>
<ugnhvc$1t8hq$1@i2pn2.org> <ugrqok$fto1$1@dont-email.me>
<20231019110532.810@kylheku.com> <ugrrh1$fto1$4@dont-email.me>
<20231019120451.638@kylheku.com> <ugs82g$j12c$2@dont-email.me>
<20231019162423.200@kylheku.com> <ugt9lg$ue68$1@dont-email.me>
<ugtiar$26i7n$2@i2pn2.org> <ugu84s$1685u$1@dont-email.me>
<ugvca1$2918j$1@i2pn2.org> <ugvpi4$1js55$1@dont-email.me>
<uh0r9b$2b12n$2@i2pn2.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 21 Oct 2023 17:39:57 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="0fd5b4d5e9f2566d18d7dba48cef1e60";
logging-data="1983197"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+KipeoJ7QtMlsXJBA82DOTWnC+BTw/WLE="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:+//xOpjj0WjTQFlc9uJz9QgV/kc=
Content-Language: de-DE
In-Reply-To: <uh0r9b$2b12n$2@i2pn2.org>
 by: Bonita Montero - Sat, 21 Oct 2023 17:40 UTC

Am 21.10.2023 um 17:38 schrieb Richard Damon:

> Its "called" by the code, so it IS a "function" at the assembly level.

Non-trivial objects would have to be copied, so this "invoker"
always inlines.

Re: What does this code print ?

<uh138s$2b7av$2@i2pn2.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=2230&group=comp.lang.c%2B%2B#2230

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!.POSTED!not-for-mail
From: rich...@damon-family.org (Richard Damon)
Newsgroups: comp.lang.c++
Subject: Re: What does this code print ?
Date: Sat, 21 Oct 2023 10:54:34 -0700
Organization: i2pn2 (i2pn.org)
Message-ID: <uh138s$2b7av$2@i2pn2.org>
References: <ug54sf$1ki2m$1@dont-email.me> <87lec95n0t.fsf@bsb.me.uk>
<ugaeqo$2vefi$1@dont-email.me> <ugapal$31eim$1@dont-email.me>
<ugegmt$3uo8b$1@dont-email.me> <ugg33f$cf8s$3@dont-email.me>
<ugg3c2$ckp0$1@dont-email.me> <ugg3l3$cmg4$1@dont-email.me>
<ugh7s8$1k9qh$3@i2pn2.org> <ugl77t$2pe6u$2@dont-email.me>
<ugnhvc$1t8hq$1@i2pn2.org> <ugrqok$fto1$1@dont-email.me>
<20231019110532.810@kylheku.com> <ugrrh1$fto1$4@dont-email.me>
<20231019120451.638@kylheku.com> <ugs82g$j12c$2@dont-email.me>
<20231019162423.200@kylheku.com> <ugt9lg$ue68$1@dont-email.me>
<ugtiar$26i7n$2@i2pn2.org> <ugu84s$1685u$1@dont-email.me>
<ugvca1$2918j$1@i2pn2.org> <ugvpi4$1js55$1@dont-email.me>
<uh0r9b$2b12n$2@i2pn2.org> <uh12dd$1sgmt$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 21 Oct 2023 17:54:36 -0000 (UTC)
Injection-Info: i2pn2.org;
logging-data="2465119"; mail-complaints-to="usenet@i2pn2.org";
posting-account="diqKR1lalukngNWEqoq9/uFtbkm5U+w3w6FQ0yesrXg";
User-Agent: Mozilla Thunderbird
In-Reply-To: <uh12dd$1sgmt$1@dont-email.me>
Content-Language: en-US
 by: Richard Damon - Sat, 21 Oct 2023 17:54 UTC

On 10/21/23 10:40 AM, Bonita Montero wrote:
> Am 21.10.2023 um 17:38 schrieb Richard Damon:
>
>> Its "called" by the code, so it IS a "function" at the assembly level.
>
> Non-trivial objects would have to be copied, so this "invoker"
> always inlines.
>

WHAT non-trival objects? Your example only has ints

Also, tail call elimination can often get rid of some of the copies.

Re: What does this code print ?

<uh15j2$1t8j1$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=2231&group=comp.lang.c%2B%2B#2231

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Bonita.M...@gmail.com (Bonita Montero)
Newsgroups: comp.lang.c++
Subject: Re: What does this code print ?
Date: Sat, 21 Oct 2023 20:34:13 +0200
Organization: A noiseless patient Spider
Lines: 14
Message-ID: <uh15j2$1t8j1$1@dont-email.me>
References: <ug54sf$1ki2m$1@dont-email.me> <87lec95n0t.fsf@bsb.me.uk>
<ugaeqo$2vefi$1@dont-email.me> <ugapal$31eim$1@dont-email.me>
<ugegmt$3uo8b$1@dont-email.me> <ugg33f$cf8s$3@dont-email.me>
<ugg3c2$ckp0$1@dont-email.me> <ugg3l3$cmg4$1@dont-email.me>
<ugh7s8$1k9qh$3@i2pn2.org> <ugl77t$2pe6u$2@dont-email.me>
<ugnhvc$1t8hq$1@i2pn2.org> <ugrqok$fto1$1@dont-email.me>
<20231019110532.810@kylheku.com> <ugrrh1$fto1$4@dont-email.me>
<20231019120451.638@kylheku.com> <ugs82g$j12c$2@dont-email.me>
<20231019162423.200@kylheku.com> <ugt9lg$ue68$1@dont-email.me>
<ugtiar$26i7n$2@i2pn2.org> <ugu84s$1685u$1@dont-email.me>
<ugvca1$2918j$1@i2pn2.org> <ugvpi4$1js55$1@dont-email.me>
<uh0r9b$2b12n$2@i2pn2.org> <uh12dd$1sgmt$1@dont-email.me>
<uh138s$2b7av$2@i2pn2.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 21 Oct 2023 18:34:11 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="0fd5b4d5e9f2566d18d7dba48cef1e60";
logging-data="2007649"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+JQ+/FkDqKzQGVwo4gU6sQoI7NWhCo4Kg="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:r+XaNkdj2A9WEfXhhsNKyMz4waw=
In-Reply-To: <uh138s$2b7av$2@i2pn2.org>
Content-Language: de-DE
 by: Bonita Montero - Sat, 21 Oct 2023 18:34 UTC

Am 21.10.2023 um 19:54 schrieb Richard Damon:

> WHAT non-trival objects? Your example only has ints

I wanted to describe why the "invoker" nearly every time must inline
the lambda because non-trivial objects from the stack couldn't be
copied. I guess MSVC never does that so the name invoker is misleading.

> Also, tail call elimination can often get rid of some of the copies.

Call tail elimination doesn't work if you have different distribution
of parameters on the stack and in the registers.

Re: What does this code print ?

<uh19ot$2b7au$5@i2pn2.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=2232&group=comp.lang.c%2B%2B#2232

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!.POSTED!not-for-mail
From: rich...@damon-family.org (Richard Damon)
Newsgroups: comp.lang.c++
Subject: Re: What does this code print ?
Date: Sat, 21 Oct 2023 12:45:33 -0700
Organization: i2pn2 (i2pn.org)
Message-ID: <uh19ot$2b7au$5@i2pn2.org>
References: <ug54sf$1ki2m$1@dont-email.me> <87lec95n0t.fsf@bsb.me.uk>
<ugaeqo$2vefi$1@dont-email.me> <ugapal$31eim$1@dont-email.me>
<ugegmt$3uo8b$1@dont-email.me> <ugg33f$cf8s$3@dont-email.me>
<ugg3c2$ckp0$1@dont-email.me> <ugg3l3$cmg4$1@dont-email.me>
<ugh7s8$1k9qh$3@i2pn2.org> <ugl77t$2pe6u$2@dont-email.me>
<ugnhvc$1t8hq$1@i2pn2.org> <ugrqok$fto1$1@dont-email.me>
<20231019110532.810@kylheku.com> <ugrrh1$fto1$4@dont-email.me>
<20231019120451.638@kylheku.com> <ugs82g$j12c$2@dont-email.me>
<20231019162423.200@kylheku.com> <ugt9lg$ue68$1@dont-email.me>
<ugtiar$26i7n$2@i2pn2.org> <ugu84s$1685u$1@dont-email.me>
<ugvca1$2918j$1@i2pn2.org> <ugvpi4$1js55$1@dont-email.me>
<uh0r9b$2b12n$2@i2pn2.org> <uh12dd$1sgmt$1@dont-email.me>
<uh138s$2b7av$2@i2pn2.org> <uh15j2$1t8j1$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 21 Oct 2023 19:45:35 -0000 (UTC)
Injection-Info: i2pn2.org;
logging-data="2465118"; mail-complaints-to="usenet@i2pn2.org";
posting-account="diqKR1lalukngNWEqoq9/uFtbkm5U+w3w6FQ0yesrXg";
User-Agent: Mozilla Thunderbird
In-Reply-To: <uh15j2$1t8j1$1@dont-email.me>
Content-Language: en-US
 by: Richard Damon - Sat, 21 Oct 2023 19:45 UTC

On 10/21/23 11:34 AM, Bonita Montero wrote:
> Am 21.10.2023 um 19:54 schrieb Richard Damon:
>
>> WHAT non-trival objects? Your example only has ints
>
> I wanted to describe why the "invoker" nearly every time must inline
> the lambda because non-trivial objects from the stack couldn't be
> copied. I guess MSVC never does that so the name invoker is misleading.
>
>> Also, tail call elimination can often get rid of some of the copies.
>
> Call tail elimination doesn't work if you have different distribution
> of parameters on the stack and in the registers.
>
>

But in this case it made it work! so you are wrong.

Re: What does this code print ?

<uh20qf$2705q$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=2233&group=comp.lang.c%2B%2B#2233

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Bonita.M...@gmail.com (Bonita Montero)
Newsgroups: comp.lang.c++
Subject: Re: What does this code print ?
Date: Sun, 22 Oct 2023 04:18:57 +0200
Organization: A noiseless patient Spider
Lines: 6
Message-ID: <uh20qf$2705q$1@dont-email.me>
References: <ug54sf$1ki2m$1@dont-email.me> <87lec95n0t.fsf@bsb.me.uk>
<ugaeqo$2vefi$1@dont-email.me> <ugapal$31eim$1@dont-email.me>
<ugegmt$3uo8b$1@dont-email.me> <ugg33f$cf8s$3@dont-email.me>
<ugg3c2$ckp0$1@dont-email.me> <ugg3l3$cmg4$1@dont-email.me>
<ugh7s8$1k9qh$3@i2pn2.org> <ugl77t$2pe6u$2@dont-email.me>
<ugnhvc$1t8hq$1@i2pn2.org> <ugrqok$fto1$1@dont-email.me>
<20231019110532.810@kylheku.com> <ugrrh1$fto1$4@dont-email.me>
<20231019120451.638@kylheku.com> <ugs82g$j12c$2@dont-email.me>
<20231019162423.200@kylheku.com> <ugt9lg$ue68$1@dont-email.me>
<ugtiar$26i7n$2@i2pn2.org> <ugu84s$1685u$1@dont-email.me>
<ugvca1$2918j$1@i2pn2.org> <ugvpi4$1js55$1@dont-email.me>
<uh0r9b$2b12n$2@i2pn2.org> <uh12dd$1sgmt$1@dont-email.me>
<uh138s$2b7av$2@i2pn2.org> <uh15j2$1t8j1$1@dont-email.me>
<uh19ot$2b7au$5@i2pn2.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 22 Oct 2023 02:18:55 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="64430bc9b83b089855dcf86ee6115553";
logging-data="2326714"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+WUo0RDvZz1WPfhejVDNfJUDSdZuTsWuk="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:iEq+1frqT0ukgeDn4afcIPh8Oxw=
In-Reply-To: <uh19ot$2b7au$5@i2pn2.org>
Content-Language: de-DE
 by: Bonita Montero - Sun, 22 Oct 2023 02:18 UTC

Am 21.10.2023 um 21:45 schrieb Richard Damon:

> But in this case it made it work! so you are wrong.

It may work, but actually there's no real "invoker".

Re: What does this code print ?

<uh21ct$2ck19$1@i2pn2.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=2234&group=comp.lang.c%2B%2B#2234

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!.POSTED!not-for-mail
From: rich...@damon-family.org (Richard Damon)
Newsgroups: comp.lang.c++
Subject: Re: What does this code print ?
Date: Sat, 21 Oct 2023 19:28:45 -0700
Organization: i2pn2 (i2pn.org)
Message-ID: <uh21ct$2ck19$1@i2pn2.org>
References: <ug54sf$1ki2m$1@dont-email.me> <87lec95n0t.fsf@bsb.me.uk>
<ugaeqo$2vefi$1@dont-email.me> <ugapal$31eim$1@dont-email.me>
<ugegmt$3uo8b$1@dont-email.me> <ugg33f$cf8s$3@dont-email.me>
<ugg3c2$ckp0$1@dont-email.me> <ugg3l3$cmg4$1@dont-email.me>
<ugh7s8$1k9qh$3@i2pn2.org> <ugl77t$2pe6u$2@dont-email.me>
<ugnhvc$1t8hq$1@i2pn2.org> <ugrqok$fto1$1@dont-email.me>
<20231019110532.810@kylheku.com> <ugrrh1$fto1$4@dont-email.me>
<20231019120451.638@kylheku.com> <ugs82g$j12c$2@dont-email.me>
<20231019162423.200@kylheku.com> <ugt9lg$ue68$1@dont-email.me>
<ugtiar$26i7n$2@i2pn2.org> <ugu84s$1685u$1@dont-email.me>
<ugvca1$2918j$1@i2pn2.org> <ugvpi4$1js55$1@dont-email.me>
<uh0r9b$2b12n$2@i2pn2.org> <uh12dd$1sgmt$1@dont-email.me>
<uh138s$2b7av$2@i2pn2.org> <uh15j2$1t8j1$1@dont-email.me>
<uh19ot$2b7au$5@i2pn2.org> <uh20qf$2705q$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 22 Oct 2023 02:28:45 -0000 (UTC)
Injection-Info: i2pn2.org;
logging-data="2510889"; mail-complaints-to="usenet@i2pn2.org";
posting-account="diqKR1lalukngNWEqoq9/uFtbkm5U+w3w6FQ0yesrXg";
User-Agent: Mozilla Thunderbird
Content-Language: en-US
In-Reply-To: <uh20qf$2705q$1@dont-email.me>
 by: Richard Damon - Sun, 22 Oct 2023 02:28 UTC

On 10/21/23 7:18 PM, Bonita Montero wrote:
> Am 21.10.2023 um 21:45 schrieb Richard Damon:
>
>> But in this case it made it work! so you are wrong.
>
> It may work, but actually there's no real "invoker".
>

Then why was the symbol called an "invoker"?

Re: What does this code print ?

<uh29t3$28g3k$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=2235&group=comp.lang.c%2B%2B#2235

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Bonita.M...@gmail.com (Bonita Montero)
Newsgroups: comp.lang.c++
Subject: Re: What does this code print ?
Date: Sun, 22 Oct 2023 06:53:58 +0200
Organization: A noiseless patient Spider
Lines: 13
Message-ID: <uh29t3$28g3k$1@dont-email.me>
References: <ug54sf$1ki2m$1@dont-email.me> <87lec95n0t.fsf@bsb.me.uk>
<ugaeqo$2vefi$1@dont-email.me> <ugapal$31eim$1@dont-email.me>
<ugegmt$3uo8b$1@dont-email.me> <ugg33f$cf8s$3@dont-email.me>
<ugg3c2$ckp0$1@dont-email.me> <ugg3l3$cmg4$1@dont-email.me>
<ugh7s8$1k9qh$3@i2pn2.org> <ugl77t$2pe6u$2@dont-email.me>
<ugnhvc$1t8hq$1@i2pn2.org> <ugrqok$fto1$1@dont-email.me>
<20231019110532.810@kylheku.com> <ugrrh1$fto1$4@dont-email.me>
<20231019120451.638@kylheku.com> <ugs82g$j12c$2@dont-email.me>
<20231019162423.200@kylheku.com> <ugt9lg$ue68$1@dont-email.me>
<ugtiar$26i7n$2@i2pn2.org> <ugu84s$1685u$1@dont-email.me>
<ugvca1$2918j$1@i2pn2.org> <ugvpi4$1js55$1@dont-email.me>
<uh0r9b$2b12n$2@i2pn2.org> <uh12dd$1sgmt$1@dont-email.me>
<uh138s$2b7av$2@i2pn2.org> <uh15j2$1t8j1$1@dont-email.me>
<uh19ot$2b7au$5@i2pn2.org> <uh20qf$2705q$1@dont-email.me>
<uh21ct$2ck19$1@i2pn2.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 22 Oct 2023 04:53:55 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="64430bc9b83b089855dcf86ee6115553";
logging-data="2375796"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/Ki4ACZkYRc0dAehzKSpmwg5Z2s1GC2Y0="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:idcN1tJgXp6vbCJHVs2TyQNPLPY=
In-Reply-To: <uh21ct$2ck19$1@i2pn2.org>
Content-Language: de-DE
 by: Bonita Montero - Sun, 22 Oct 2023 04:53 UTC

Am 22.10.2023 um 04:28 schrieb Richard Damon:
> On 10/21/23 7:18 PM, Bonita Montero wrote:
>> Am 21.10.2023 um 21:45 schrieb Richard Damon:
>>
>>> But in this case it made it work! so you are wrong.
>>
>> It may work, but actually there's no real "invoker".
>>
>
> Then why was the symbol called an "invoker"?

The lambda can have an arbitrary size, it is always inlined.

Re: What does this code print ?

<lo6ZM.150272$2fS.31013@fx16.iad>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=2236&group=comp.lang.c%2B%2B#2236

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx16.iad.POSTED!not-for-mail
Newsgroups: comp.lang.c++
From: branimir...@icloud.com (Branimir Maksimovic)
Subject: Re: What does this code print ?
References: <ug54sf$1ki2m$1@dont-email.me> <87lec95n0t.fsf@bsb.me.uk>
<ugaeqo$2vefi$1@dont-email.me> <ugapal$31eim$1@dont-email.me>
<ugegmt$3uo8b$1@dont-email.me> <ugg33f$cf8s$3@dont-email.me>
<ugg3c2$ckp0$1@dont-email.me> <ugg3l3$cmg4$1@dont-email.me>
<ugh7s8$1k9qh$3@i2pn2.org> <ugl77t$2pe6u$2@dont-email.me>
<ugnhvc$1t8hq$1@i2pn2.org> <ugrqok$fto1$1@dont-email.me>
<20231019110532.810@kylheku.com> <ugrrh1$fto1$4@dont-email.me>
<20231019120451.638@kylheku.com> <ugs82g$j12c$2@dont-email.me>
<20231019162423.200@kylheku.com> <ugt9lg$ue68$1@dont-email.me>
<ugtiar$26i7n$2@i2pn2.org> <ugu84s$1685u$1@dont-email.me>
<ugvca1$2918j$1@i2pn2.org> <ugvpi4$1js55$1@dont-email.me>
<uh0r9b$2b12n$2@i2pn2.org> <uh12dd$1sgmt$1@dont-email.me>
<uh138s$2b7av$2@i2pn2.org> <uh15j2$1t8j1$1@dont-email.me>
<uh19ot$2b7au$5@i2pn2.org> <uh20qf$2705q$1@dont-email.me>
<uh21ct$2ck19$1@i2pn2.org> <uh29t3$28g3k$1@dont-email.me>
User-Agent: slrn/1.0.3 (Darwin)
Lines: 20
Message-ID: <lo6ZM.150272$2fS.31013@fx16.iad>
X-Complaints-To: abuse@usenet-news.net
NNTP-Posting-Date: Sun, 22 Oct 2023 09:59:45 UTC
Organization: usenet-news.net
Date: Sun, 22 Oct 2023 09:59:45 GMT
X-Received-Bytes: 1946
 by: Branimir Maksimovic - Sun, 22 Oct 2023 09:59 UTC

On 2023-10-22, Bonita Montero <Bonita.Montero@gmail.com> wrote:
> Am 22.10.2023 um 04:28 schrieb Richard Damon:
>> On 10/21/23 7:18 PM, Bonita Montero wrote:
>>> Am 21.10.2023 um 21:45 schrieb Richard Damon:
>>>
>>>> But in this case it made it work! so you are wrong.
>>>
>>> It may work, but actually there's no real "invoker".
>>>
>>
>> Then why was the symbol called an "invoker"?
>
> The lambda can have an arbitrary size, it is always inlined.
>
I don't think so...

--

7-77-777, Evil Sinner!
https://www.linkedin.com/in/branimir-maksimovic-6762bbaa/

Re: What does this code print ?

<uh3al6$2ck18$1@i2pn2.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=2237&group=comp.lang.c%2B%2B#2237

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!.POSTED!not-for-mail
From: rich...@damon-family.org (Richard Damon)
Newsgroups: comp.lang.c++
Subject: Re: What does this code print ?
Date: Sun, 22 Oct 2023 07:12:54 -0700
Organization: i2pn2 (i2pn.org)
Message-ID: <uh3al6$2ck18$1@i2pn2.org>
References: <ug54sf$1ki2m$1@dont-email.me> <87lec95n0t.fsf@bsb.me.uk>
<ugaeqo$2vefi$1@dont-email.me> <ugapal$31eim$1@dont-email.me>
<ugegmt$3uo8b$1@dont-email.me> <ugg33f$cf8s$3@dont-email.me>
<ugg3c2$ckp0$1@dont-email.me> <ugg3l3$cmg4$1@dont-email.me>
<ugh7s8$1k9qh$3@i2pn2.org> <ugl77t$2pe6u$2@dont-email.me>
<ugnhvc$1t8hq$1@i2pn2.org> <ugrqok$fto1$1@dont-email.me>
<20231019110532.810@kylheku.com> <ugrrh1$fto1$4@dont-email.me>
<20231019120451.638@kylheku.com> <ugs82g$j12c$2@dont-email.me>
<20231019162423.200@kylheku.com> <ugt9lg$ue68$1@dont-email.me>
<ugtiar$26i7n$2@i2pn2.org> <ugu84s$1685u$1@dont-email.me>
<ugvca1$2918j$1@i2pn2.org> <ugvpi4$1js55$1@dont-email.me>
<uh0r9b$2b12n$2@i2pn2.org> <uh12dd$1sgmt$1@dont-email.me>
<uh138s$2b7av$2@i2pn2.org> <uh15j2$1t8j1$1@dont-email.me>
<uh19ot$2b7au$5@i2pn2.org> <uh20qf$2705q$1@dont-email.me>
<uh21ct$2ck19$1@i2pn2.org> <uh29t3$28g3k$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 22 Oct 2023 14:12:55 -0000 (UTC)
Injection-Info: i2pn2.org;
logging-data="2510888"; mail-complaints-to="usenet@i2pn2.org";
posting-account="diqKR1lalukngNWEqoq9/uFtbkm5U+w3w6FQ0yesrXg";
User-Agent: Mozilla Thunderbird
In-Reply-To: <uh29t3$28g3k$1@dont-email.me>
Content-Language: en-US
 by: Richard Damon - Sun, 22 Oct 2023 14:12 UTC

On 10/21/23 9:53 PM, Bonita Montero wrote:
> Am 22.10.2023 um 04:28 schrieb Richard Damon:
>> On 10/21/23 7:18 PM, Bonita Montero wrote:
>>> Am 21.10.2023 um 21:45 schrieb Richard Damon:
>>>
>>>> But in this case it made it work! so you are wrong.
>>>
>>> It may work, but actually there's no real "invoker".
>>>
>>
>> Then why was the symbol called an "invoker"?
>
> The lambda can have an arbitrary size, it is always inlined.
>

Your lambda has a fixed code, not arbitrary size.

In fact, it is likely that it was because your particular lambda was
small, that it was made to be inline.

Lambdas define a function object, which can be created inline or out of
line.

Re: What does this code print ?

<uh694p$38uv3$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=2240&group=comp.lang.c%2B%2B#2240

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!rocksolid2!news.neodome.net!news.mixmin.net!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Bonita.M...@gmail.com (Bonita Montero)
Newsgroups: comp.lang.c++
Subject: Re: What does this code print ?
Date: Mon, 23 Oct 2023 19:05:29 +0200
Organization: A noiseless patient Spider
Lines: 25
Message-ID: <uh694p$38uv3$1@dont-email.me>
References: <ug54sf$1ki2m$1@dont-email.me> <87lec95n0t.fsf@bsb.me.uk>
<ugaeqo$2vefi$1@dont-email.me> <ugapal$31eim$1@dont-email.me>
<ugegmt$3uo8b$1@dont-email.me> <ugg33f$cf8s$3@dont-email.me>
<ugg3c2$ckp0$1@dont-email.me> <ugg3l3$cmg4$1@dont-email.me>
<ugh7s8$1k9qh$3@i2pn2.org> <ugl77t$2pe6u$2@dont-email.me>
<ugnhvc$1t8hq$1@i2pn2.org> <ugrqok$fto1$1@dont-email.me>
<20231019110532.810@kylheku.com> <ugrrh1$fto1$4@dont-email.me>
<20231019120451.638@kylheku.com> <ugs82g$j12c$2@dont-email.me>
<20231019162423.200@kylheku.com> <ugt9lg$ue68$1@dont-email.me>
<ugtiar$26i7n$2@i2pn2.org> <ugu84s$1685u$1@dont-email.me>
<ugvca1$2918j$1@i2pn2.org> <ugvpi4$1js55$1@dont-email.me>
<uh0r9b$2b12n$2@i2pn2.org> <uh12dd$1sgmt$1@dont-email.me>
<uh138s$2b7av$2@i2pn2.org> <uh15j2$1t8j1$1@dont-email.me>
<uh19ot$2b7au$5@i2pn2.org> <uh20qf$2705q$1@dont-email.me>
<uh21ct$2ck19$1@i2pn2.org> <uh29t3$28g3k$1@dont-email.me>
<uh3al6$2ck18$1@i2pn2.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 23 Oct 2023 17:05:29 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="6b62e23bac433cdb30572d361093fc7f";
logging-data="3439587"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18zipYzV1FB31WbbkMnwjrQG3+3VwZGuus="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:3unqfRazsRyE4EbAG5lKhvhlcNc=
In-Reply-To: <uh3al6$2ck18$1@i2pn2.org>
Content-Language: de-DE
 by: Bonita Montero - Mon, 23 Oct 2023 17:05 UTC

Am 22.10.2023 um 16:12 schrieb Richard Damon:

> On 10/21/23 9:53 PM, Bonita Montero wrote:

>> The lambda can have an arbitrary size, it is always inlined.

> Your lambda has a fixed code, not arbitrary size.

What I wanted to say is that the lambda's size can be arbitrary
without having s separate invoker.

> In fact, it is likely that it was because your particular lambda was
> small, that it was made to be inline.

I did my own index_sequence<...> vs. function-object loop-unrolling
with 1'000 increments of an atomic_char inside the lambda; it was
still inlined.

> Lambdas define a function object, which can be created inline or out of
> line.

The calling operator of a lambda is inline if it is mutable or
const inline if it is non-mutable. But we don't discuss C++ but
the behaviour of a specific platform.


devel / comp.lang.c++ / Re: What does this code print ?

Pages:123456
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor