Path: csiph.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
From: Tim Rentsch
Newsgroups: comp.lang.c
Subject: Re: A thought of C
Date: Thu, 23 Apr 2026 08:07:45 -0700
Organization: A noiseless patient Spider
Lines: 25
Message-ID: <86mryt4svy.fsf@linuxsc.com>
References: <3a3462bdd72c4ed9d392a78b7d369a7b5ccc3b04.camel@gmail.com> <10s06q2$39rhn$1@dont-email.me> <10s2a2u$3t0f5$1@dont-email.me> <10s2fhc$3ug5h$1@dont-email.me> <10s2h5f$3uctl$1@dont-email.me> <10s2oq0$19am$1@dont-email.me> <10s2tfe$2lvm$1@dont-email.me> <10s34f6$542f$1@dont-email.me> <10s3akj$7ajg$1@dont-email.me> <10s3otn$bk6v$1@dont-email.me> <10s4gtb$grfo$1@dont-email.me> <10s53k2$mlh7$1@dont-email.me> <10s5ou0$tq3a$1@kst.eternal-september.org> <10s61e6$vu54$2@dont-email.me> <10s7asn$1b41l$1@dont-email.me> <10s7m2s$1epfv$1@dont-email.me> <20260421155535.00007852@yahoo.com> <10s7va5$1h3vn$1@dont-email.me> <20260421184458.000068de@yahoo.com> <86a4uv62rm.fsf@linuxsc.com> <20260422130247.00003114@yahoo.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Date: Thu, 23 Apr 2026 15:07:46 +0000 (UTC)
Injection-Info: dont-email.me; posting-host="096db26766e75ae3d0da9ffd77dfc80c"; logging-data="3272725"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/DYsIAfTpmB8aVfAx1vjG6ccUZ5C+QNO8="
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:Hk8dwfUSO6Ix+173vkWJWVgBf44= sha1:Izv41cUaUeGYQgQd9l9KQNQCdCA=
Xref: csiph.com comp.lang.c:397863
Michael S writes:
[.. discussing a code transformation..]
> Indeed, transformation applied by compilers in this case is
> more complex than mere [tail call elimination].
>
> In theory, it can be a result of two successive transformations.
> First transforming original to fib2:
>
> unsigned long long fib2(unsigned long long n, unsigned long long acc)
> {
> if (n < 3)
> return acc + 1;
> return fib2(n-2, fib2(n-1, acc));
> }
>
> Ant then applying TCE.
> But more likely compiler arrived to the same outcome by different
> logical steps.
I have long since given up trying to guess how a compiler arrives
at an ultimate fomulation of what code to produce. And it is
surely only going to be harder to divine such results in the
future.