Liste des Groupes | Revenir à c arch |
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?
Les messages affichés proviennent d'usenet.