Path: csiph.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
From: Tim Rentsch
Newsgroups: comp.lang.c
Subject: Re: A thought of C
Date: Sat, 25 Apr 2026 13:52:11 -0700
Organization: A noiseless patient Spider
Lines: 18
Message-ID: <86o6j63gqs.fsf@linuxsc.com>
References: <3a3462bdd72c4ed9d392a78b7d369a7b5ccc3b04.camel@gmail.com> <10s2tfe$2lvm$1@dont-email.me> <10s34f6$542f$1@dont-email.me> <10s3akj$7ajg$1@dont-email.me> <10s3otn$bk6v$1@dont-email.me> <10s4gtb$grfo$1@dont-email.me> <10s53k2$mlh7$1@dont-email.me> <10s9c7a$2b5i9$4@dont-email.me> <10sal4e$2967c$1@dont-email.me> <10sbera$2iai7$2@kst.eternal-september.org> <10sbl72$2knde$1@dont-email.me> <10sbue0$2mtc2$1@kst.eternal-september.org> <10scqh1$2u305$1@dont-email.me> <10se1pa$3b5kb$2@dont-email.me> <10se5r1$3c90c$1@dont-email.me> <10sehaa$3e0ld$1@dont-email.me> <10sh4sk$ge59$2@dont-email.me> <10sh5aa$ghpi$1@dont-email.me> <10siolv$t20v$1@dont-email.me> <10sj2vv$127t8$1@dont-email.me> <10sj7tj$14il7$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Date: Sat, 25 Apr 2026 20:52:12 +0000 (UTC)
Injection-Info: dont-email.me; posting-host="842c0705c388246dee2d3602366a27fb"; logging-data="1206464"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18WDKifYj/FcTesZcsfGyii4zcp4frV9Ao="
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:kCYrDWMfwFV9h9PStDSAzcB0fTQ= sha1:NkoAZc+vMZpH+RsAGZTtzGRuflo=
Xref: csiph.com comp.lang.c:397945
Bart writes:
>> [..questions about NULL == 0 ...]
>
> I expect that type matching would require both sides to be
> pointers. Then the '0' is presumably converted to whatever pattern is
> used for NULL.
>
> Although I always found it odd that, if P has a pointer type, then 'P
> = 0' is fine, but not 'P = 42'.
Do you also find it odd that 'P = 0' is fine, but 'P = 0.0' is not?
> Also, suppose you did want to assign actual address 0x0000000 to P
> using 'P = (T*)0'; what would happen here if NULL was non-zero?
Assuming a declaration 'T *P;', do you really not know what
happens for a statement 'P = (T*)0;'?