Path: 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 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.