Groups | Search | Server Info | Keyboard shortcuts | Login | Register
Groups > pl.comp.os.linux.programowanie > #2236
| From | Mateusz Viste <mateusz@xyz.invalid> |
|---|---|
| Newsgroups | pl.comp.os.linux.programowanie |
| Subject | Re: EINTR - sztuczne generowanie |
| Date | 2020-09-09 13:27 +0200 |
| Organization | . . . |
| Message-ID | <20200909132723.63eb392f@mateusz> (permalink) |
| References | <rj9vh2$6it$1@dont-email.me> <20200909101830.2170cf7b@mateusz> <1eed8657-10ca-4684-a383-fc7ff6908ec8@trust.no1> |
2020-09-09 o 10:03 +0000, Queequeg napisał:
> Mateusz Viste <mateusz@xyz.invalid> wrote:
>
> > ssize_t monkey_write(int fd, const void *buf, size_t cnt) {
> > static int crazy_monkey;
>
> Hmm, jesteś pewien, że statyczne, ale lokalne zmienne, są
> inicjalizowane na 0?
Tak.
> Zawsze myślałem, że dotyczy to tylko globalnych zmiennych
> statycznych, ale teraz czytam i w sumie już nie wiem.
Może w tych nowoczesnych wynalazkach z plusami coś się zmieniło, nie
wiem. Ja żyję w 1990 i dobrze mi tu.
ISO/IEC 9899:1990(E), rozdział 6.5.7:
"If an object that has static storage duration is not initialized
explicitly, it is initialized implicitly as if every member that has
arithmetic type were assigned 0 and every member that has pointer type
were assigned a null pointer constant."
Żadnych udziwnień typu "tak, ale tylko jeśli..." nie widzę.
Mateusz
Back to pl.comp.os.linux.programowanie | Previous | Next — Previous in thread | Next in thread | Find similar
EINTR - sztuczne generowanie heby <heby@poczta.onet.pl> - 2020-09-09 09:16 +0200
Re: EINTR - sztuczne generowanie Mateusz Viste <mateusz@xyz.invalid> - 2020-09-09 10:18 +0200
Re: EINTR - sztuczne generowanie heby <heby@poczta.onet.pl> - 2020-09-09 10:53 +0200
Re: EINTR - sztuczne generowanie Mateusz Viste <mateusz@xyz.invalid> - 2020-09-09 11:02 +0200
Re: EINTR - sztuczne generowanie heby <heby@poczta.onet.pl> - 2020-09-09 12:04 +0200
Re: EINTR - sztuczne generowanie michal.lyszczek@bofc.pl - 2020-10-20 02:54 +0200
Re: EINTR - sztuczne generowanie queequeg@trust.no1 (Queequeg) - 2020-09-09 10:03 +0000
Re: EINTR - sztuczne generowanie Mateusz Viste <mateusz@xyz.invalid> - 2020-09-09 13:27 +0200
Re: EINTR - sztuczne generowanie queequeg@trust.no1 (Queequeg) - 2020-09-10 10:00 +0000
csiph-web