Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Equal bytes for women.


devel / comp.lang.c / Re: bart again (UCX64)

SubjectAuthor
* bart again (UCX64)Paul Edwards
+* Re: bart again (UCX64)Bart
|+* Re: bart again (UCX64)Paul Edwards
||`* Re: bart again (UCX64)Bart
|| +- Re: bart again (UCX64)Paul Edwards
|| `- Re: bart again (UCX64)Dan Cross
|+* Re: bart again (UCX64)Bart
||`* Re: bart again (UCX64)Paul Edwards
|| `* Re: bart again (UCX64)Bart
||  `- Re: bart again (UCX64)Paul Edwards
|`- Re: bart again (UCX64)Chris M. Thomasson
+- Re: bart again (UCX64)Paul Edwards
+* Re: bart again (UCX64)Anton Shepelev
|`* Re: bart again (UCX64)Paul Edwards
| `* Re: bart again (UCX64)Bart
|  `* Re: bart again (UCX64)Paul Edwards
|   +* Re: bart again (UCX64)Paul Edwards
|   |`- Re: bart again (UCX64)Paul Edwards
|   `* Re: bart again (UCX64)Bart
|    +* Re: bart again (UCX64)Paul Edwards
|    |`* Re: bart again (UCX64)Bart
|    | `* Re: bart again (UCX64)Paul Edwards
|    |  `* Re: bart again (UCX64)Bart
|    |   `* Re: bart again (UCX64)Paul Edwards
|    |    +* Re: bart again (UCX64)Bart
|    |    |`- Re: bart again (UCX64)Paul Edwards
|    |    `* Re: bart again (UCX64)Bart
|    |     +* Re: bart again (UCX64)Paul Edwards
|    |     |+* Re: bart again (UCX64)Bart
|    |     ||`* Re: bart again (UCX64)Paul Edwards
|    |     || +* Re: bart again (UCX64)Bart
|    |     || |+- Re: bart again (UCX64)Paul Edwards
|    |     || |`* Re: bart again (UCX64)Keith Thompson
|    |     || | `* Re: bart again (UCX64)Scott Lurndal
|    |     || |  `- Re: bart again (UCX64)David Brown
|    |     || `- Re: bart again (UCX64)Paul Edwards
|    |     |`* Re: bart again (UCX64)Scott Lurndal
|    |     | `- Re: bart again (UCX64)Ben Bacarisse
|    |     `* Re: bart again (UCX64)David Brown
|    |      `* Re: bart again (UCX64)Bart
|    |       +- Re: bart again (UCX64)Bart
|    |       +* Re: bart again (UCX64)David Brown
|    |       |`* Re: bart again (UCX64)Bart
|    |       | +* Re: bart again (UCX64)Keith Thompson
|    |       | |+* Verbosity in command output (Was: bart again (UCX64))Kenny McCormack
|    |       | ||`* Re: Verbosity in command output (Was: bart again (UCX64))Kaz Kylheku
|    |       | || `* Re: Verbosity in command output (Was: bart again (UCX64))Malcolm McLean
|    |       | ||  `- Re: Verbosity in command output (Was: bart again (UCX64))Kaz Kylheku
|    |       | |`* Re: bart again (UCX64)Bart
|    |       | | `- Re: bart again (UCX64)Keith Thompson
|    |       | +- Re: bart again (UCX64)Scott Lurndal
|    |       | +* Re: bart again (UCX64)Scott Lurndal
|    |       | |`* Re: bart again (UCX64)Bart
|    |       | | +- Re: bart again (UCX64)Scott Lurndal
|    |       | | +* Re: bart again (UCX64)Keith Thompson
|    |       | | |`* Re: bart again (UCX64)Bart
|    |       | | | +* Re: bart again (UCX64)Paul Edwards
|    |       | | | |+* Re: bart again (UCX64)Chris M. Thomasson
|    |       | | | ||`* Re: bart again (UCX64)Paul Edwards
|    |       | | | || `- Re: bart again (UCX64)Kaz Kylheku
|    |       | | | |`- Re: bart again (UCX64)Bart
|    |       | | | +- Re: bart again (UCX64)Kaz Kylheku
|    |       | | | `- Re: bart again (UCX64)Keith Thompson
|    |       | | `* Re: bart again (UCX64)David Brown
|    |       | |  `* Re: bart again (UCX64)Bart
|    |       | |   +- Re: bart again (UCX64)David Brown
|    |       | |   +* Re: bart again (UCX64)Richard Harnden
|    |       | |   |`* Re: bart again (UCX64)Bart
|    |       | |   | +- Re: bart again (UCX64)David Brown
|    |       | |   | +* Re: bart again (UCX64)Richard Harnden
|    |       | |   | |+- Re: bart again (UCX64)David Brown
|    |       | |   | |`* Re: bart again (UCX64)Bart
|    |       | |   | | `- Re: bart again (UCX64)Kaz Kylheku
|    |       | |   | +* Re: bart again (UCX64)Ben Bacarisse
|    |       | |   | |`* Re: bart again (UCX64)Bart
|    |       | |   | | +* Re: bart again (UCX64)Ben Bacarisse
|    |       | |   | | |`* Re: bart again (UCX64)Bart
|    |       | |   | | | +* Re: bart again (UCX64)Kaz Kylheku
|    |       | |   | | | |`* Re: bart again (UCX64)Bart
|    |       | |   | | | | `* Re: bart again (UCX64)Kaz Kylheku
|    |       | |   | | | |  `* Re: bart again (UCX64)Bart
|    |       | |   | | | |   +* Re: bart again (UCX64)Kaz Kylheku
|    |       | |   | | | |   |`* Re: bart again (UCX64)Bart
|    |       | |   | | | |   | `* Re: bart again (UCX64)Ben Bacarisse
|    |       | |   | | | |   |  `* Re: bart again (UCX64)Bart
|    |       | |   | | | |   |   `* Re: bart again (UCX64)Ben Bacarisse
|    |       | |   | | | |   |    `* Re: bart again (UCX64)Bart
|    |       | |   | | | |   |     +* Re: bart again (UCX64)Malcolm McLean
|    |       | |   | | | |   |     |+* Re: bart again (UCX64)Bart
|    |       | |   | | | |   |     ||`* Re: bart again (UCX64)Malcolm McLean
|    |       | |   | | | |   |     || `* Re: bart again (UCX64)Ben Bacarisse
|    |       | |   | | | |   |     ||  `* Re: bart again (UCX64)Bart
|    |       | |   | | | |   |     ||   `- Re: bart again (UCX64)Ben Bacarisse
|    |       | |   | | | |   |     |`- Re: bart again (UCX64)David Brown
|    |       | |   | | | |   |     +- Re: bart again (UCX64)Ben Bacarisse
|    |       | |   | | | |   |     `* Re: bart again (UCX64)Kaz Kylheku
|    |       | |   | | | |   |      +* Re: bart again (UCX64)Ben Bacarisse
|    |       | |   | | | |   |      |`* Re: bart again (UCX64)Kaz Kylheku
|    |       | |   | | | |   |      | +* Re: bart again (UCX64)Ben Bacarisse
|    |       | |   | | | |   |      | |`* Re: bart again (UCX64)Bart
|    |       | |   | | | |   |      | | +- Re: bart again (UCX64)Kaz Kylheku
|    |       | |   | | | |   |      | | `- Re: bart again (UCX64)Ben Bacarisse
|    |       | |   | | | |   |      | `* Re: bart again (UCX64)Bart
|    |       | |   | | | |   |      `- Re: bart again (UCX64)Keith Thompson
|    |       | |   | | | |   `- Re: bart again (UCX64)David Brown
|    |       | |   | | | `* Re: bart again (UCX64)Ben Bacarisse
|    |       | |   | | `* Re: bart again (UCX64)Kaz Kylheku
|    |       | |   | `- Re: bart again (UCX64)Kaz Kylheku
|    |       | |   `* Re: bart again (UCX64)Kaz Kylheku
|    |       | `* Re: bart again (UCX64)David Brown
|    |       `* Re: bart again (UCX64)Kaz Kylheku
|    `* Re: bart again (UCX64)Paul Edwards
`* Re: bart again (UCX64)Michael S

Pages:12345678910111213141516
Re: bart again (UCX64)

<87o7ihsbkf.fsf@bsb.me.uk>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=28752&group=comp.lang.c#28752

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ben.use...@bsb.me.uk (Ben Bacarisse)
Newsgroups: comp.lang.c
Subject: Re: bart again (UCX64)
Date: Tue, 05 Sep 2023 01:33:52 +0100
Organization: A noiseless patient Spider
Lines: 20
Message-ID: <87o7ihsbkf.fsf@bsb.me.uk>
References: <b74c088d-09e6-4842-8b6c-1921d68154c7n@googlegroups.com>
<ucsm1u$3pb1c$1@dont-email.me> <871qfiknil.fsf@bsb.me.uk>
<ucsu3s$3qfrk$1@dont-email.me> <87v8ctkbsj.fsf@bsb.me.uk>
<uctaf3$3v98j$1@dont-email.me> <20230901115322.184@kylheku.com>
<ucthg8$gvk$1@dont-email.me> <20230901133548.87@kylheku.com>
<uctl33$13ie$1@dont-email.me> <20230901150200.880@kylheku.com>
<ud1vqi$tuos$1@dont-email.me> <8734zvxra0.fsf@bsb.me.uk>
<ud27cn$vb5v$1@dont-email.me> <87pm2yvg0m.fsf@bsb.me.uk>
<ud48b0$1co8f$1@dont-email.me>
<a25da57c-ae11-4e37-a844-661fa3f303abn@googlegroups.com>
<ud4ccn$1dub0$1@dont-email.me>
<20a53e7c-6952-432e-8147-9004ab5ea79cn@googlegroups.com>
<8734ztvrqi.fsf@bsb.me.uk> <ud54co$1ij02$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="2907f66c348ba0da34ad87ef57ce8447";
logging-data="1774356"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+JSCsEYwkunSL7VUudwteke9z6x5hBTzM="
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
Cancel-Lock: sha1:Z9O6OKDB/Q36XZ1jjMnLQBm9uLQ=
sha1:R1EZd86jFKU0QttvRBfeIpZ7upE=
X-BSB-Auth: 1.c36d91fe77cef20b7a81.20230905013352BST.87o7ihsbkf.fsf@bsb.me.uk
 by: Ben Bacarisse - Tue, 5 Sep 2023 00:33 UTC

Bart <bc@freeuk.com> writes:

> On 04/09/2023 17:16, Ben Bacarisse wrote:
>
>> Do you know that gcc (with no other flags or options) will report no
>> syntax errors for this source code:
>> PROGRAM HELLO
>> WRITE (*,*) 'Hello world'
>> END
>> ? Is it only in "my world" that the plain gcc command is not a C
>> compiler?
>
> Your comments are misleading:

But none the less accurate. Annoying, isn't it? Shall we make a pact
and both agree to make only clear and not at all misleading comments?
You first.

--
Ben.

Re: bart again (UCX64)

<87ledlsbiq.fsf@bsb.me.uk>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=28753&group=comp.lang.c#28753

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ben.use...@bsb.me.uk (Ben Bacarisse)
Newsgroups: comp.lang.c
Subject: Re: bart again (UCX64)
Date: Tue, 05 Sep 2023 01:34:53 +0100
Organization: A noiseless patient Spider
Lines: 30
Message-ID: <87ledlsbiq.fsf@bsb.me.uk>
References: <b74c088d-09e6-4842-8b6c-1921d68154c7n@googlegroups.com>
<ucsm1u$3pb1c$1@dont-email.me> <871qfiknil.fsf@bsb.me.uk>
<ucsu3s$3qfrk$1@dont-email.me> <87v8ctkbsj.fsf@bsb.me.uk>
<uctaf3$3v98j$1@dont-email.me> <20230901115322.184@kylheku.com>
<ucthg8$gvk$1@dont-email.me> <20230901133548.87@kylheku.com>
<uctl33$13ie$1@dont-email.me> <20230901150200.880@kylheku.com>
<ud1vqi$tuos$1@dont-email.me> <8734zvxra0.fsf@bsb.me.uk>
<ud27cn$vb5v$1@dont-email.me> <87pm2yvg0m.fsf@bsb.me.uk>
<ud48b0$1co8f$1@dont-email.me> <20230904092343.829@kylheku.com>
<87r0ndu6tf.fsf@bsb.me.uk> <20230904121509.86@kylheku.com>
<87fs3tu3cs.fsf@bsb.me.uk> <ud5efg$1k757$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="2907f66c348ba0da34ad87ef57ce8447";
logging-data="1774356"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18g6TSAxu1TQOVcxVj1wtXcF+HeJFZfSJM="
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
Cancel-Lock: sha1:sU42FNqarWVxD1MTitxQTazmzN0=
sha1:jn1Pj69ycItFoMNT0VQKsb7vVyc=
X-BSB-Auth: 1.de80100cb6e4844c3161.20230905013453BST.87ledlsbiq.fsf@bsb.me.uk
 by: Ben Bacarisse - Tue, 5 Sep 2023 00:34 UTC

Bart <bc@freeuk.com> writes:

> On 04/09/2023 20:48, Ben Bacarisse wrote:
>> Kaz Kylheku <864-117-4973@kylheku.com> writes:
>>
>>> On 2023-09-04, Ben Bacarisse <ben.usenet@bsb.me.uk> wrote:
>>>> For a long while I went along with the idea that "C" can mean many
>>>> things, but that's not how Bart uses the term. In fact, that's one of
>>>> his big whinging topics -- C is what you care to make it. So I changed
>>>> my usage and posted the remark above. He found it worthy of mockery,
>>>> but did not want me to respond. Go figure.
>>>
>>> C is a language family, like Lisp. Some people mean "Clojure"
>>> when they are sayhing Lisp, some mean "Racket" or "Emacs Lisp".
>> Yes.
>
> Examples of versions of the C family which have their own identities?

Do you mean things like ISO/IEC 9899:2017? In general, people tend to
make up their own informal names for the close members of the family.
If you want to know what gcc calls them look at the -std=xxx options.

> I think it's clear we're not talking about distinct languages like
> Objective-C or C++.

In fact, I was talking about languages like Fortran and Go when I said
gcc was not a C compiler.

--
Ben.

Re: bart again (UCX64)

<86jzt5pgho.fsf@linuxsc.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=28754&group=comp.lang.c#28754

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: tr.17...@z991.linuxsc.com (Tim Rentsch)
Newsgroups: comp.lang.c
Subject: Re: bart again (UCX64)
Date: Mon, 04 Sep 2023 18:15:47 -0700
Organization: A noiseless patient Spider
Lines: 36
Message-ID: <86jzt5pgho.fsf@linuxsc.com>
References: <b74c088d-09e6-4842-8b6c-1921d68154c7n@googlegroups.com> <ucs9pb$3nd9i$1@dont-email.me> <ucsg9u$3ofr6$1@dont-email.me> <20230901104426.371@kylheku.com> <uct9hv$3v1lb$2@dont-email.me> <20230901114625.198@kylheku.com> <ucthrb$gvk$2@dont-email.me> <20230901135123.702@kylheku.com> <uctlpv$17t5$1@dont-email.me> <878r9p7b13.fsf@nosuchdomain.example.com> <ucu0tf$2mht$1@dont-email.me> <20230901175635.91@kylheku.com> <ucv4e6$d0c9$1@dont-email.me> <ucvna1$fb08$7@dont-email.me> <ud00bc$grer$1@dont-email.me> <ud23ls$um2u$1@dont-email.me> <ud2eod$10jv5$1@dont-email.me> <ud4604$1cbam$1@dont-email.me> <ud4a6a$1d4cd$1@dont-email.me> <ud4rbl$1h1t4$1@dont-email.me> <87h6o95znv.fsf@nosuchdomain.example.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: dont-email.me; posting-host="6793c8bc2747e0ba6d3890411794594c";
logging-data="1779524"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+YYvbLADHHHXAMpcexf51kAtx8t8vSFMs="
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:RyM4lwI+Oisw6+P3TfjzkWCLBzo=
sha1:scN8K7UF8Ju6q3C49DvLtolthzc=
 by: Tim Rentsch - Tue, 5 Sep 2023 01:15 UTC

Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:

> David Brown <david.brown@hesbynett.no> writes:
>
>> On 04/09/2023 12:06, Bart wrote:
>
> [...]
>
>>> char* fred(void) {
>>> (long long int)rand()*3.14159;
>>> }
>>> int main(void) {
>>> printf("%s\n", fred());
>>> }
>
> [...]
>
>> As you know, it is not valid C code. As you know, proper C compilers
>> will - at least - warn you about it when asked to treat the input
>> according to the C standards. As you know, there isn't a compiler in
>> the world for any language which will stop programmers from writing
>> incorrect code.
>
> Given the context of the discussion, pedantry seems appropriate.
>
> It's invalid C code because it doesn't declare rand() and printf(),
> correctable by adding `#include <stdlib.h>` and `#include <stdio.h>`.
> (It also contains NO-BREAK SPACE characters, but that's that's just a
> Usenet formatting issue.)
>
> Other than that, a conforming C compiler is not required to diagnose
> the above code. It does have undefined behavior, and a C compiler is
> likely to warn about it with appropriate warnings, but it does not
> violate any syntax rule or constraint.

I say it does.

Re: bart again (UCX64)

<ud6016$1mhka$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=28755&group=comp.lang.c#28755

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: bc...@freeuk.com (Bart)
Newsgroups: comp.lang.c
Subject: Re: bart again (UCX64)
Date: Tue, 5 Sep 2023 02:24:54 +0100
Organization: A noiseless patient Spider
Lines: 107
Message-ID: <ud6016$1mhka$1@dont-email.me>
References: <b74c088d-09e6-4842-8b6c-1921d68154c7n@googlegroups.com>
<ucs9pb$3nd9i$1@dont-email.me> <ucsg9u$3ofr6$1@dont-email.me>
<20230901104426.371@kylheku.com> <uct9hv$3v1lb$2@dont-email.me>
<20230901114625.198@kylheku.com> <ucthrb$gvk$2@dont-email.me>
<20230901135123.702@kylheku.com> <uctlpv$17t5$1@dont-email.me>
<878r9p7b13.fsf@nosuchdomain.example.com> <ucu0tf$2mht$1@dont-email.me>
<20230901175635.91@kylheku.com> <ucv4e6$d0c9$1@dont-email.me>
<ucvna1$fb08$7@dont-email.me> <ud00bc$grer$1@dont-email.me>
<ud23ls$um2u$1@dont-email.me> <ud2eod$10jv5$1@dont-email.me>
<ud4604$1cbam$1@dont-email.me> <ud4a6a$1d4cd$1@dont-email.me>
<87edjeujqw.fsf@bsb.me.uk> <ud5gkt$1kj5t$1@dont-email.me>
<87tts9sbo8.fsf@bsb.me.uk>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 5 Sep 2023 01:24:54 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="12c26e2becd6d1e0d07f8c2ea7e50a28";
logging-data="1787530"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/eihQTpVzOc0Jez7FMKJX/jnIcBiSdORQ="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.14.0
Cancel-Lock: sha1:QB1SEaE37Ui8KdWQGn5Jjwem/vc=
In-Reply-To: <87tts9sbo8.fsf@bsb.me.uk>
 by: Bart - Tue, 5 Sep 2023 01:24 UTC

On 05/09/2023 01:31, Ben Bacarisse wrote:
> Bart <bc@freeuk.com> writes:
>
>> On 04/09/2023 14:54, Ben Bacarisse wrote:
>>> Bart <bc@freeuk.com> writes:
>>>
>>>> On 04/09/2023 09:54, David Brown wrote:
>>>>> On 03/09/2023 19:11, Bart wrote:
>>>>
>>>>>> What's wrong with that?
>>>>> If you can live inside a bubble, and be happy with that, then I suppose
>>>>> that's fine.  However, you don't have the experience or understanding to
>>>>> criticise those outside the bubble.  You can live in your blissful
>>>>> ignorance if that's what suits you - but please understand that others do
>>>>> not want to be in your bubble.  It does not appeal at all to me. Your
>>>>> bubble tools and languages are of little use or interest to all but a
>>>>> very few other people.
>>>>
>>>> That may be so. But you can still learn things from them.
>>> I think I've asked before, but is there a language reference manual?
>>
>> No.
>
> Then no significant learning can happen.

It's not going to happen anyway. I'm not going to spend a month slaving
over a document just so you can say:

<snip>

I've posted enough examples over the years for you to have a good idea
of what my language looks like and how it is used. Example:

c:\cx>ms cc -run hello
Compiling hello.c to hello.exe
Hello, World!

This builds my C compiler from source, runs it in-memory and uses it to
compile hello.c and then run that executable.

Learn something about creating lean, genuinely simple, effortless build
systems.

> As I said. It's trivial since the C program has no defined meaning.
>
>>> I post this only to explain how I interpret the notion of "expressing" a
>>> program in another language. I am sure your view of the term is quite
>>> different.
>>
>> Do you have your own examples in other languages which do the same: return
>> whatever garbage is in a register, since the language allows you to omit an
>> explicit value?
>
> If "the language" is C, then it does not allow any such thing. And the
> program you posted does not "do" anything. It is as meaningless and any
> and all other undefined C programs.
>

This is just wordplay isn't it?

I posted examples of something that looked like C code, and of running
programs that people often use to compile C code, which turned that code
into an executable that promptly crashed.

But that's impossible, because C 'doesn't allow it'? Another wind-up?

> And the
> program you posted does not "do" anything.

Let's say the intention is to call a function to return a string. But
that return statement has been left out. So it's undefined. But, that's OK?

char* getversion(void) {}

int main(void) {
puts(getversion());
}

So, I can compile this using:

gcc -std=c99 -Wall -Wpedantic prog.c

which produces an executable that either crashes or prints nonsense. And
that's OK, because it is undefined? Even the compilation reported that
it ran into the end of a non-void function.

I'm struggling to reconcile this behaviour, with your statement that 'C
does not allow any such thing'.

Well SOMETHING is allowing it! But you're going to argue that:

* That code was not C
* That had undefined behaviour
* That was not a C compiler

Anything to put me in the wrong and absolve C and that C compiler
invoked by gcc from any blame in passing a program that could have wiped
my hard drive.

I don't get it. But, I really no longer care.

You want to pretend that there is nothing really wrong that writing your
own compiler preprocessor can't fix, then fine.

Nobody's mind is going to be changed here.

Re: bart again (UCX64)

<b9e00c9c-e879-49d2-a00a-05256b87d766n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=28756&group=comp.lang.c#28756

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:a05:6214:4c07:b0:64a:24a4:3b9b with SMTP id qh7-20020a0562144c0700b0064a24a43b9bmr227906qvb.13.1693877432400;
Mon, 04 Sep 2023 18:30:32 -0700 (PDT)
X-Received: by 2002:a17:90a:bd09:b0:268:3f14:82ae with SMTP id
y9-20020a17090abd0900b002683f1482aemr2630767pjr.0.1693877432114; Mon, 04 Sep
2023 18:30:32 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!panix!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.c
Date: Mon, 4 Sep 2023 18:30:31 -0700 (PDT)
In-Reply-To: <87tts9sbo8.fsf@bsb.me.uk>
Injection-Info: google-groups.googlegroups.com; posting-host=2a00:23a8:400a:5601:88d:c567:12a6:beb3;
posting-account=Dz2zqgkAAADlK5MFu78bw3ab-BRFV4Qn
NNTP-Posting-Host: 2a00:23a8:400a:5601:88d:c567:12a6:beb3
References: <b74c088d-09e6-4842-8b6c-1921d68154c7n@googlegroups.com>
<ucs9pb$3nd9i$1@dont-email.me> <ucsg9u$3ofr6$1@dont-email.me>
<20230901104426.371@kylheku.com> <uct9hv$3v1lb$2@dont-email.me>
<20230901114625.198@kylheku.com> <ucthrb$gvk$2@dont-email.me>
<20230901135123.702@kylheku.com> <uctlpv$17t5$1@dont-email.me>
<878r9p7b13.fsf@nosuchdomain.example.com> <ucu0tf$2mht$1@dont-email.me>
<20230901175635.91@kylheku.com> <ucv4e6$d0c9$1@dont-email.me>
<ucvna1$fb08$7@dont-email.me> <ud00bc$grer$1@dont-email.me>
<ud23ls$um2u$1@dont-email.me> <ud2eod$10jv5$1@dont-email.me>
<ud4604$1cbam$1@dont-email.me> <ud4a6a$1d4cd$1@dont-email.me>
<87edjeujqw.fsf@bsb.me.uk> <ud5gkt$1kj5t$1@dont-email.me> <87tts9sbo8.fsf@bsb.me.uk>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <b9e00c9c-e879-49d2-a00a-05256b87d766n@googlegroups.com>
Subject: Re: bart again (UCX64)
From: malcolm....@gmail.com (Malcolm McLean)
Injection-Date: Tue, 05 Sep 2023 01:30:32 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2936
 by: Malcolm McLean - Tue, 5 Sep 2023 01:30 UTC

On Tuesday, 5 September 2023 at 01:31:48 UTC+1, Ben Bacarisse wrote:
>
> > Do you have your own examples in other languages which do the same: return
> > whatever garbage is in a register, since the language allows you to omit an
> > explicit value?
> If "the language" is C, then it does not allow any such thing. And the
> program you posted does not "do" anything. It is as meaningless and any
> and all other undefined C programs.
>
Originally C didn't have a void type. So

if (foo())

was always a legitimate statement. If foo() couldn't sensibly return a value, then
it would default to int, and whatever garbage was in the register used for passing
back values would be used.
This wasn't ideal, but it probably made the very primitive first compilers easier to
write.

It's hung on to the present day. Compilers will still accept functions which return
garbage values. Presumably for backwards compatibility, though as some people have
pointed out, in some case you would have to add dummy returns on control paths
which couldn't in fact be followed, to help the compiler out.

Re: bart again (UCX64)

<ud60pq$1mf0p$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=28757&group=comp.lang.c#28757

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: val...@cultnix.org (vallor)
Newsgroups: comp.lang.c
Subject: Re: bart again (UCX64)
Date: Tue, 5 Sep 2023 01:38:02 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 17
Message-ID: <ud60pq$1mf0p$1@dont-email.me>
References: <b74c088d-09e6-4842-8b6c-1921d68154c7n@googlegroups.com>
<d500e1f2-7486-4425-a7e2-4472cce70e44n@googlegroups.com>
<ucnl64$2p8as$1@dont-email.me>
<65d28a7d-ffd5-4b8b-b3f0-2500bb05f9b7n@googlegroups.com>
<ucoe3l$2t4o2$1@dont-email.me>
<557bf807-40c7-404b-9242-c26975faa42fn@googlegroups.com>
<ucprpd$38s6i$1@dont-email.me> <ucq1gd$39q14$1@dont-email.me>
<ucq86h$3auvq$1@dont-email.me> <ucqj27$3con1$1@dont-email.me>
<ucqpgp$3dnop$1@dont-email.me> <aa8IM.249421$f7Ub.27491@fx47.iad>
<ucr3kb$3f58o$1@dont-email.me> <ucs9pb$3nd9i$1@dont-email.me>
<ucsg9u$3ofr6$1@dont-email.me> <ucsk81$3p2kg$1@dont-email.me>
<ucsm1u$3pb1c$1@dont-email.me> <871qfiknil.fsf@bsb.me.uk>
<ucsu3s$3qfrk$1@dont-email.me> <87v8ctkbsj.fsf@bsb.me.uk>
<uctaf3$3v98j$1@dont-email.me> <87pm31jusi.fsf@bsb.me.uk>
<ucuvtc$cbnk$1@dont-email.me> <5JHIM.574995$qnnb.462524@fx11.iad>
<ucvk6s$f6nb$1@dont-email.me> <r1JIM.297958$uLJb.27694@fx41.iad>
<ucvuhq$gmlg$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 5 Sep 2023 01:38:02 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="4163a5ab6ce61c0a0d0db676f6f142d6";
logging-data="1784857"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+8gcQu0+vkdrcGzW2TNhvs"
Cancel-Lock: sha1:kRrnTnoH1XMlIN9f6QVwZ9o7KMU=
X-Face: \}2`P"_@pS86<'EM:'b.Ml}8IuMK"pV"?FReF$'c.S%u9<Q#U*4QO)$l81M`{Q/n
XL'`91kd%N::LG:=*\35JS0prp\VJN^<s"b#bff@fA7]5lJA.jn,x_d%Md$,{.EZ
 by: vallor - Tue, 5 Sep 2023 01:38 UTC

On Sat, 2 Sep 2023 19:22:50 +0100, Bart <bc@freeuk.com> wrote in
<ucvuhq$gmlg$1@dont-email.me>:

> If you have a function that you know will never return (becauses it
> stays in a loop, or terminates, here or in a nested function), then why
> would you give it a return type in the first place?

Isn't asking a C compiler to watch for interminable loops and
such things akin to trying to solve the halting problem?

I mean, I'm not the smartest person in the room by far, but even
I know that this is, perhaps, a bit far-out...

...or is it? I could be mistaken.

--
-v

Re: bart again (UCX64)

<ud614v$1qed6$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=28758&group=comp.lang.c#28758

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: chris.m....@gmail.com (Chris M. Thomasson)
Newsgroups: comp.lang.c
Subject: Re: bart again (UCX64)
Date: Mon, 4 Sep 2023 18:43:59 -0700
Organization: A noiseless patient Spider
Lines: 9
Message-ID: <ud614v$1qed6$1@dont-email.me>
References: <b74c088d-09e6-4842-8b6c-1921d68154c7n@googlegroups.com>
<ub2jbh$c32q$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 5 Sep 2023 01:43:59 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="9f414e57f3965c384e999b1d5e124586";
logging-data="1915302"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX194IiXcEyY0KM5MGX9alI0AwPbhTsM/rC4="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.15.0
Cancel-Lock: sha1:zMX09Rt0fUPZDICulrou+DimwdI=
In-Reply-To: <ub2jbh$c32q$1@dont-email.me>
Content-Language: en-US
 by: Chris M. Thomasson - Tue, 5 Sep 2023 01:43 UTC

On 8/10/2023 4:57 AM, Bart wrote:
> On 10/08/2023 12:29, Paul Edwards wrote:
> > Hi Bart.
[...]

Creating a compiler reminds of the following song:

https://youtu.be/_jEP347F6_g

Re: bart again (UCX64)

<87zg214c1j.fsf@nosuchdomain.example.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=28759&group=comp.lang.c#28759

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Keith.S....@gmail.com (Keith Thompson)
Newsgroups: comp.lang.c
Subject: Re: bart again (UCX64)
Date: Mon, 04 Sep 2023 18:57:28 -0700
Organization: None to speak of
Lines: 50
Message-ID: <87zg214c1j.fsf@nosuchdomain.example.com>
References: <b74c088d-09e6-4842-8b6c-1921d68154c7n@googlegroups.com>
<ucsg9u$3ofr6$1@dont-email.me> <20230901104426.371@kylheku.com>
<uct9hv$3v1lb$2@dont-email.me> <20230901114625.198@kylheku.com>
<ucthrb$gvk$2@dont-email.me> <20230901135123.702@kylheku.com>
<uctlpv$17t5$1@dont-email.me>
<878r9p7b13.fsf@nosuchdomain.example.com>
<ucu0tf$2mht$1@dont-email.me> <20230901175635.91@kylheku.com>
<ucv4e6$d0c9$1@dont-email.me> <ucvna1$fb08$7@dont-email.me>
<ud00bc$grer$1@dont-email.me> <ud23ls$um2u$1@dont-email.me>
<ud2eod$10jv5$1@dont-email.me> <ud4604$1cbam$1@dont-email.me>
<ud4a6a$1d4cd$1@dont-email.me> <ud4rbl$1h1t4$1@dont-email.me>
<87h6o95znv.fsf@nosuchdomain.example.com> <86jzt5pgho.fsf@linuxsc.com>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="d633fa9147221aa5a66d8a19b6f926fe";
logging-data="1916655"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/I/Hb7TDSwRBgehZOk7lUS"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:p3xfAibLY/LHjqf8P98jkpfuzSE=
sha1:CzPHgdOjQzl3LAVixb9ZYxWaClY=
 by: Keith Thompson - Tue, 5 Sep 2023 01:57 UTC

Tim Rentsch <tr.17687@z991.linuxsc.com> writes:
> Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
>> David Brown <david.brown@hesbynett.no> writes:
>>> On 04/09/2023 12:06, Bart wrote:
>> [...]
>>
>>>> char* fred(void) {
>>>> (long long int)rand()*3.14159;
>>>> }
>>>> int main(void) {
>>>> printf("%s\n", fred());
>>>> }
>>
>> [...]
>>
>>> As you know, it is not valid C code. As you know, proper C compilers
>>> will - at least - warn you about it when asked to treat the input
>>> according to the C standards. As you know, there isn't a compiler in
>>> the world for any language which will stop programmers from writing
>>> incorrect code.
>>
>> Given the context of the discussion, pedantry seems appropriate.
>>
>> It's invalid C code because it doesn't declare rand() and printf(),
>> correctable by adding `#include <stdlib.h>` and `#include <stdio.h>`.
>> (It also contains NO-BREAK SPACE characters, but that's that's just a
>> Usenet formatting issue.)
>>
>> Other than that, a conforming C compiler is not required to diagnose
>> the above code. It does have undefined behavior, and a C compiler is
>> likely to warn about it with appropriate warnings, but it does not
>> violate any syntax rule or constraint.
>
> I say it does.

If you're right, then gcc 13.2.0 and clang 16.0.0 have a bug. Both
compile the above code (once the required #include directives are added)
without error, though clang prints a couple of optional warnings. I used
"-std=c17 -pedantic-errors" with both compilers. (With "-Wall", gcc
prints warnings similar to the ones clang prints without it.)

What syntax rule or constraint does it violate?

Does it occur to you that you would save everyone a lot of time if
you'd explain what you mean in the first place?

--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
Will write code for food.
void Void(void) { Void(); } /* The recursive call of the void */

Re: bart again (UCX64)

<zVwJM.204220$JG_b.95531@fx39.iad>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=28760&group=comp.lang.c#28760

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!3.eu.feeder.erje.net!feeder.erje.net!newsreader4.netcologne.de!news.netcologne.de!peer02.ams1!peer.ams1.xlned.com!news.xlned.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx39.iad.POSTED!not-for-mail
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bart again (UCX64)
Newsgroups: comp.lang.c
References: <b74c088d-09e6-4842-8b6c-1921d68154c7n@googlegroups.com>
<d500e1f2-7486-4425-a7e2-4472cce70e44n@googlegroups.com>
<ucnl64$2p8as$1@dont-email.me>
<65d28a7d-ffd5-4b8b-b3f0-2500bb05f9b7n@googlegroups.com>
<ucoe3l$2t4o2$1@dont-email.me>
<557bf807-40c7-404b-9242-c26975faa42fn@googlegroups.com>
<ucprpd$38s6i$1@dont-email.me> <ucq1gd$39q14$1@dont-email.me>
<ucq86h$3auvq$1@dont-email.me> <ucqj27$3con1$1@dont-email.me>
<ucqpgp$3dnop$1@dont-email.me> <aa8IM.249421$f7Ub.27491@fx47.iad>
<ucr3kb$3f58o$1@dont-email.me> <ucs9pb$3nd9i$1@dont-email.me>
<ucsg9u$3ofr6$1@dont-email.me> <ucsk81$3p2kg$1@dont-email.me>
<ucsm1u$3pb1c$1@dont-email.me> <871qfiknil.fsf@bsb.me.uk>
<ucsu3s$3qfrk$1@dont-email.me> <87v8ctkbsj.fsf@bsb.me.uk>
<uctaf3$3v98j$1@dont-email.me> <87pm31jusi.fsf@bsb.me.uk>
<ucuvtc$cbnk$1@dont-email.me> <5JHIM.574995$qnnb.462524@fx11.iad>
<ucvk6s$f6nb$1@dont-email.me> <r1JIM.297958$uLJb.27694@fx41.iad>
<ucvuhq$gmlg$1@dont-email.me> <ud60pq$1mf0p$1@dont-email.me>
From: Rich...@Damon-Family.org (Richard Damon)
Content-Language: en-US
In-Reply-To: <ud60pq$1mf0p$1@dont-email.me>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 27
Message-ID: <zVwJM.204220$JG_b.95531@fx39.iad>
X-Complaints-To: abuse@easynews.com
Organization: Forte - www.forteinc.com
X-Complaints-Info: Please be sure to forward a copy of ALL headers otherwise we will be unable to process your complaint properly.
Date: Mon, 4 Sep 2023 20:05:02 -0700
X-Received-Bytes: 2949
 by: Richard Damon - Tue, 5 Sep 2023 03:05 UTC

On 9/4/23 6:38 PM, vallor wrote:
> On Sat, 2 Sep 2023 19:22:50 +0100, Bart <bc@freeuk.com> wrote in
> <ucvuhq$gmlg$1@dont-email.me>:
>
>> If you have a function that you know will never return (becauses it
>> stays in a loop, or terminates, here or in a nested function), then why
>> would you give it a return type in the first place?
>
> Isn't asking a C compiler to watch for interminable loops and
> such things akin to trying to solve the halting problem?
>
> I mean, I'm not the smartest person in the room by far, but even
> I know that this is, perhaps, a bit far-out...
>
> ...or is it? I could be mistaken.
>

I think the proposal to have it look to see if something might happen
was limited to evaluating CONSTANT values.

I seem to remember that a loop with a non-constant-expression control
expression allowed the complier to assume the loop will eventually end,
and thus if the loop had no observable effects, could be optimized away,
even if it turns out that the condition could never be met.

Thus, it doesn't become a Halting Problem analysis, as loop termination
becomes "correctly" predicted syntactic means.

Re: bart again (UCX64)

<20230904234329.835@kylheku.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=28767&group=comp.lang.c#28767

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: 864-117-...@kylheku.com (Kaz Kylheku)
Newsgroups: comp.lang.c
Subject: Re: bart again (UCX64)
Date: Tue, 5 Sep 2023 06:49:17 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 33
Message-ID: <20230904234329.835@kylheku.com>
References: <b74c088d-09e6-4842-8b6c-1921d68154c7n@googlegroups.com>
<d500e1f2-7486-4425-a7e2-4472cce70e44n@googlegroups.com>
<ucnl64$2p8as$1@dont-email.me>
<65d28a7d-ffd5-4b8b-b3f0-2500bb05f9b7n@googlegroups.com>
<ucoe3l$2t4o2$1@dont-email.me>
<557bf807-40c7-404b-9242-c26975faa42fn@googlegroups.com>
<ucprpd$38s6i$1@dont-email.me> <ucq1gd$39q14$1@dont-email.me>
<ucq86h$3auvq$1@dont-email.me> <ucqj27$3con1$1@dont-email.me>
<ucqpgp$3dnop$1@dont-email.me> <aa8IM.249421$f7Ub.27491@fx47.iad>
<ucr3kb$3f58o$1@dont-email.me> <ucs9pb$3nd9i$1@dont-email.me>
<ucsg9u$3ofr6$1@dont-email.me> <ucsk81$3p2kg$1@dont-email.me>
<ucsm1u$3pb1c$1@dont-email.me> <871qfiknil.fsf@bsb.me.uk>
<ucsu3s$3qfrk$1@dont-email.me> <87v8ctkbsj.fsf@bsb.me.uk>
<uctaf3$3v98j$1@dont-email.me> <87pm31jusi.fsf@bsb.me.uk>
<ucuvtc$cbnk$1@dont-email.me> <5JHIM.574995$qnnb.462524@fx11.iad>
<ucvk6s$f6nb$1@dont-email.me> <r1JIM.297958$uLJb.27694@fx41.iad>
<ucvuhq$gmlg$1@dont-email.me> <ud60pq$1mf0p$1@dont-email.me>
Injection-Date: Tue, 5 Sep 2023 06:49:17 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="af9c623da626f6ba74477b9a6e113613";
logging-data="1981474"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/AGrf01Gr9FvSxZpkNM1T2/AJOJKjuHfs="
User-Agent: slrn/pre1.0.4-9 (Linux)
Cancel-Lock: sha1:0TCy0U9U5gZEBtaHhQzFEO/ectA=
 by: Kaz Kylheku - Tue, 5 Sep 2023 06:49 UTC

On 2023-09-05, vallor <vallor@cultnix.org> wrote:
> On Sat, 2 Sep 2023 19:22:50 +0100, Bart <bc@freeuk.com> wrote in
><ucvuhq$gmlg$1@dont-email.me>:
>
>> If you have a function that you know will never return (becauses it
>> stays in a loop, or terminates, here or in a nested function), then why
>> would you give it a return type in the first place?
>
> Isn't asking a C compiler to watch for interminable loops and
> such things akin to trying to solve the halting problem?

The Halting Problem is academic. The main reasons why you can't
accurately determine reachability in C programs are practical:

- the compiler doesn't have the entire program, only a translation unit.
Whenever the reachability calculation depends on the result of an
external function, or value of an external variable or other object
whose manipulation is not entirely visible in the current translation
unit, a prudent assumption has to be made.

- there are also run-time inputs.

A Turing machine is completely defined and has no run-time inputs;
everything is on the tape.

A C program that is all in one translation unit, and takes no
input from the environment, resembles a Turing Machine.

--
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Mastodon: @Kazinator@mstdn.ca
NOTE: If you're posting from Google Groups, I don't see you!

Re: bart again (UCX64)

<ud735p$1v0kc$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=28768&group=comp.lang.c#28768

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.lang.c
Subject: Re: bart again (UCX64)
Date: Tue, 5 Sep 2023 13:24:40 +0200
Organization: A noiseless patient Spider
Lines: 139
Message-ID: <ud735p$1v0kc$1@dont-email.me>
References: <b74c088d-09e6-4842-8b6c-1921d68154c7n@googlegroups.com>
<ucr3kb$3f58o$1@dont-email.me> <ucs9pb$3nd9i$1@dont-email.me>
<ucsg9u$3ofr6$1@dont-email.me> <ucsk81$3p2kg$1@dont-email.me>
<ucsm1u$3pb1c$1@dont-email.me> <871qfiknil.fsf@bsb.me.uk>
<ucsu3s$3qfrk$1@dont-email.me> <87v8ctkbsj.fsf@bsb.me.uk>
<uctaf3$3v98j$1@dont-email.me> <20230901115322.184@kylheku.com>
<ucthg8$gvk$1@dont-email.me> <20230901133548.87@kylheku.com>
<uctl33$13ie$1@dont-email.me> <20230901150200.880@kylheku.com>
<ud1vqi$tuos$1@dont-email.me> <8734zvxra0.fsf@bsb.me.uk>
<ud27cn$vb5v$1@dont-email.me> <87pm2yvg0m.fsf@bsb.me.uk>
<ud48b0$1co8f$1@dont-email.me> <20230904092343.829@kylheku.com>
<87r0ndu6tf.fsf@bsb.me.uk> <20230904121509.86@kylheku.com>
<ud5db8$1k2dj$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 5 Sep 2023 11:24:41 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="eb3178d74d13030e42ba6c37747c04fd";
logging-data="2065036"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/q7IdMDhv1dyYHhfOBDmK3iaRYVKwVAfM="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.9.0
Cancel-Lock: sha1:LdNrWQc+s7LimzlxJh1N2z3FxDA=
In-Reply-To: <ud5db8$1k2dj$1@dont-email.me>
Content-Language: en-GB
 by: David Brown - Tue, 5 Sep 2023 11:24 UTC

On 04/09/2023 22:06, Bart wrote:
> On 04/09/2023 20:17, Kaz Kylheku wrote:
>> On 2023-09-04, Ben Bacarisse <ben.usenet@bsb.me.uk> wrote:
>>> For a long while I went along with the idea that "C" can mean many
>>> things, but that's not how Bart uses the term.  In fact, that's one of
>>> his big whinging topics -- C is what you care to make it.  So I changed
>>> my usage and posted the remark above.  He found it worthy of mockery,
>>> but did not want me to respond.  Go figure.
>>
>> C is a language family, like Lisp. Some people mean "Clojure"
>> when they are sayhing Lisp, some mean "Racket" or "Emacs Lisp".
>
> But there is still one current C standard, and one current set of
> standard headers?

There is one single official current C standard - currently C17. There
are older published C standards, which are still very relevant despite
being superseded by the latest version.

The standards documents from ISO cost money to buy, but drafts are
freely available - the final draft before publishing is typically
identical baring insignificant typographic fixes.

There is not a single set of standard headers. The requirements for the
standard library headers (and standard library functions) are part of
the C standards, but the headers themselves are provided by each C
implementation. It is common, but not required, for C compilers to have
the headers that don't have function declarations (such as <stdint.h>)
and are used for freestanding and hosted implementations, while other
headers are part of a standard library.

But different implementations will have different sets of standard
library headers as well as different implementations of the standard
library functions. And of course OS-specific headers are not part of
the C standard at all (even if they happen to be bundled along with a
compiler in some cases).

>
>>
>> Bart will just have to be patiently educated in the differences among:
>>
>> - language family
>> - language dialect
>> - language standard
>> - language implementation
>> - language reference manual
>
>
> Sure, how much more complicated do you want to make it?
>
> But while you're here, perhaps you can tell me which of those myriad Cs
> is being compiled in each case here:
>
>   gcc prog.c
>   clang prog.c
>   tcc lang.c
>   msvc lang.c
>   zig cc lang.c
>   lcc lang.c
>   pellesc lang.c       (I forget the actual compiler name)
>
> None of those likes to be verbose so it's rather a mystery what exactly
> they are doing.

It's not really a mystery in at least some of the cases. gcc and clang
have quite comprehensive documentation - you can easily look up the
options for the standards supported, as well as the default standard
(for the particular version of the compiler). I am not as familiar with
msvc, but I understand it too has a lot of documentation available.

As for the rest, I have not checked - and have no intention of doing so.
Some compilers provide good documentation, others do not. If you want
to use a particular tool, it makes sense to learn what it does - and if
you can't find out, it may not be a good choice of tool.

>
> All I know is that the family/dialect/standard in each case doesn't care
> amount making a missing 'return <value>' a hard error. So else are they
> being being lax over?

Read the documentation. Since a C compiler should not be giving a hard
error for the missing return, all we know is that compilers that /do/
give a hard error are not implementing standard C. But for details, see
the documentation.

>
> Do I have to to specify -Werror=xxx 173 times for all the possible
> things that ought to sensibly be hard errors?

"Sensible" in whose eyes? Yours? Silly question - of course that's
what you meant, because you are the sole judge of what is "sensible".

>
> BTW apparently 'gcc' is not a C compiler.

"gcc" is the "GNU Compiler Collection". It certainly /can/ be a C
compiler - but it is also many other things. Without additional flags,
it will compile an extended C dialect that has additional features
beyond the standard, and is also laxer (especially about supporting
newer or older constructs). This is all documented, and nothing new to you.

With appropriate flags (they are not particularly difficult) it will
support your choice of C standard. Additional flags can be used to
restrict the accepted code to a subset of this with warnings or error
messages for going outside that subset - such as requiring the use of
"return value;" statements in non-void functions.

"gcc" is also, depending on the details of the configuration, a Fortran
compiler, a D compiler, and a compiler for several other languages, as
well as a driver program and front-end for an assembler and a linker.

> That's both an interesting and
> useless bit of information. What is means is that 'gcc.exe' invokes
> programs like 'cc.exe', 'as.exe' and 'ld.exe', when presented with a -xc
> option or a .c file extension, but people, in a C context, colloquially
> refer to 'gcc' as a C compiler.
>

People do indeed refer to it colloquially as a C compiler - and
colloquially, that's absolutely fine. But if you want to be precise
about the exact handling of corners of the language, "colloquial" will
not do - you choose to go down that path, so you need to learn about
what "C" means technically, not just colloquially.

>
> I think you guys just want to keep things a mystery!

How can you possibly think that? People have explained this stuff to
you hundreds of times over a decade or more. For at least the serious
tools, all the information is clearly given in reference manuals online.
And if that were not enough, ten seconds of googling should give you
everything you are asking.

The only reason any of this is a mystery to you is the extraordinary
effort you put in to resist any attempt at understanding or learning.

Re: bart again (UCX64)

<ud74nj$1v8l5$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=28769&group=comp.lang.c#28769

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: bc...@freeuk.com (Bart)
Newsgroups: comp.lang.c
Subject: Re: bart again (UCX64)
Date: Tue, 5 Sep 2023 12:51:15 +0100
Organization: A noiseless patient Spider
Lines: 37
Message-ID: <ud74nj$1v8l5$1@dont-email.me>
References: <b74c088d-09e6-4842-8b6c-1921d68154c7n@googlegroups.com>
<d500e1f2-7486-4425-a7e2-4472cce70e44n@googlegroups.com>
<ucnl64$2p8as$1@dont-email.me>
<65d28a7d-ffd5-4b8b-b3f0-2500bb05f9b7n@googlegroups.com>
<ucoe3l$2t4o2$1@dont-email.me>
<557bf807-40c7-404b-9242-c26975faa42fn@googlegroups.com>
<ucprpd$38s6i$1@dont-email.me> <ucq1gd$39q14$1@dont-email.me>
<ucq86h$3auvq$1@dont-email.me> <ucqj27$3con1$1@dont-email.me>
<ucqpgp$3dnop$1@dont-email.me> <aa8IM.249421$f7Ub.27491@fx47.iad>
<ucr3kb$3f58o$1@dont-email.me> <ucs9pb$3nd9i$1@dont-email.me>
<ucsg9u$3ofr6$1@dont-email.me> <ucsk81$3p2kg$1@dont-email.me>
<ucsm1u$3pb1c$1@dont-email.me> <871qfiknil.fsf@bsb.me.uk>
<ucsu3s$3qfrk$1@dont-email.me> <87v8ctkbsj.fsf@bsb.me.uk>
<uctaf3$3v98j$1@dont-email.me> <87pm31jusi.fsf@bsb.me.uk>
<ucuvtc$cbnk$1@dont-email.me> <5JHIM.574995$qnnb.462524@fx11.iad>
<ucvk6s$f6nb$1@dont-email.me> <r1JIM.297958$uLJb.27694@fx41.iad>
<ucvuhq$gmlg$1@dont-email.me> <ud60pq$1mf0p$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 5 Sep 2023 11:51:15 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="12c26e2becd6d1e0d07f8c2ea7e50a28";
logging-data="2073253"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18PgAHTveT8NFpUKqV+lKqbbVmAhNeW3KM="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.14.0
Cancel-Lock: sha1:8gkmmUZlVyPgp4JvLP/u07qy9T4=
In-Reply-To: <ud60pq$1mf0p$1@dont-email.me>
 by: Bart - Tue, 5 Sep 2023 11:51 UTC

On 05/09/2023 02:38, vallor wrote:
> On Sat, 2 Sep 2023 19:22:50 +0100, Bart <bc@freeuk.com> wrote in
> <ucvuhq$gmlg$1@dont-email.me>:
>
>> If you have a function that you know will never return (becauses it
>> stays in a loop, or terminates, here or in a nested function), then why
>> would you give it a return type in the first place?
>
> Isn't asking a C compiler to watch for interminable loops and
> such things akin to trying to solve the halting problem?

Read my question again: if the programmer /knows/ it will never return.

Then they can choose to use a void function. (In the example given,
there was a need to match a non-void function.)

If you mean, whether a compiler can tell for sure whether it will reach
the end or not, then you're right, it can't:

int F(void) {
if (rand()!=12345) return 100;
}

I made a decision to require a return statement as the last or within a
branch of the last statement. That means this program fails as written.

That can be overridden because such programs exist in the wild. In this
case, what I can do (but haven't done and others don't do that I can
see), is to zero the register where a return value is expected, to give
at least predictable and repeatable behaviour.

You might say, that's an extra few bytes that might not be needed. But
compilers do seem to generate function epilogue code in this situation;
what's the point of that when the compiler assumes it cannot run into
the end because it would be UB?

Re: bart again (UCX64)

<86bkegpztj.fsf@linuxsc.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=28771&group=comp.lang.c#28771

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: tr.17...@z991.linuxsc.com (Tim Rentsch)
Newsgroups: comp.lang.c
Subject: Re: bart again (UCX64)
Date: Tue, 05 Sep 2023 05:30:32 -0700
Organization: A noiseless patient Spider
Lines: 14
Message-ID: <86bkegpztj.fsf@linuxsc.com>
References: <b74c088d-09e6-4842-8b6c-1921d68154c7n@googlegroups.com> <ucqj27$3con1$1@dont-email.me> <ucqpgp$3dnop$1@dont-email.me> <aa8IM.249421$f7Ub.27491@fx47.iad> <ucr3kb$3f58o$1@dont-email.me> <ucs9pb$3nd9i$1@dont-email.me> <ucsg9u$3ofr6$1@dont-email.me> <ucsk81$3p2kg$1@dont-email.me> <ucsm1u$3pb1c$1@dont-email.me> <871qfiknil.fsf@bsb.me.uk> <ucsu3s$3qfrk$1@dont-email.me> <87v8ctkbsj.fsf@bsb.me.uk> <uctaf3$3v98j$1@dont-email.me> <87pm31jusi.fsf@bsb.me.uk> <ucuvtc$cbnk$1@dont-email.me> <5JHIM.574995$qnnb.462524@fx11.iad> <ucvk6s$f6nb$1@dont-email.me> <r1JIM.297958$uLJb.27694@fx41.iad> <ucvuhq$gmlg$1@dont-email.me> <ud60pq$1mf0p$1@dont-email.me> <20230904234329.835@kylheku.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: dont-email.me; posting-host="6793c8bc2747e0ba6d3890411794594c";
logging-data="2084334"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18g2gA8RXbriXRLRbpe+DgFHaXCPxAl+ns="
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:yBLL0T4IwAUxiwF9q1JD81kLxcU=
sha1:+3eXNmFx90xZt88gbmSbNNUIVpg=
 by: Tim Rentsch - Tue, 5 Sep 2023 12:30 UTC

Kaz Kylheku <864-117-4973@kylheku.com> writes:

> A Turing machine is completely defined and has no run-time inputs;
> everything is on the tape.

This is wrong. A Turing machine is just the machine. The tape is
separate. It would be pointless to talk about "Turing machines"
if all a given "Turing machine" could do is one computation.

> A C program that is all in one translation unit, and takes no
> input from the environment, resembles a Turing Machine.

A Turing machine is analogous to a program, with the tape being
analogous to program input.

Re: bart again (UCX64)

<ud7e75$20tag$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=28776&group=comp.lang.c#28776

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: bc...@freeuk.com (Bart)
Newsgroups: comp.lang.c
Subject: Re: bart again (UCX64)
Date: Tue, 5 Sep 2023 15:33:09 +0100
Organization: A noiseless patient Spider
Lines: 44
Message-ID: <ud7e75$20tag$1@dont-email.me>
References: <b74c088d-09e6-4842-8b6c-1921d68154c7n@googlegroups.com>
<871qfiknil.fsf@bsb.me.uk> <ucsu3s$3qfrk$1@dont-email.me>
<87v8ctkbsj.fsf@bsb.me.uk> <uctaf3$3v98j$1@dont-email.me>
<20230901115322.184@kylheku.com> <ucthg8$gvk$1@dont-email.me>
<20230901133548.87@kylheku.com> <uctl33$13ie$1@dont-email.me>
<20230901150200.880@kylheku.com> <ud1vqi$tuos$1@dont-email.me>
<8734zvxra0.fsf@bsb.me.uk> <ud27cn$vb5v$1@dont-email.me>
<87pm2yvg0m.fsf@bsb.me.uk> <ud48b0$1co8f$1@dont-email.me>
<20230904092343.829@kylheku.com> <87r0ndu6tf.fsf@bsb.me.uk>
<20230904121509.86@kylheku.com> <ud5db8$1k2dj$1@dont-email.me>
<878r9l5ym0.fsf@nosuchdomain.example.com> <ud5qka$1lrm2$1@dont-email.me>
<874jk95vaz.fsf@nosuchdomain.example.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 5 Sep 2023 14:33:10 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="12c26e2becd6d1e0d07f8c2ea7e50a28";
logging-data="2127184"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX196DxitgSYn4XqesLRHxtFSb+2N4E5qAMI="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.14.0
Cancel-Lock: sha1:PUpR+gShnWTe4DuSWiRqid+Zano=
In-Reply-To: <874jk95vaz.fsf@nosuchdomain.example.com>
 by: Bart - Tue, 5 Sep 2023 14:33 UTC

On 05/09/2023 01:16, Keith Thompson wrote:
> Bart <bc@freeuk.com> writes:
>> On 05/09/2023 00:04, Keith Thompson wrote:
>>> Bart <bc@freeuk.com> writes:
>>> [...]
>>>> All I know is that the family/dialect/standard in each case doesn't
>>>> care amount making a missing 'return <value>' a hard error. So else
>>>> are they being being lax over?
>>> I have what I think is a very simple question for you. Will you
>>> acknowledge that the ISO C standard does not require a diagnostic
>>> for a missing return statement in a non-void function?
>>> I'm asking you for nothing more than a "yes" or "no" answer. You
>>> can
>>> of course follow that with anything you like, but a "yes" or "no"
>>> would be helpful -- or a brief explanation of why you think neither
>>> "yes" nor "no" is a meaningful answer.
>>> [...]
>
> I note your refusal to answer this simple question.

If you mean this:

> Will you
acknowledge that the ISO C standard does not require a diagnostic
for a missing return statement in a non-void function?

Then I don't know. I will have to take somebody's word for it. You seem
to be implying the answer is Yes, so Yes.

In my revised C compiler, I've taken out the -old option (it is now the
default), and no longer bother to the extra check for a solid return
value from a non-void function. Since nobody else cares, I'm not going
to either, and you are now saying I can do that.

(I may, however, need to insert an all-zeros return value in the
generated code, since the IR is stack-based and that becomes more critical.)

But both of the following are still hard errors:

int fred(void) {return;}
void bill(void) {return 1;}

Re: bart again (UCX64)

<gjHJM.660199$U3w1.313689@fx09.iad>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=28777&group=comp.lang.c#28777

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!news.1d4.us!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx09.iad.POSTED!not-for-mail
X-newsreader: xrn 9.03-beta-14-64bit
Sender: scott@dragon.sl.home (Scott Lurndal)
From: sco...@slp53.sl.home (Scott Lurndal)
Reply-To: slp53@pacbell.net
Subject: Re: bart again (UCX64)
Newsgroups: comp.lang.c
References: <b74c088d-09e6-4842-8b6c-1921d68154c7n@googlegroups.com> <ud1vqi$tuos$1@dont-email.me> <8734zvxra0.fsf@bsb.me.uk> <ud27cn$vb5v$1@dont-email.me> <87pm2yvg0m.fsf@bsb.me.uk> <ud48b0$1co8f$1@dont-email.me> <20230904092343.829@kylheku.com> <87r0ndu6tf.fsf@bsb.me.uk> <20230904121509.86@kylheku.com> <ud5db8$1k2dj$1@dont-email.me> <878r9l5ym0.fsf@nosuchdomain.example.com> <ud5qka$1lrm2$1@dont-email.me> <874jk95vaz.fsf@nosuchdomain.example.com> <ud7e75$20tag$1@dont-email.me>
Lines: 30
Message-ID: <gjHJM.660199$U3w1.313689@fx09.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Tue, 05 Sep 2023 14:55:08 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Tue, 05 Sep 2023 14:55:08 GMT
X-Received-Bytes: 2192
 by: Scott Lurndal - Tue, 5 Sep 2023 14:55 UTC

Bart <bc@freeuk.com> writes:
>On 05/09/2023 01:16, Keith Thompson wrote:
>> Bart <bc@freeuk.com> writes:
>>> On 05/09/2023 00:04, Keith Thompson wrote:
>>>> Bart <bc@freeuk.com> writes:
>>>> [...]
>>>>> All I know is that the family/dialect/standard in each case doesn't
>>>>> care amount making a missing 'return <value>' a hard error. So else
>>>>> are they being being lax over?
>>>> I have what I think is a very simple question for you. Will you
>>>> acknowledge that the ISO C standard does not require a diagnostic
>>>> for a missing return statement in a non-void function?
>>>> I'm asking you for nothing more than a "yes" or "no" answer. You
>>>> can
>>>> of course follow that with anything you like, but a "yes" or "no"
>>>> would be helpful -- or a brief explanation of why you think neither
>>>> "yes" nor "no" is a meaningful answer.
>>>> [...]
>>
>> I note your refusal to answer this simple question.
>
>If you mean this:
>
> > Will you
>acknowledge that the ISO C standard does not require a diagnostic
>for a missing return statement in a non-void function?
>
>Then I don't know.

You can download and read the document to alleviate your ignorance.

Re: bart again (UCX64)

<b7a1aa95-3ad1-49be-9cd0-8f9194e2f616n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=28778&group=comp.lang.c#28778

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:a05:622a:43:b0:40b:2fd7:55a8 with SMTP id y3-20020a05622a004300b0040b2fd755a8mr298320qtw.8.1693927860294;
Tue, 05 Sep 2023 08:31:00 -0700 (PDT)
X-Received: by 2002:a63:a749:0:b0:564:9d5e:c985 with SMTP id
w9-20020a63a749000000b005649d5ec985mr2902225pgo.1.1693927859669; Tue, 05 Sep
2023 08:30:59 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.c
Date: Tue, 5 Sep 2023 08:30:59 -0700 (PDT)
In-Reply-To: <gjHJM.660199$U3w1.313689@fx09.iad>
Injection-Info: google-groups.googlegroups.com; posting-host=94.140.11.173; posting-account=D7BwHgoAAACV1Tl_fumDZI18HMumYhzy
NNTP-Posting-Host: 94.140.11.173
References: <b74c088d-09e6-4842-8b6c-1921d68154c7n@googlegroups.com>
<ud1vqi$tuos$1@dont-email.me> <8734zvxra0.fsf@bsb.me.uk> <ud27cn$vb5v$1@dont-email.me>
<87pm2yvg0m.fsf@bsb.me.uk> <ud48b0$1co8f$1@dont-email.me> <20230904092343.829@kylheku.com>
<87r0ndu6tf.fsf@bsb.me.uk> <20230904121509.86@kylheku.com>
<ud5db8$1k2dj$1@dont-email.me> <878r9l5ym0.fsf@nosuchdomain.example.com>
<ud5qka$1lrm2$1@dont-email.me> <874jk95vaz.fsf@nosuchdomain.example.com>
<ud7e75$20tag$1@dont-email.me> <gjHJM.660199$U3w1.313689@fx09.iad>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <b7a1aa95-3ad1-49be-9cd0-8f9194e2f616n@googlegroups.com>
Subject: Re: bart again (UCX64)
From: bobbymoo...@gmail.com (Bobby Moore)
Injection-Date: Tue, 05 Sep 2023 15:31:00 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2773
 by: Bobby Moore - Tue, 5 Sep 2023 15:30 UTC

https://methamphetaminebox.com/
https://methamphetaminebox.com/product/buy-dmt-5ml-deadhead-chemist-cartridge/
https://methamphetaminebox.com/product/buy-schwifty-labs-1ml-dmt-cartridge/
https://methamphetaminebox.com/product/buy-schwifty-labs-1ml-5-meo-dmt-cartridge/
https://methamphetaminebox.com/product/buy-schwifty-labs-5ml-dmt-cartridge/
https://methamphetaminebox.com/product/buy-schwifty-labs-5-ml-5-meo-dmt-cartridge/
https://methamphetaminebox.com/product/buy-purecybin-1ml-700mg-dmt-carts/
https://methamphetaminebox.com/product/buy-puff-boyz-nn-dmt-5ml400mg-wild-apple-carts/
https://methamphetaminebox.com/product/buy-puff-boyz-nn-dmt-5ml400mg-wild-apple-carts/
https://methamphetaminebox.com/product/buy-crystal-meth-online/
https://methamphetaminebox.com/product/buy-4-fa-powder-online/
https://methamphetaminebox.com/product/buy-25i-nbome-powder-legally/
https://methamphetaminebox.com/product/a-pvp-crystals-for-sale/
https://methamphetaminebox.com/product/buy-alprazolam-powder-updated-2023/
https://methamphetaminebox.com/product/buy-alprazolam-powder-updated-2023/
https://methamphetaminebox.com/product/buy-dmt-crystal-online/
https://methamphetaminebox.com/product/buy-diclazepam-online/

Re: bart again (UCX64)

<ud7hkm$21ds7$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=28779&group=comp.lang.c#28779

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.lang.c
Subject: Re: bart again (UCX64)
Date: Tue, 5 Sep 2023 17:31:34 +0200
Organization: A noiseless patient Spider
Lines: 56
Message-ID: <ud7hkm$21ds7$1@dont-email.me>
References: <b74c088d-09e6-4842-8b6c-1921d68154c7n@googlegroups.com>
<871qfiknil.fsf@bsb.me.uk> <ucsu3s$3qfrk$1@dont-email.me>
<87v8ctkbsj.fsf@bsb.me.uk> <uctaf3$3v98j$1@dont-email.me>
<20230901115322.184@kylheku.com> <ucthg8$gvk$1@dont-email.me>
<20230901133548.87@kylheku.com> <uctl33$13ie$1@dont-email.me>
<20230901150200.880@kylheku.com> <ud1vqi$tuos$1@dont-email.me>
<8734zvxra0.fsf@bsb.me.uk> <ud27cn$vb5v$1@dont-email.me>
<87pm2yvg0m.fsf@bsb.me.uk> <ud48b0$1co8f$1@dont-email.me>
<20230904092343.829@kylheku.com> <87r0ndu6tf.fsf@bsb.me.uk>
<20230904121509.86@kylheku.com> <ud5db8$1k2dj$1@dont-email.me>
<878r9l5ym0.fsf@nosuchdomain.example.com> <ud5qka$1lrm2$1@dont-email.me>
<874jk95vaz.fsf@nosuchdomain.example.com> <ud7e75$20tag$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 5 Sep 2023 15:31:34 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="eb3178d74d13030e42ba6c37747c04fd";
logging-data="2144135"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+23s08AhliZSUxEimgQ8zBIXzJIDBwcws="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.9.0
Cancel-Lock: sha1:q1Bqc00qHTIwMfBbvYnLDesl244=
Content-Language: en-GB
In-Reply-To: <ud7e75$20tag$1@dont-email.me>
 by: David Brown - Tue, 5 Sep 2023 15:31 UTC

On 05/09/2023 16:33, Bart wrote:
> On 05/09/2023 01:16, Keith Thompson wrote:
>> Bart <bc@freeuk.com> writes:
>>> On 05/09/2023 00:04, Keith Thompson wrote:
>>>> Bart <bc@freeuk.com> writes:
>>>> [...]
>>>>> All I know is that the family/dialect/standard in each case doesn't
>>>>> care amount making a missing 'return <value>' a hard error. So else
>>>>> are they being being lax over?
>>>> I have what I think is a very simple question for you.  Will you
>>>> acknowledge that the ISO C standard does not require a diagnostic
>>>> for a missing return statement in a non-void function?
>>>> I'm asking you for nothing more than a "yes" or "no" answer.  You
>>>> can
>>>> of course follow that with anything you like, but a "yes" or "no"
>>>> would be helpful -- or a brief explanation of why you think neither
>>>> "yes" nor "no" is a meaningful answer.
>>>> [...]
>>
>> I note your refusal to answer this simple question.
>
> If you mean this:
>
> > Will you
> acknowledge that the ISO C standard does not require a diagnostic
> for a missing return statement in a non-void function?
>
> Then I don't know. I will have to take somebody's word for it. You seem
> to be implying the answer is Yes, so Yes.

Is there some reason that you won't look at the standard here? There
are parts of the C standards that are a bit difficult to read, but
surely you are able to read enough to determine the answer for yourself?
Certainly /I/ would be happier to hear that you have looked at the
standards document yourself and understood it. No one wants you just to
take their word for it - after all, you believe very little of things
other people write, and twist much of it to fit your paranoia and confusion.

>
> In my revised C compiler, I've taken out the -old option (it is now the
> default), and no longer bother to the extra check for a solid return
> value from a non-void function. Since nobody else cares, I'm not going
> to either, and you are now saying I can do that.
>
> (I may, however, need to insert an all-zeros return value in the
> generated code, since the IR is stack-based and that becomes more
> critical.)
>
> But both of the following are still hard errors:
>
>   int fred(void) {return;}
>   void bill(void) {return 1;}
>
>
>

Re: bart again (UCX64)

<ud7n60$22dof$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=28780&group=comp.lang.c#28780

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: bc...@freeuk.com (Bart)
Newsgroups: comp.lang.c
Subject: Re: bart again (UCX64)
Date: Tue, 5 Sep 2023 18:06:08 +0100
Organization: A noiseless patient Spider
Lines: 76
Message-ID: <ud7n60$22dof$1@dont-email.me>
References: <b74c088d-09e6-4842-8b6c-1921d68154c7n@googlegroups.com>
<871qfiknil.fsf@bsb.me.uk> <ucsu3s$3qfrk$1@dont-email.me>
<87v8ctkbsj.fsf@bsb.me.uk> <uctaf3$3v98j$1@dont-email.me>
<20230901115322.184@kylheku.com> <ucthg8$gvk$1@dont-email.me>
<20230901133548.87@kylheku.com> <uctl33$13ie$1@dont-email.me>
<20230901150200.880@kylheku.com> <ud1vqi$tuos$1@dont-email.me>
<8734zvxra0.fsf@bsb.me.uk> <ud27cn$vb5v$1@dont-email.me>
<87pm2yvg0m.fsf@bsb.me.uk> <ud48b0$1co8f$1@dont-email.me>
<20230904092343.829@kylheku.com> <87r0ndu6tf.fsf@bsb.me.uk>
<20230904121509.86@kylheku.com> <ud5db8$1k2dj$1@dont-email.me>
<878r9l5ym0.fsf@nosuchdomain.example.com> <ud5qka$1lrm2$1@dont-email.me>
<874jk95vaz.fsf@nosuchdomain.example.com> <ud7e75$20tag$1@dont-email.me>
<ud7hkm$21ds7$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 5 Sep 2023 17:06:08 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="12c26e2becd6d1e0d07f8c2ea7e50a28";
logging-data="2176783"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18+ShxXsa2keKJBqEgOCRA5WhGc/fIhP3s="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.14.0
Cancel-Lock: sha1:FUbPeI+GkvUk6ITRy0I7mdVUya8=
In-Reply-To: <ud7hkm$21ds7$1@dont-email.me>
 by: Bart - Tue, 5 Sep 2023 17:06 UTC

On 05/09/2023 16:31, David Brown wrote

BC:
>> If you mean this:
>>
>>  > Will you
>> acknowledge that the ISO C standard does not require a diagnostic
>> for a missing return statement in a non-void function?
>>
>> Then I don't know. I will have to take somebody's word for it. You
>> seem to be implying the answer is Yes, so Yes.
>
> Is there some reason that you won't look at the standard here?

Yes, it's like someone asking me to check the Bible to see for myself
whether it mentions something or not. But it's quite a big book, and
maybe I'd have to collate slightly different quites in different places.
And maybe I'd end up looking in the wrong place.

>  There
> are parts of the C standards that are a bit difficult to read, but
> surely you are able to read enough to determine the answer for yourself?
>  Certainly /I/ would be happier to hear that you have looked at the
> standards document yourself and understood it.

The standard wouldn't be enough. I'd need to know the reasons behind why
it says what it says.

If it is more lax than I would like, is that because it it had to
reflect widespread disregard in the existing range of compilers, rather
than what would be a preferable and safer guidance?

And if it is more strict about something I don't consider important, how
seriously should I have to take it?

Because I don't believe in warnings on a routine compilation, I need to
consider carefully whether something should be failed. I like to base
that also on the extensive experience I have with my own languages.

We need to end up with practical, useful tools.

Take this bit of code:

int* p;
double* q;

p = q;

These pointers are not compatible. Now for many years, my own language
ignored that fact, after all these are just addresses. Until I spent 6
hours tracking down a bug caused by such a mismatch.

Now it is a hard error in my language, and in my C compiler.

Not in most compilers however. Should I need to look at the C standard
for guidance? Honestly, I don't care what it says about it. That's the
same document that tells me I can't use an EXPLICIT CAST to convert an
address from a function type to object type or some thing (but two
nested casts are fine!).

Presumably, since compilers don't normally fail this, it's not going to
care what they do. Either it's going say a diagnostic is not required,
or one is, but it's not going to say it needs to be a fatal one (what
/should/ be fatal according to the C standard?).

So common sense plays a bigger role here. In my compiler you have to do
one of:

p = (int*)q;
p = (void*)q;

At least it will until forced to relax that because there is so much bad
code about due to decades of lax compilers.

Re: bart again (UCX64)

<20230905075103.116@kylheku.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=28781&group=comp.lang.c#28781

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: 864-117-...@kylheku.com (Kaz Kylheku)
Newsgroups: comp.lang.c
Subject: Re: bart again (UCX64)
Date: Tue, 5 Sep 2023 17:16:43 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 26
Message-ID: <20230905075103.116@kylheku.com>
References: <b74c088d-09e6-4842-8b6c-1921d68154c7n@googlegroups.com>
<ucqj27$3con1$1@dont-email.me> <ucqpgp$3dnop$1@dont-email.me>
<aa8IM.249421$f7Ub.27491@fx47.iad> <ucr3kb$3f58o$1@dont-email.me>
<ucs9pb$3nd9i$1@dont-email.me> <ucsg9u$3ofr6$1@dont-email.me>
<ucsk81$3p2kg$1@dont-email.me> <ucsm1u$3pb1c$1@dont-email.me>
<871qfiknil.fsf@bsb.me.uk> <ucsu3s$3qfrk$1@dont-email.me>
<87v8ctkbsj.fsf@bsb.me.uk> <uctaf3$3v98j$1@dont-email.me>
<87pm31jusi.fsf@bsb.me.uk> <ucuvtc$cbnk$1@dont-email.me>
<5JHIM.574995$qnnb.462524@fx11.iad> <ucvk6s$f6nb$1@dont-email.me>
<r1JIM.297958$uLJb.27694@fx41.iad> <ucvuhq$gmlg$1@dont-email.me>
<ud60pq$1mf0p$1@dont-email.me> <20230904234329.835@kylheku.com>
<86bkegpztj.fsf@linuxsc.com>
Injection-Date: Tue, 5 Sep 2023 17:16:43 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="af9c623da626f6ba74477b9a6e113613";
logging-data="2180196"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/N0rgOhu5ujmaiWAUOImD1USzIEnQmisY="
User-Agent: slrn/pre1.0.4-9 (Linux)
Cancel-Lock: sha1:44UCmhbxJUIejMgHB0LvpFWVLKk=
 by: Kaz Kylheku - Tue, 5 Sep 2023 17:16 UTC

On 2023-09-05, Tim Rentsch <tr.17687@z991.linuxsc.com> wrote:
> Kaz Kylheku <864-117-4973@kylheku.com> writes:
>
>> A Turing machine is completely defined and has no run-time inputs;
>> everything is on the tape.
>
> This is wrong. A Turing machine is just the machine. The tape is
> separate.

Apologies for that. A term for what I'm referring to is
"Turing machine configuration" (offered in _Introduction to the
Theory of Computation_, 3rd ed, Michael Sipser).

I picked up the synecdoche somewhere.

> It would be pointless to talk about "Turing machines"
> if all a given "Turing machine" could do is one computation.

"Does this Turing machine configuration halt?" is a
meaningful question.

--
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Mastodon: @Kazinator@mstdn.ca
NOTE: If you're posting from Google Groups, I don't see you!

Re: bart again (UCX64)

<20230905101716.895@kylheku.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=28782&group=comp.lang.c#28782

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: 864-117-...@kylheku.com (Kaz Kylheku)
Newsgroups: comp.lang.c
Subject: Re: bart again (UCX64)
Date: Tue, 5 Sep 2023 17:54:43 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 149
Message-ID: <20230905101716.895@kylheku.com>
References: <b74c088d-09e6-4842-8b6c-1921d68154c7n@googlegroups.com>
<871qfiknil.fsf@bsb.me.uk> <ucsu3s$3qfrk$1@dont-email.me>
<87v8ctkbsj.fsf@bsb.me.uk> <uctaf3$3v98j$1@dont-email.me>
<20230901115322.184@kylheku.com> <ucthg8$gvk$1@dont-email.me>
<20230901133548.87@kylheku.com> <uctl33$13ie$1@dont-email.me>
<20230901150200.880@kylheku.com> <ud1vqi$tuos$1@dont-email.me>
<8734zvxra0.fsf@bsb.me.uk> <ud27cn$vb5v$1@dont-email.me>
<87pm2yvg0m.fsf@bsb.me.uk> <ud48b0$1co8f$1@dont-email.me>
<20230904092343.829@kylheku.com> <87r0ndu6tf.fsf@bsb.me.uk>
<20230904121509.86@kylheku.com> <ud5db8$1k2dj$1@dont-email.me>
<878r9l5ym0.fsf@nosuchdomain.example.com> <ud5qka$1lrm2$1@dont-email.me>
<874jk95vaz.fsf@nosuchdomain.example.com> <ud7e75$20tag$1@dont-email.me>
<ud7hkm$21ds7$1@dont-email.me> <ud7n60$22dof$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 5 Sep 2023 17:54:43 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="af9c623da626f6ba74477b9a6e113613";
logging-data="2191451"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/fWUD/Te3TGRZ/8w7wyh9hUrEvdQ2s/YM="
User-Agent: slrn/pre1.0.4-9 (Linux)
Cancel-Lock: sha1:ji8qzlnvJtm4KiCYJzaRf7ZdJAQ=
 by: Kaz Kylheku - Tue, 5 Sep 2023 17:54 UTC

On 2023-09-05, Bart <bc@freeuk.com> wrote:
> The standard wouldn't be enough. I'd need to know the reasons behind why
> it says what it says.

When the first C standard was ratified in 1989, the committee wrote a
Rationale. If you google for "ANSI C Rationale" you can find it.

There are footnotes in every revision in the standard which sometimes
give clarifications that constitute rationalee.

> If it is more lax than I would like, is that because it it had to
> reflect widespread disregard in the existing range of compilers, rather
> than what would be a preferable and safer guidance?
>
> And if it is more strict about something I don't consider important, how
> seriously should I have to take it?

In that case, you can emulate the thinking of Richard Stallman and GNU.

In the GNU Coding Standards, there are passages about external
sstandards: https://www.gnu.org/prep/standards/

"The GNU Project regards standards published by other organizations as
suggestions, not orders. We consider those standards, but we do not
“obey” them. In developing a GNU program, you should implement an
outside standard’s specifications when that makes the GNU system
better overall in an objective sense. When it doesn’t, you shouldn’t.

[ ... snip ... ]

For instance, Standard C says that nearly all extensions to C are
prohibited. How silly! GCC implements many extensions, some of which
were later adopted as part of the standard. If you want these
constructs to give an error message as “required” by the standard, you
must specify ‘--pedantic’, which was implemented only so that we can
say “GCC is a 100% implementation of the standard”, not because there
is any reason to actually use it."

I don't agree with everything in the second paragraph, but it gives
you a flavor for why GCC is the way it is, and why it accepts the
GNU C dialect by default, in which syntax that is invalid ISO C
has a meaning and is accepted silently.

When they say there is no reason to use --pedantic, they are saying
there is no reason to use any compiler other than GCC, and therefore
no reason to diagnose whether your code has nonportable GCC-only
features.

> Because I don't believe in warnings on a routine compilation, I need to
> consider carefully whether something should be failed. I like to base
> that also on the extensive experience I have with my own languages.
>
> We need to end up with practical, useful tools.
>
> Take this bit of code:
>
> int* p;
> double* q;
>
> p = q;
>
> These pointers are not compatible. Now for many years, my own language
> ignored that fact, after all these are just addresses. Until I spent 6
> hours tracking down a bug caused by such a mismatch.

Right? So at least a warning diagnostic is useful. The ISO C standard
doesn't distinguis warning and error diagnostics. It specifies only
diagnostics. If a program requires an diagnostic by ISO C, the
implementation may also stop translating it. If it is translated anyway,
it has undefined behavior.

GCC warns about a conversion between unlike pointers without a cast;
if a cast is used, then there is no diagnostic.

> Now it is a hard error in my language, and in my C compiler.

Like with gcc -Werror=incompatible-pointer-types.

To the astute developer compiling programs locally, there is
no difference; that developer takes warnings seriously.

In large team projects, you can get sloppy programmers who don't
pay attention to warnings. Code is submitted to some review system which
builds the code. Reviewers typically don't look at the build log, only
at the code and the fact that the build passed. (Code built, unit tests
went "green"). So it's easy for warnings to go unnoticed.

> Not in most compilers however. Should I need to look at the C standard
> for guidance? Honestly, I don't care what it says about it.

The right attitude is to care about the bug first. But what the
standard says about it is important for conformance.

> That's the
> same document that tells me I can't use an EXPLICIT CAST to convert an
> address from a function type to object type or some thing (but two
> nested casts are fine!).

This is explicitly acknowledged as a common extension in an Appendix!

It is not disallowed; no diagnostic is required for a program which
performs that conversion with a cast. It is undefined behavior.

If your compiler cannot support a certain conversion (like say that
for some reason you had had 128 bit function pointers, but 64 bit data
pointers), then it would make sense for it to diagnose that the
conversion can't be done.

> Presumably, since compilers don't normally fail this, it's not going to
> care what they do. Either it's going say a diagnostic is not required,
> or one is, but it's not going to say it needs to be a fatal one (what
> /should/ be fatal according to the C standard?).

Nothing is ever required to be fatal! Some things must be diagnosed,
but diagnostics are not required to be fatal.

Diagnostics that are required are not required to be distinguishable
from custom diagnostics developed by the implementation.

> So common sense plays a bigger role here. In my compiler you have to do
> one of:
>
> p = (int*)q;
> p = (void*)q;
>
> At least it will until forced to relax that because there is so much bad
> code about due to decades of lax compilers.

Yes, other lax compilers can create pressure for yours to be lax.

If someone has a big program with a 1000 instances of a pointer
conversion without a cast, which someone else's compiler only warns
about, and your compiler bails on the first instance, that goofy user
might sadly choose to avoid your compiler than fix their code.

In general, many people working with C are not familiar with the
standard.

Then there are those that are, and abhor the idea that a program
compiles if it converts between pointers without a cast.

You can see why GCC is flexible about picking and choosing diagnostics,
and whether they are fatal.

--
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Mastodon: @Kazinator@mstdn.ca
NOTE: If you're posting from Google Groups, I don't see you!

Re: bart again (UCX64)

<ud7qto$22uso$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=28783&group=comp.lang.c#28783

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.lang.c
Subject: Re: bart again (UCX64)
Date: Tue, 5 Sep 2023 20:10:00 +0200
Organization: A noiseless patient Spider
Lines: 47
Message-ID: <ud7qto$22uso$1@dont-email.me>
References: <b74c088d-09e6-4842-8b6c-1921d68154c7n@googlegroups.com>
<871qfiknil.fsf@bsb.me.uk> <ucsu3s$3qfrk$1@dont-email.me>
<87v8ctkbsj.fsf@bsb.me.uk> <uctaf3$3v98j$1@dont-email.me>
<20230901115322.184@kylheku.com> <ucthg8$gvk$1@dont-email.me>
<20230901133548.87@kylheku.com> <uctl33$13ie$1@dont-email.me>
<20230901150200.880@kylheku.com> <ud1vqi$tuos$1@dont-email.me>
<8734zvxra0.fsf@bsb.me.uk> <ud27cn$vb5v$1@dont-email.me>
<87pm2yvg0m.fsf@bsb.me.uk> <ud48b0$1co8f$1@dont-email.me>
<20230904092343.829@kylheku.com> <87r0ndu6tf.fsf@bsb.me.uk>
<20230904121509.86@kylheku.com> <ud5db8$1k2dj$1@dont-email.me>
<878r9l5ym0.fsf@nosuchdomain.example.com> <ud5qka$1lrm2$1@dont-email.me>
<874jk95vaz.fsf@nosuchdomain.example.com> <ud7e75$20tag$1@dont-email.me>
<ud7hkm$21ds7$1@dont-email.me> <ud7n60$22dof$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 5 Sep 2023 18:10:01 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="c41207aa227bddb309df4d4dbb47ef72";
logging-data="2194328"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/Q9h7q7CmSxKU4Rpeo9JPCi6n+xdPlB0c="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.13.0
Cancel-Lock: sha1:7X3d5nR690MJpNWEr4tMYDu+z1c=
Content-Language: en-GB
In-Reply-To: <ud7n60$22dof$1@dont-email.me>
 by: David Brown - Tue, 5 Sep 2023 18:10 UTC

On 05/09/2023 19:06, Bart wrote:
> On 05/09/2023 16:31, David Brown wrote
>
> BC:
>>> If you mean this:
>>>
>>>  > Will you
>>> acknowledge that the ISO C standard does not require a diagnostic
>>> for a missing return statement in a non-void function?
>>>
>>> Then I don't know. I will have to take somebody's word for it. You
>>> seem to be implying the answer is Yes, so Yes.
>>
>> Is there some reason that you won't look at the standard here?
>
> Yes, it's like someone asking me to check the Bible to see for myself
> whether it mentions something or not. But it's quite a big book, and
> maybe I'd have to collate slightly different quites in different places.
> And maybe I'd end up looking in the wrong place.
>

I regularly give you references in the C standard, so that you don't
need to figure out where to look. But do you ever use these references?

Have you ever looked at the C standards (any version) ? For that
matter, have you ever looked at a Bible - clearly you've skipped at
least one of these.

Read "6.8.6.4 The return statement" and "6.9.1 Function definitions".
No more pathetic excuses.

>
>>   There are parts of the C standards that are a bit difficult to read,
>> but surely you are able to read enough to determine the answer for
>> yourself?   Certainly /I/ would be happier to hear that you have
>> looked at the standards document yourself and understood it.
>
> The standard wouldn't be enough. I'd need to know the reasons behind why
> it says what it says.

Start with the standard, and let's go from there. Learn what it says,
then ask why, then listen when people tell you.

And stick to one thing at a time. Two thoughts on the same day appear
to be beyond you, and we don't want you to get confused again.

Re: bart again (UCX64)

<ud816v$23vpc$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=28784&group=comp.lang.c#28784

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: bc...@freeuk.com (Bart)
Newsgroups: comp.lang.c
Subject: Re: bart again (UCX64)
Date: Tue, 5 Sep 2023 20:57:19 +0100
Organization: A noiseless patient Spider
Lines: 94
Message-ID: <ud816v$23vpc$1@dont-email.me>
References: <b74c088d-09e6-4842-8b6c-1921d68154c7n@googlegroups.com>
<871qfiknil.fsf@bsb.me.uk> <ucsu3s$3qfrk$1@dont-email.me>
<87v8ctkbsj.fsf@bsb.me.uk> <uctaf3$3v98j$1@dont-email.me>
<20230901115322.184@kylheku.com> <ucthg8$gvk$1@dont-email.me>
<20230901133548.87@kylheku.com> <uctl33$13ie$1@dont-email.me>
<20230901150200.880@kylheku.com> <ud1vqi$tuos$1@dont-email.me>
<8734zvxra0.fsf@bsb.me.uk> <ud27cn$vb5v$1@dont-email.me>
<87pm2yvg0m.fsf@bsb.me.uk> <ud48b0$1co8f$1@dont-email.me>
<20230904092343.829@kylheku.com> <87r0ndu6tf.fsf@bsb.me.uk>
<20230904121509.86@kylheku.com> <ud5db8$1k2dj$1@dont-email.me>
<878r9l5ym0.fsf@nosuchdomain.example.com> <ud5qka$1lrm2$1@dont-email.me>
<874jk95vaz.fsf@nosuchdomain.example.com> <ud7e75$20tag$1@dont-email.me>
<ud7hkm$21ds7$1@dont-email.me> <ud7n60$22dof$1@dont-email.me>
<ud7qto$22uso$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 5 Sep 2023 19:57:19 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="12c26e2becd6d1e0d07f8c2ea7e50a28";
logging-data="2228012"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19rsgAMQt9OxOtM5PUN4wTyv7CTcAtWOKs="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.14.0
Cancel-Lock: sha1:31mgHAZ9wKZTvV4arGj5L+JGyaA=
In-Reply-To: <ud7qto$22uso$1@dont-email.me>
 by: Bart - Tue, 5 Sep 2023 19:57 UTC

On 05/09/2023 19:10, David Brown wrote:
> On 05/09/2023 19:06, Bart wrote:
>> On 05/09/2023 16:31, David Brown wrote
>>
>> BC:
>>>> If you mean this:
>>>>
>>>>  > Will you
>>>> acknowledge that the ISO C standard does not require a diagnostic
>>>> for a missing return statement in a non-void function?
>>>>
>>>> Then I don't know. I will have to take somebody's word for it. You
>>>> seem to be implying the answer is Yes, so Yes.
>>>
>>> Is there some reason that you won't look at the standard here?
>>
>> Yes, it's like someone asking me to check the Bible to see for myself
>> whether it mentions something or not. But it's quite a big book, and
>> maybe I'd have to collate slightly different quites in different
>> places. And maybe I'd end up looking in the wrong place.
>>
>
> I regularly give you references in the C standard, so that you don't
> need to figure out where to look.  But do you ever use these references?
>
> Have you ever looked at the C standards (any version) ?  For that
> matter, have you ever looked at a Bible - clearly you've skipped at
> least one of these.

Admired it, yes. I have a huge edition printed in 1792.

>
> Read "6.8.6.4 The return statement"

6.8.6.4p1 says:

"1 A return statement with an expression shall not appear in a function
whose return type is void. A return statement without an expression
shall only appear in a function whose return type is void."

Aren't these the exact same examples that I recently posted? I already
said I fail those. Although looking at that wording, it is quite
confusing. It appears to say this:

Void func Non-void func

return expr; Not allowed (1)

return; Only here (2)

It doesn't say anything about Non-void functions, so we have to draw
inferences: presumably (1) must be 'Only here', and (2) must be 'Not
allowed'. So:

(Proc) (Func) (My terms)
Void func Non-void func

return expr; N Y

return; Y N

A bit clearer, yes? Maybe /I/ should be writing it! I already implement
these because they are common sense, but the question was, what should a
compiler do about infringements.

This paragraph calls them Constraints, as presumably they can't be
expressed via syntax.

I guess some other sections explains how those are handled.

> and "6.9.1 Function definitions". No
> more pathetic excuses.
>
>
>>
>>>   There are parts of the C standards that are a bit difficult to
>>> read, but surely you are able to read enough to determine the answer
>>> for yourself?   Certainly /I/ would be happier to hear that you have
>>> looked at the standards document yourself and understood it.
>>
>> The standard wouldn't be enough. I'd need to know the reasons behind
>> why it says what it says.
>
> Start with the standard, and let's go from there.  Learn what it says,
> then ask why, then listen when people tell you.

You sound like a Jehovah's Witness.

> And stick to one thing at a time.  Two thoughts on the same day appear
> to be beyond you, and we don't want you to get confused again.

Yeah, well I'm busy actually implementing C at the moment.

It would help if you weren't so bloody patronising.

Re: bart again (UCX64)

<ud83iu$24b2d$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=28785&group=comp.lang.c#28785

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.lang.c
Subject: Re: bart again (UCX64)
Date: Tue, 5 Sep 2023 22:37:50 +0200
Organization: A noiseless patient Spider
Lines: 142
Message-ID: <ud83iu$24b2d$1@dont-email.me>
References: <b74c088d-09e6-4842-8b6c-1921d68154c7n@googlegroups.com>
<871qfiknil.fsf@bsb.me.uk> <ucsu3s$3qfrk$1@dont-email.me>
<87v8ctkbsj.fsf@bsb.me.uk> <uctaf3$3v98j$1@dont-email.me>
<20230901115322.184@kylheku.com> <ucthg8$gvk$1@dont-email.me>
<20230901133548.87@kylheku.com> <uctl33$13ie$1@dont-email.me>
<20230901150200.880@kylheku.com> <ud1vqi$tuos$1@dont-email.me>
<8734zvxra0.fsf@bsb.me.uk> <ud27cn$vb5v$1@dont-email.me>
<87pm2yvg0m.fsf@bsb.me.uk> <ud48b0$1co8f$1@dont-email.me>
<20230904092343.829@kylheku.com> <87r0ndu6tf.fsf@bsb.me.uk>
<20230904121509.86@kylheku.com> <ud5db8$1k2dj$1@dont-email.me>
<878r9l5ym0.fsf@nosuchdomain.example.com> <ud5qka$1lrm2$1@dont-email.me>
<874jk95vaz.fsf@nosuchdomain.example.com> <ud7e75$20tag$1@dont-email.me>
<ud7hkm$21ds7$1@dont-email.me> <ud7n60$22dof$1@dont-email.me>
<ud7qto$22uso$1@dont-email.me> <ud816v$23vpc$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 5 Sep 2023 20:37:50 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="743e06e30e3850b9e2e0fb0643a99dcb";
logging-data="2239565"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+PpOs+d8bjBWr1WbTScUG18YRVsb95fTA="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.13.0
Cancel-Lock: sha1:SCPnW+DOweWBpTLt8oEBDR13iJQ=
Content-Language: en-GB
In-Reply-To: <ud816v$23vpc$1@dont-email.me>
 by: David Brown - Tue, 5 Sep 2023 20:37 UTC

On 05/09/2023 21:57, Bart wrote:
> On 05/09/2023 19:10, David Brown wrote:
>> On 05/09/2023 19:06, Bart wrote:
>>> On 05/09/2023 16:31, David Brown wrote
>>>
>>> BC:
>>>>> If you mean this:
>>>>>
>>>>>  > Will you
>>>>> acknowledge that the ISO C standard does not require a diagnostic
>>>>> for a missing return statement in a non-void function?
>>>>>
>>>>> Then I don't know. I will have to take somebody's word for it. You
>>>>> seem to be implying the answer is Yes, so Yes.
>>>>
>>>> Is there some reason that you won't look at the standard here?
>>>
>>> Yes, it's like someone asking me to check the Bible to see for myself
>>> whether it mentions something or not. But it's quite a big book, and
>>> maybe I'd have to collate slightly different quites in different
>>> places. And maybe I'd end up looking in the wrong place.
>>>
>>
>> I regularly give you references in the C standard, so that you don't
>> need to figure out where to look.  But do you ever use these references?
>>
>> Have you ever looked at the C standards (any version) ?  For that
>> matter, have you ever looked at a Bible - clearly you've skipped at
>> least one of these.
>
> Admired it, yes. I have a huge edition printed in 1792.
>
>>
>> Read "6.8.6.4 The return statement"
>
> 6.8.6.4p1 says:
>
> "1 A return statement with an expression shall not appear in a function
> whose return type is void. A return statement without an expression
> shall only appear in a function whose return type is void."
>
> Aren't these the exact same examples that I recently posted? I already
> said I fail those. Although looking at that wording, it is quite
> confusing. It appears to say this:
>
>                    Void func     Non-void func
>
>   return expr;     Not allowed   (1)
>
>   return;          Only here     (2)
>
> It doesn't say anything about Non-void functions, so we have to draw
> inferences: presumably (1) must be 'Only here', and (2) must be 'Not
> allowed'. So:
>
>                    (Proc)        (Func)           (My terms)
>                    Void func     Non-void func
>
>   return expr;     N             Y
>
>   return;          Y             N
>
> A bit clearer, yes? Maybe /I/ should be writing it! I already implement
> these because they are common sense, but the question was, what should a
> compiler do about infringements.
>
> This paragraph calls them Constraints, as presumably they can't be
> expressed via syntax.

Yes. (Or at least, the rules are not expressed by the syntax - maybe
they could have been, but it seemed easier to express them as constraints.)

>
> I guess some other sections explains how those are handled.

It's all quite clear - you got it. (There are certainly some parts of
the standard that are harder to figure out.)

Note that it does not say anywhere that you /must/ have a return
statement - with or without an expression. It merely says what kind of
return statements are allowed. So there is no requirement anywhere here
for a function to have a "return <expression>" statement even if the
function is non-void.

>
>> and "6.9.1 Function definitions". No more pathetic excuses.

See 6.9.1p12 :

"Unless otherwise specified, if the } that terminates a function is
reached, and the value of the function call is used by the caller, the
behaviour is undefined."

Running off the end of a non-void function is only a problem if the the
caller tries to use the value. Otherwise it is fine. Bad coding
practice, perhaps, and worthy of a warning message in my opinion, but it
is valid C code and a C compiler needs to accept it (optionally with a
warning message) and not reject it.

>>
>>
>>>
>>>>   There are parts of the C standards that are a bit difficult to
>>>> read, but surely you are able to read enough to determine the answer
>>>> for yourself?   Certainly /I/ would be happier to hear that you have
>>>> looked at the standards document yourself and understood it.
>>>
>>> The standard wouldn't be enough. I'd need to know the reasons behind
>>> why it says what it says.
>>
>> Start with the standard, and let's go from there.  Learn what it says,
>> then ask why, then listen when people tell you.
>
> You sound like a Jehovah's Witness.

The difference is, the C standard is real.

Once you know what it says here, so you understand how the language is
defined, /then/ it makes sense to ask /why/ it is defined that way.
(And I quite appreciate that you want to know why - I too like to know
the reasons behind decisions.)

>
>> And stick to one thing at a time.  Two thoughts on the same day appear
>> to be beyond you, and we don't want you to get confused again.
>
> Yeah, well I'm busy actually implementing C at the moment.

Well, I'm glad you have now found a copy of one of the C standards
(which one?), and are starting to show an interest in finding out how
the language is defined. It will make it much easier to write a C
implementation.

>
> It would help if you weren't so bloody patronising.

If you think I am patronising, it is because you act like a small child.
Grow up, stop whining, drop the paranoia, ask sensible questions, pay
attention to the answers, and answer the questions you are given. It
will make things a lot easier, and you'll learn much more.

Re: bart again (UCX64)

<20230905132941.99@kylheku.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=28786&group=comp.lang.c#28786

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: 864-117-...@kylheku.com (Kaz Kylheku)
Newsgroups: comp.lang.c
Subject: Re: bart again (UCX64)
Date: Tue, 5 Sep 2023 20:41:39 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 18
Message-ID: <20230905132941.99@kylheku.com>
References: <b74c088d-09e6-4842-8b6c-1921d68154c7n@googlegroups.com>
<871qfiknil.fsf@bsb.me.uk> <ucsu3s$3qfrk$1@dont-email.me>
<87v8ctkbsj.fsf@bsb.me.uk> <uctaf3$3v98j$1@dont-email.me>
<20230901115322.184@kylheku.com> <ucthg8$gvk$1@dont-email.me>
<20230901133548.87@kylheku.com> <uctl33$13ie$1@dont-email.me>
<20230901150200.880@kylheku.com> <ud1vqi$tuos$1@dont-email.me>
<8734zvxra0.fsf@bsb.me.uk> <ud27cn$vb5v$1@dont-email.me>
<87pm2yvg0m.fsf@bsb.me.uk> <ud48b0$1co8f$1@dont-email.me>
<20230904092343.829@kylheku.com> <87r0ndu6tf.fsf@bsb.me.uk>
<20230904121509.86@kylheku.com> <ud5db8$1k2dj$1@dont-email.me>
<878r9l5ym0.fsf@nosuchdomain.example.com> <ud5qka$1lrm2$1@dont-email.me>
<874jk95vaz.fsf@nosuchdomain.example.com> <ud7e75$20tag$1@dont-email.me>
<ud7hkm$21ds7$1@dont-email.me> <ud7n60$22dof$1@dont-email.me>
<ud7qto$22uso$1@dont-email.me> <ud816v$23vpc$1@dont-email.me>
Injection-Date: Tue, 5 Sep 2023 20:41:39 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="af9c623da626f6ba74477b9a6e113613";
logging-data="2240590"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18qfyphRwZ9i3Ke2keo04mW6Euljz3UMy0="
User-Agent: slrn/pre1.0.4-9 (Linux)
Cancel-Lock: sha1:zhglBGIOUvgeHF7ybNloJziCjIY=
 by: Kaz Kylheku - Tue, 5 Sep 2023 20:41 UTC

On 2023-09-05, Bart <bc@freeuk.com> wrote:
> It doesn't say anything about Non-void functions, so we have to draw
> inferences: presumably (1) must be 'Only here', and (2) must be 'Not
> allowed'. So:

"X shall appear only in Y" means "in Y and nowhere else". If it appears
anywhere but Y, the "shall" requirement is violated.

If that is in a "Constraints" paragraph, it requires a diagnotic.

Just like "parking is allowed only in designated stalls" means not
in the driveway, or on the lawn, or elsewhere.

--
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Mastodon: @Kazinator@mstdn.ca
NOTE: If you use Google Groups, I don't see you, unless you're whitelisted.

Re: bart again (UCX64)

<20230905134222.11@kylheku.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=28787&group=comp.lang.c#28787

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: 864-117-...@kylheku.com (Kaz Kylheku)
Newsgroups: comp.lang.c
Subject: Re: bart again (UCX64)
Date: Tue, 5 Sep 2023 20:47:29 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 20
Message-ID: <20230905134222.11@kylheku.com>
References: <b74c088d-09e6-4842-8b6c-1921d68154c7n@googlegroups.com>
<871qfiknil.fsf@bsb.me.uk> <ucsu3s$3qfrk$1@dont-email.me>
<87v8ctkbsj.fsf@bsb.me.uk> <uctaf3$3v98j$1@dont-email.me>
<20230901115322.184@kylheku.com> <ucthg8$gvk$1@dont-email.me>
<20230901133548.87@kylheku.com> <uctl33$13ie$1@dont-email.me>
<20230901150200.880@kylheku.com> <ud1vqi$tuos$1@dont-email.me>
<8734zvxra0.fsf@bsb.me.uk> <ud27cn$vb5v$1@dont-email.me>
<87pm2yvg0m.fsf@bsb.me.uk> <ud48b0$1co8f$1@dont-email.me>
<20230904092343.829@kylheku.com> <87r0ndu6tf.fsf@bsb.me.uk>
<20230904121509.86@kylheku.com> <ud5db8$1k2dj$1@dont-email.me>
<878r9l5ym0.fsf@nosuchdomain.example.com> <ud5qka$1lrm2$1@dont-email.me>
<874jk95vaz.fsf@nosuchdomain.example.com> <ud7e75$20tag$1@dont-email.me>
<ud7hkm$21ds7$1@dont-email.me> <ud7n60$22dof$1@dont-email.me>
<ud7qto$22uso$1@dont-email.me> <ud816v$23vpc$1@dont-email.me>
Injection-Date: Tue, 5 Sep 2023 20:47:29 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="af9c623da626f6ba74477b9a6e113613";
logging-data="2240628"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18md7uOG3Z0YpAdBb5X4t3TfrMPczUg/zI="
User-Agent: slrn/pre1.0.4-9 (Linux)
Cancel-Lock: sha1:2llTAGI9K551DUrCWoJnxdyoBHQ=
 by: Kaz Kylheku - Tue, 5 Sep 2023 20:47 UTC

On 2023-09-05, Bart <bc@freeuk.com> wrote:
> This paragraph calls them Constraints, as presumably they can't be
> expressed via syntax.

Contraints paragraphs give rules that require diagnostics if they
are violated, which is in the same class a syntax errors.

Some constraints could be turned into syntax.

For instance, the combinations of type specifiers could all be phrase
structures which admit "unsigned int" but not "unsigned struct foo".

How ISO specifies it is that any jumble of type specifiers is allowed,
and then constraints rules allow only certain combinations.

--
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Mastodon: @Kazinator@mstdn.ca
NOTE: If you use Google Groups, I don't see you, unless you're whitelisted.


devel / comp.lang.c / Re: bart again (UCX64)

Pages:12345678910111213141516
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor