Liste des Groupes | Revenir à c arch |
Tim Rentsch <tr.17687@z991.linuxsc.com> writes:A lot of programs run while they are computing their result, and then stop when said computation is completed. Whats wrong with that? I must be misunderstanding you. Sorry. ;^oanton@mips.complang.tuwien.ac.at (Anton Ertl) writes:It defines both terms in the section on "Conformance", so I take it
>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.
that both are there for defining the conformance of programs; you may
not consider them to be levels, but given that all "strictly
conforming programs" are also "conforming programs", it has the
feeling of conformance levels to me.
In both cases howeverSure, but the C standard does not give such a definition, so the
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.
"interested party" would cherry-pick from the C standard.
A typical "Hello, World" program terminates, and as mentioned, noThere 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?
terminating program can be strictly conforming, because it exercises
at least implementation-defined behaviour (e.g., look at section
7.22.4.4 of C11).
Les messages affichés proviennent d'usenet.