🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #1831

Re: are arrays allowed in strictly conforming programs?

#1831
From: Doug Gwyn
Date: Fri, 12 Oct 1990 15:30
13 lines
1157 bytes
In article <7913@star.cs.vu.nl> eck@cs.vu.nl (Hans van Eck) writes:
>If an array is accessed beyond the end of *an* object, the behavior is
>undefined. (emphasis mine)

No, of course not.  The sentence (in the blanket rules for the <string.h>
function conventions) has no force outside 4.11 in any case, but more
specifically it is part of a larger context that you have dropped.  The
larger context is that some of the 4.11 functions could be requested to
operate on nonexistent objects, for example
	int src[3], dst[10];
	memcpy(dst, src, 10);
Instead of posting a warning in each function's subsection, the
injunction against attempting such abuse is posted in the blanket section.
Technical Details
Message-ID: <14138@smoke.BRL.MIL>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!wuarchive!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!aplcen!haven!adm!smoke!gwyn
References: <7913@star.cs.vu.nl>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!wuarchive!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!aplcen!haven!adm!smoke!gwyn
From: gwyn@smoke.BRL.MIL (Doug Gwyn)
Newsgroups: comp.std.c
Subject: Re: are arrays allowed in strictly conforming programs?
Message-ID: <14138@smoke.BRL.MIL>
Date: 12 Oct 90 15:30:42 GMT
References: <7913@star.cs.vu.nl>
Organization: U.S. Army Ballistic Research Laboratory, APG, MD.
Lines: 13