Article View: de.test
Article #54Re: Nein, nein, nein!
From: Dennis Preiser
Date: Thu, 22 Oct 2026 15:14
Date: Thu, 22 Oct 2026 15:14
48 lines
3523 bytes
3523 bytes
Marcel Logen <333200007110-0201@ybtra.de> wrote:
> Dennis Preiser in de.test:
>
> [...]
>
>>Ist nicht garantiert.
>>
>>| C11 6.7.9 Initialization
>>|
>>| If an object that has automatic storage duration is not initialized
>>| explicitly, its value is indeterminate. If an object that has static or
>>| thread storage duration is not initialized explicitly, then:
>>| — if it has pointer type, it is initialized to a null pointer;
>>| — if it has arithmetic type, it is initialized to (positive or unsigned)
>>| zero;
>
> Danke.
>
> | user15@o15:/tmp$ cat storage-duration.c
> | #include <stdio.h>
> | int main() {
> | {
> | auto int x;
> | printf("%i\n",x);
> | }
> | }
>
> | user15@o15:/tmp$ gcc -std=c11 storage-duration.c
>
> | user15@o15:/tmp$ ./a.out
> | 0
>
> Bei mir kommt da trotz "indeterminate" immer 0 heraus.
% clang -std=c11 main.c
% ./a.out
-407076648
> Vielleicht Zufall.
Oder der gcc.
Dennis
--
██████████████████████████████████████████████████████████████████████████████
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ 2026-10-22 ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ 17:10:53 ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
Technical Details
Message-ID:
<1TmcftvtI207Nfm%dennis@coredump.d--p.de>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!news.mb-net.net!open-news-network.org!news.mind.de!hirsch.in-berlin.de!.POSTED.news.in-berlin.de!not-for-mailReferences:
<87jync36yh.fsf@dear-messner.dont-email.me> <20261020tu194524@o15.ybtra.de> <87ld7r21ff.fsf@yeti.tilde.institute> <87zew7xjl7.fsf@dear-messner.dont-email.me> <20261021we204605@o15.ybtra.de> <20261021we205243@o15.ybtra.de> <20261021we205645@o15.ybtra.de> <87h5iexs2b.fsf@dear-messner.dont-email.me> <AABq2b8JL4cAACMG.A3.flnews@o15.ybtra.de> <87a4o6xi1h.fsf@dear-messner.dont-email.me> <20261022th104811@o15.ybtra.de> <0TmcfpaeI207Nfm%dennis@coredump.d--p.de> <20261022th143352@o15.ybtra.de>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!news.mb-net.net!open-news-network.org!news.mind.de!hirsch.in-berlin.de!.POSTED.news.in-berlin.de!not-for-mail
From: d__p@d--p.de (Dennis Preiser)
Newsgroups: de.test
Subject: Re: Nein, nein, nein!
Date: Thu, 22 Oct 2026 15:14:12 -0000 (UTC)
Organization: coredump
Archive: no
Message-ID: <1TmcftvtI207Nfm%dennis@coredump.d--p.de>
References: <87jync36yh.fsf@dear-messner.dont-email.me> <20261020tu194524@o15.ybtra.de> <87ld7r21ff.fsf@yeti.tilde.institute> <87zew7xjl7.fsf@dear-messner.dont-email.me> <20261021we204605@o15.ybtra.de> <20261021we205243@o15.ybtra.de> <20261021we205645@o15.ybtra.de> <87h5iexs2b.fsf@dear-messner.dont-email.me> <AABq2b8JL4cAACMG.A3.flnews@o15.ybtra.de> <87a4o6xi1h.fsf@dear-messner.dont-email.me> <20261022th104811@o15.ybtra.de> <0TmcfpaeI207Nfm%dennis@coredump.d--p.de> <20261022th143352@o15.ybtra.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 22 Oct 2026 15:14:12 -0000 (UTC)
Injection-Info: hirsch.in-berlin.de; posting-host="news.in-berlin.de:192.109.42.47";
logging-data="286442"; mail-complaints-to="usenet@hirsch.in-berlin.de"
Keywords: ignore,no-reply
User-Agent: tin/2.6.7-20261019 ("Glenlochy") (Darwin/27.0.0 (arm64))
Cancel-Lock: sha256:XDxNYOtPwqLTTmmHtUH4nNZIxvvNclZnCmL4pCkppPk=
X-No-Archive: yes
X-No-HTML: yes
Cache-Post-Path: hirsch.in-berlin.de!unknown@news.in-berlin.de
X-Cache: nntpcache 3.0.1 (see http://www.nntpcache.org/)