comp.lang.ada
 help / color / mirror / Atom feed
From: Darren New <dnew@san.rr.com>
Subject: Re: Look what I caught! was re:Ada paper critic
Date: Wed, 19 Jun 2002 16:59:22 GMT
Date: 2002-06-19T16:59:22+00:00	[thread overview]
Message-ID: <3D10B886.9507CC32@san.rr.com> (raw)
In-Reply-To: 3D10952F.17A62CCF@despammed.com

Wes Groleau wrote:
> 
> > >  A C array does not contain
> > >"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".
In other words, the programmer shouldn't do this, because the compiler is
allowed to enforce that you don't. Of course, most C compilers implement
pointers as raw addresses, so it's generally hard to make sure you're doing
the Right Thing that way.

-- 
Darren New 
San Diego, CA, USA (PST). Cryptokeys on demand.
** http://home.san.rr.com/dnew/DNResume.html **
** http://images.fbrtech.com/dnew/ **

     My brain needs a "back" button so I can
         remember where I left my coffee mug.



  reply	other threads:[~2002-06-19 16:59 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-17 17:35 Look what I caught! was re:Ada paper critic Alderson, Paul A.
2002-06-17 18:31 ` Darren New
2002-06-17 21:40 ` Vinzent Hoefler
2002-06-17 23:14   ` Darren New
2002-06-18 14:49     ` Hyman Rosen
2002-06-18 22:36     ` Vinzent Hoefler
2002-06-18 13:28   ` Marin David Condic
2002-06-24 19:17     ` Vinzent Hoefler
2002-06-18 19:16   ` Kevin Cline
2002-06-18 22:36     ` Vinzent Hoefler
2002-06-19 14:29       ` Wes Groleau
2002-06-19 16:59         ` Darren New [this message]
2002-06-19 17:48           ` Wes Groleau
2002-06-19 17:56             ` Darren New
2002-06-19 17:11         ` Frank J. Lhota
2002-06-19 19:31           ` Robert A Duff
2002-06-19 20:02             ` Hyman Rosen
2002-09-24 15:23               ` Matthew Heaney
2002-06-19 19:37         ` Robert A Duff
2002-06-19 13:52 ` Ted Dennison
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox