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: References: 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 wrote: > On 18/03/2025 15:10, Waldek Hebisch wrote: >> bart 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