From bill@amber.ssd.csd.harris.com Mon Aug 10 19:51:02 1992
Received: from travis.csd.harris.com by dkuug.dk via EUnet with SMTP (5.64+/8+bit/IDA-1.2.8)
	id AA24358; Mon, 10 Aug 92 19:51:02 +0200
Received: from amber.ssd.csd.harris.com by travis.csd.harris.com (5.61/harris-5.1)
	id AA08682; Mon, 10 Aug 92 13:50:55 -0400
Received: by amber.ssd.csd.harris.com (5.61/CX/UX-5.0)
	id AA23113; Mon, 10 Aug 92 13:50:51 -0400
Date: Mon, 10 Aug 92 13:50:51 -0400
From: bill@amber.ssd.csd.harris.com (Bill Leonard)
Message-Id: <9208101750.AA23113@amber.ssd.csd.harris.com>
To: JLS@liverpool.ac.uk
Cc: SC22WG5@dkuug.dk
In-Reply-To: Lawrie Schonfelder's message of Wed, 05 Aug 92 11:54:21 BST <9208051106.AA12382@dkuug.dk>
Subject: (SC22WG5.156)  Defect Report
X-Charset: ASCII
X-Char-Esc: 29

> Date:     Wed, 05 Aug 92 11:54:21 BST
> From: Lawrie Schonfelder <JLS@liverpool.ac.uk>
> X-Sequence: SC22WG5@dkuug.dk 156
> X-Charset: ASCII
> X-Char-Esc: 29

> 1  A number of members of WG5 consider that the current standard is
>   defective due to its specification of the initial status of pointers as
>   undefined. We believe that this defect was introduced deliberately but
>   inadvertently in the sence that a significant proportion of both X3J3
>   and WG5 at the time were not fully aware of the consequeces of this
>   decision. Subsequent analysis and example use of the language
>   demonstrate that this will result in seriously inefficient programs or
>   seriously unsafe programs. For this reason we believe that this defect
>   should be corrected as soon as possible by the appropriate technical
>   corrigendum.

> 2  The suggested correction to this defect is that pointers should be
>   initially disassociated rather than undefined. In this case a pointer only
>   ever becomes undefined as the result of a program fault and the
>   programmer can rely on pointers in any standard conforming program
>   having a defined status. The edits proposed below are suggested as
>   those necessary to make this correction.

I think this is a terrible idea.  In most uses of pointers, the first thing
one does with the pointer is point it at something, or explicitly
initialize it to NULL.  If the compiler also generates code to initialize
the pointer, then the operation is done twice.  This could be extremely
crippling in an application that allocates an array of 10,000 pointers!

If you want the pointer initialized, then do it yourself.  Everyone
shouldn't have to pay a performance penalty because other programmers can't
be bothered to write correct programs.

Bill Leonard
Harris Computer Systems Division
2101 W. Cypress Creek Road
Fort Lauderdale, FL  33309
bill@ssd.csd.harris.com
---------------------------------------------------------------------------
  Q: How many lawyer jokes are there?
  A: Only three.  The rest are true stories.
---------------------------------------------------------------------------
