Sujet : Re: A Famous Security Bug
De : jameskuyper (at) *nospam* alumni.caltech.edu (James Kuyper)
Groupes : comp.lang.cDate : 22. Mar 2024, 18:14:49
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <utkea9$31sr2$1@dont-email.me>
References : 1 2 3
User-Agent : Mozilla Thunderbird
On 3/21/24 14:13, Anton Shepelev wrote:
...
I think this behavior (of a C compiler) rather stupid. In a
low-level imperative language, the compiled program shall
do whatever the programmer commands it to do.
C is NOT that low a level of language. The standard explicitly allows
implementations to use any method they find convenient to produce
observable behavior which is consistent with the requirements of the
standard. Despite describing how that behavior might be produced by the
abstract machine, it explicitly allows an implementation to achieve that
behavior by other means.
If you want to tell a system not only what a program must do, but also
how it must do it, you need to use a lower-level language than C. That's
not what C is for.