Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 Jun 2010 18:14:11 +0200
From:      =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@des.no>
To:        ticso@cicely.de
Cc:        current@freebsd.org
Subject:   Re: Cleanup for cryptographic algorithms vs. compiler optimizations
Message-ID:  <86fx0q52r0.fsf@ds4.des.no>
In-Reply-To: <20100613160035.GD87112@cicely7.cicely.de> (Bernd Walter's message of "Sun, 13 Jun 2010 18:00:35 %2B0200")
References:  <20100611162118.GR39829@acme.spoerlein.net> <867hm5tl6u.fsf@ds4.des.no> <20100612153526.GA3632@acme.spoerlein.net> <20100612163208.GS87112@cicely7.cicely.de> <864oh86tnl.fsf@ds4.des.no> <20100612225216.GT87112@cicely7.cicely.de> <86k4q33pk2.fsf@ds4.des.no> <20100613160035.GD87112@cicely7.cicely.de>

next in thread | previous in thread | raw e-mail | index | archive | help
Bernd Walter <ticso@cicely7.cicely.de> writes:
> Dag-Erling Sm=C3=B8rgrav <des@des.no> writes:
> > Bernd Walter <ticso@cicely7.cicely.de> writes:
> > > Amazing - this is one of the things which can get nasty if you try
> > > some kind of microtuning.
> > Only if you break the rules.  Bad code is always bad, even if it
> > sometimes works by accident.
> To expect that function calls are replaced with other functions isn't a
> very obvious rule.

You don't need to know that gcc replaces printf() with puts().  That's
the whole point of the as-if rule: the compiler can only modify the
program in ways that do not change observable behavior.

The only way you can tell that gcc did it is if you break the rules,
such as by defining your own version of printf() or puts().

DES
--=20
Dag-Erling Sm=C3=B8rgrav - des@des.no



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86fx0q52r0.fsf>