Deutsch   English   Français   Italiano  
<vri6co$26v8m$2@paganini.bofh.team>

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

Path: ...!3.eu.feeder.erje.net!2.eu.feeder.erje.net!feeder.erje.net!newsfeed.bofh.team!paganini.bofh.team!not-for-mail
From: antispam@fricas.org (Waldek Hebisch)
Newsgroups: comp.lang.c
Subject: Re: Bart's Language
Date: Thu, 20 Mar 2025 22:55:22 -0000 (UTC)
Organization: To protect and to server
Message-ID: <vri6co$26v8m$2@paganini.bofh.team>
References: <vracit$178ka$1@dont-email.me> <vrbo88$1j3e0$1@paganini.bofh.team> <vrbtve$2irc9$1@dont-email.me> <vrc2d5$1jjrf$1@paganini.bofh.team> <vrc4eb$2p28t$1@dont-email.me>
Injection-Date: Thu, 20 Mar 2025 22:55:22 -0000 (UTC)
Injection-Info: paganini.bofh.team; logging-data="2325782"; posting-host="WwiNTD3IIceGeoS5hCc4+A.user.paganini.bofh.team"; mail-complaints-to="usenet@bofh.team"; posting-account="9dIQLXBM7WM9KzA+yjdR4A";
User-Agent: tin/2.6.2-20221225 ("Pittyvaich") (Linux/6.1.0-9-amd64 (x86_64))
X-Notice: Filtered by postfilter v. 0.9.3
Bytes: 1983
Lines: 29

bart <bc@freeuk.com> wrote:
> On 18/03/2025 15:10, Waldek Hebisch wrote:
>> bart <bc@freeuk.com> wrote:
>>> On 18/03/2025 12:17, Waldek Hebisch wrote:
> 
>> I see.  So your feature conflicts with C feature "variable which is
>> initialized at declaration time is always used initialized".
> 
> That doesn't happen here:
> 
>   int a = a;
> 
> gcc (with no extra options) tcc and bcc both put some undefined value in a.
> 
> gcc won't warn until you say '-Wextra', and then only for:
> 
>   int a = a + 1;

Well, it is rather easy to see if variable is used within its
own initialization, so practically it is minor gap.  Of course,
there is problem with C standard: IIUC depending on rest of
the code declarations as above are merely undefined behaviour
or even produce unspecified value.  So C compiler is
forbidden to stop compilation are report compile time error.

However, your language has no constrains that C has, so you
could do better.

-- 
                              Waldek Hebisch