From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00,FREEMAIL_FROM, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,e95e8407f65e1cfb X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-06-19 10:48:44 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.mathworks.com!wn3feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi.com!12.120.28.17!attla2!attla1!ip.att.net!bos-service1.ext.raytheon.com!bos-service2.ext.raytheon.com.POSTED!not-for-mail Message-ID: <3D10C3E5.7FA3360C@despammed.com> From: Wes Groleau Reply-To: wesgroleau@despammed.com X-Mailer: Mozilla 4.77 [en] (Windows NT 5.0; U) X-Accept-Language: en,es-MX,es,pt,fr-CA,fr MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Look what I caught! was re:Ada paper critic References: <3d0e5750_2@news.bluewin.ch> <3d0fb5eb_3@news.bluewin.ch> <3D10952F.17A62CCF@despammed.com> <3D10B886.9507CC32@san.rr.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Wed, 19 Jun 2002 12:48:21 -0500 NNTP-Posting-Host: 151.168.144.162 X-Complaints-To: news@ext.ray.com X-Trace: bos-service2.ext.raytheon.com 1024508923 151.168.144.162 (Wed, 19 Jun 2002 13:48:43 EDT) NNTP-Posting-Date: Wed, 19 Jun 2002 13:48:43 EDT Organization: Raytheon Company Xref: archiver1.google.com comp.lang.ada:26408 Date: 2002-06-19T12:48:21-05:00 List-Id: > > > >"one element more" on either side. The standard allows setting > > > >a pointer to the next element after the end of an array, but > > > >such a pointer can not be dereferenced. > > > > The standard does? But most compilers ignore this, right? > > The pointer can be dereferenced, of course, but it's "undefined behavior". > Actually, what the C standard says is that if you have a pointer just after > the end of an array, then the result of dereferencing that pointer is > "unpredictable". Such dereferences can cause segmentation fault, trash some That's what I thought. The original claim was in error. The correct statement is "such a pointer should not be dereferenced" -- Wes Groleau http://freepages.rootsweb.com/~wgroleau