delorie.com/archives/browse.cgi | search |
X-Authentication-Warning: | delorie.com: mail set sender to djgpp-bounces using -f |
X-Recipient: | djgpp AT delorie DOT com |
From: | "Stephen J. Turnbull" <turnbull AT sk DOT tsukuba DOT ac DOT jp> |
To: | djgpp AT delorie DOT com |
Subject: | Re: _CRT0_FLAG_NULLOK |
In-Reply-To: | <op.w020sren0e5s1z@-> |
References: | <21e77579-1a40-4442-8111-fc976fba78fc AT googlegroups DOT com> |
<b5o37qFldl9U1 AT mid DOT dfncis DOT de> | |
<f24e8cd3-83ca-4386-a319-a9adb4d74c68 AT googlegroups DOT com> | |
<3df2f50f-9543-47a7-8e40-a9be82ce5018 AT googlegroups DOT com> | |
<87fvuvny2v DOT fsf AT uwakimon DOT sk DOT tsukuba DOT ac DOT jp> | |
<op.w020sren0e5s1z@-> | |
X-Mailer: | VM undefined under 21.5 (beta32) "habanero" b0d40183ac79 XEmacs |
Lucid (x86_64-unknown-linux) | |
Date: | Wed, 31 Jul 2013 22:45:14 +0900 |
Message-ID: | <87ehaeonbp.fsf@uwakimon.sk.tsukuba.ac.jp> |
MIME-Version: | 1.0 |
Reply-To: | djgpp AT delorie DOT com |
Errors-To: | nobody AT delorie DOT com |
X-Mailing-List: | djgpp AT delorie DOT com |
X-Unsubscribes-To: | listserv AT delorie DOT com |
Rod Pemberton writes: > > It is not possible to give a consistent specification of what > > happens when NULL is passed to a function, "Consistent" may be a bad word, but my point is that (pointer to char) and (NULL) have very different semantics. The memory referenced by the latter can be neither accessed nor mutated, so no computations can be done with it. In order to associate an array of chars with NULL, you need to make an arbitrary decision. > It sure is _possible_. It just wasn't done. That's entirely > different than actually *not* being able to specify something. Of course it's possible to specify "something". It's just not possible to infer that something from the behavior of the function when passed a non-NULL char*.
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |