From -3457018722978587866
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,8372ae6de42be399
X-Google-Attributes: gidf78e5,public
X-Google-ArrivalTime: 2004-02-21 11:20:06 PST
Return-Path: <devnull@stump.algebra.com>
X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f
Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!cyclone.bc.net!news.alt.net!comp-std-cpp-robomod!not-for-mail
X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov)
Delivered-To: std-c++@ucar.edu
From: "Andrew Koenig" <ark@acm.org>
Newsgroups: comp.std.c++
References: <403601F6.8010706@ircad.u-strasbg.fr> <c15mlg$pdl$1@news1nwk.SFbay.Sun.COM>
Subject: Re: Array of size 0
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <jlKZb.64037$hR.1357671@bgtnsc05-news.ops.worldnet.att.net>
X-Complaints-To: abuse@worldnet.att.net
X-Trace: bgtnsc05-news.ops.worldnet.att.net 1077375439 f13cb151449613c228185967eb881a2d (Sat, 21 Feb 2004 14:57:19 GMT)
NNTP-Posting-Date: Sat, 21 Feb 2004 14:57:19 GMT
Organization: AT&T Worldnet
X-Spam-Checker-Version: SpamAssassin 2.60-mulga_r1 (1.212-2003-09-23-exp) on 
	mulga.cs.mu.OZ.AU
X-Spam-Status: No, hits=0.7 required=5.2 tests=PRIORITY_NO_NAME autolearn=no 
	version=2.60-mulga_r1
Approved: Fergus Henderson <fjh@cs.mu.oz.au>, moderator of comp.std.c++
Date: Sat, 21 Feb 2004 13:17:11 CST
Lines: 19
Xref: archiver1.google.com comp.std.c++:1189


"Steve Clamage" <stephen.clamage@sun.com> wrote in message
news:c15mlg$pdl$1@news1nwk.SFbay.Sun.COM...

> Finally, "new int[0]" is not a special case. It is analagous to malloc(0).
In
> both cases you get a valid pointer that you cannot dereference.

I think that C90 allows malloc(0) to return 0.  So you do indeed get a valid
pointer that you cannot dereference, but that pointer might be the same as
the error indication.  In other words, the analogy is not quite completely
accurate.

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html                       ]



