Sujet : Re: Computer architects leaving Intel...
De : tr.17687 (at) *nospam* z991.linuxsc.com (Tim Rentsch)
Groupes : comp.archDate : 08. Sep 2024, 00:45:45
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <868qw3m3iu.fsf@linuxsc.com>
References : 1 2 3 4 5 6 7 8 9 10 11 12
User-Agent : Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>
Specifications are an agreement between the supplier and the client. The
>
The problem here is that the C standard, seen as a contract, is unfair
to the programmer, because it's so excruciatingly hard to write code
that is guaranteed to be free from UB.
>
For programs there is no conformance level "free from UB" in the C
standard.
The C standard doesn't define any conformance "levels": it defines
the term "strictly conforming program", for its own convenience in
defining the language; it also defines the term "conforming
program", for no apparent purpose at all. In both cases however
what is given are simply definitions; there is no reason an
interested party couldn't give a definition of some other term, for
the purpose of identifying a class of C programs that have some
particular property -- such as being free from undefined behavior --
where membership in the class is completely determined by statements
in the C standard, being used as a reference document.
There are two conformance levels for programs:
>
1) A strictly conforming program shall use only those features of the
language and library specified in this International Standard.
This excludes all programs that terminate, including the "Hello,
World" program. [...]
I don't know why you say this. Which aspects of the definition for
"strictly conforming program" do you think are violated by a typical
'Hello, World' program? I'm confident the people who wrote the C
standard would say such a program is strictly conforming.