| Deutsch English Français Italiano |
|
<2024Sep8.171203@mips.complang.tuwien.ac.at> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!news.nobody.at!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: anton@mips.complang.tuwien.ac.at (Anton Ertl) Newsgroups: comp.arch Subject: Re: Computer architects leaving Intel... Date: Sun, 08 Sep 2024 15:12:03 GMT Organization: Institut fuer Computersprachen, Technische Universitaet Wien Lines: 56 Message-ID: <2024Sep8.171203@mips.complang.tuwien.ac.at> References: <2024Aug30.161204@mips.complang.tuwien.ac.at> <memo.20240830164247.19028y@jgd.cix.co.uk> <vasruo$id3b$1@dont-email.me> <2024Aug30.195831@mips.complang.tuwien.ac.at> <vat5ap$jthk$2@dont-email.me> <vaunhb$vckc$1@dont-email.me> <vautmu$vr5r$1@dont-email.me> <2024Aug31.170347@mips.complang.tuwien.ac.at> <vavpnh$13tj0$2@dont-email.me> <vb2hir$1ju7q$1@dont-email.me> <jwv34mgo7sz.fsf-monnier+comp.arch@gnu.org> <2024Sep5.151959@mips.complang.tuwien.ac.at> <868qw3m3iu.fsf@linuxsc.com> Injection-Date: Sun, 08 Sep 2024 17:31:49 +0200 (CEST) Injection-Info: dont-email.me; posting-host="d5e623bbaa085cebf149e53e66f130a5"; logging-data="2078153"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX191qgDhrkOTnf4CNmx+NnrL" Cancel-Lock: sha1:OMx4L5lyEd9VfWTJxS93HjZgGiQ= X-newsreader: xrn 10.11 Bytes: 3817 Tim Rentsch <tr.17687@z991.linuxsc.com> writes: >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. It defines both terms in the section on "Conformance", so I take it 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 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. Sure, but the C standard does not give such a definition, so the "interested party" would cherry-pick from the C standard. >> 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? A typical "Hello, World" program terminates, and as mentioned, no 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). - anton -- 'Anyone trying for "industrial quality" ISA should avoid undefined behavior.' Mitch Alsup, <c17fcd89-f024-40e7-a594-88a85ac10d20o@googlegroups.com>