Email List: Xaustin-group-lX
[All Lists]

Re: [1003.1(2008)/Issue 7 0000074]: Pointer Types Problem

To: austin-group-l@xxxxxxxxxxxxx
Subject: Re: [1003.1(2008)/Issue 7 0000074]: Pointer Types Problem
From: Vincent Lefevre <vincent-opgr@xxxxxxxxxx>
Date: Mon, 6 Jul 2009 18:51:36 +0200
Mail-followup-to: austin-group-l@opengroup.org
References: <e26e5335cda9d0dfe49395e6115066fe@austingroupbugs.net><1730938080F74546ACC51CB65BA00565@ott.qnx.com><20090702094404.GA28393@squonk.masqnet><4A4CC239.2040603@qnx.com><5030E566C603DA449D6B4C060CE529B73A8F37@MCHP7RDA.ww002.siemens.net><4A4D2366.9090904@qnx.com><5030E566C603DA449D6B4C060CE529B73A8FF1@MCHP7RDA.ww002.siemens.net><9FC357E76048C74C93F3BD3D69A16B88045640D3@nova.ott.qnx.com><5030E566C603DA449D6B4C060CE529B73CED91@MCHP7RDA.ww002.siemens.net><9FC357E76048C74C93F3BD3D69A16B8804564322@nova.ott.qnx.com>
On 2009-07-06 11:21:30 -0400, Wojtek Lerch wrote:
> I don't think how that's related to the point I was trying to make...
> Perhaps I should clarify it.
> 
> In standard C, the following are two equivalent ways of specifying the
> same behaviour:
> 
> #1 "If the void pointer is a null pointer, then X.  Otherwise, Y".
> #2 "If the void pointer points to an object or to past the end of an
> array, then Y.  Otherwise, X".

I don't think this is the same, because...

> But you are introducing non-null pointers that don't point to any object
> ot past the end of an array.

Such pointers can exist, e.g. a pointer that points to some object
in a malloc'ed area will no longer point to an object (or past the
end of an array) after the area is freed by free().

-- 
Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)

<Prev in Thread] Current Thread [Next in Thread>