🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #315

Re: Interpretation question: Pointers to explicitly zero-length strings

#315
From: Doug Gwyn
Date: Tue, 11 Jul 1989 00:18
10 lines
1040 bytes
In article <65745@yale-celray.yale.UUCP> leichter@CS.YALE.EDU (Jerry Leichter) writes:
>If the maximum length given is zero, must the pointer passed be valid?

Yes, unless the case of a null pointer is explicitly given special
semantics, any pointer described as pointing to a string must in
fact point to a valid string.  The implementation is entitled to
access the first byte pointed to, even if it might not be logically
necessary in order to determine the result in the 0-length case.

Disclaimer: Not an official X3J11 statement.
Technical Details
Message-ID: <10514@smoke.BRL.MIL>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!gem.mps.ohio-state.edu!ginosko!xanth!ames!haven!adm!smoke!gwyn
References: <65745@yale-celray.yale.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!gem.mps.ohio-state.edu!ginosko!xanth!ames!haven!adm!smoke!gwyn
From: gwyn@smoke.BRL.MIL (Doug Gwyn)
Newsgroups: comp.std.c
Subject: Re: Interpretation question:  Pointers to explicitly zero-length strings
Message-ID: <10514@smoke.BRL.MIL>
Date: 11 Jul 89 00:18:49 GMT
References: <65745@yale-celray.yale.UUCP>
Reply-To: gwyn@brl.arpa (Doug Gwyn)
Organization: Ballistic Research Lab (BRL), APG, MD.
Lines: 10