Deutsch   English   Français   Italiano  
<e75b789245b52c2bf56cbf2ad428fa25@www.novabbs.org>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!feeds.phibee-telecom.net!news.mixmin.net!news.swapon.de!i2pn.org!i2pn2.org!.POSTED!not-for-mail
From: mitchalsup@aol.com (MitchAlsup1)
Newsgroups: comp.arch
Subject: Re: Computer architects leaving Intel...
Date: Sun, 8 Sep 2024 00:12:40 +0000
Organization: Rocksolid Light
Message-ID: <e75b789245b52c2bf56cbf2ad428fa25@www.novabbs.org>
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>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: i2pn2.org;
	logging-data="1238063"; mail-complaints-to="usenet@i2pn2.org";
	posting-account="65wTazMNTleAJDh/pRqmKE7ADni/0wesT78+pyiDW8A";
User-Agent: Rocksolid Light
X-Spam-Checker-Version: SpamAssassin 4.0.0
X-Rslight-Site: $2y$10$HZK.WCK1wpwnxFwsZkjDLun7u.JGUhjCGxt7Gm2uNXDar8tKHiIji
X-Rslight-Posting-User: ac58ceb75ea22753186dae54d967fed894c3dce8
Bytes: 3655
Lines: 48

On Sat, 7 Sep 2024 23:45:45 +0000, Tim Rentsch wrote:

> 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.

The standard "Hello World !" program does not return a value to
<effectively> crt0.

Secondarily while one is supposed to return 0 for success and
something else for failure, there is no standard C defined way
that this is related back to the invoker of the program.

Another issue is that main() may not have the 3 defined arguments
and the containing environment is not supposed to complain when
argc, arv, and envp are unused or even unnamed as arguments.