From 1129567817967869942
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,8372ae6de42be399,start
X-Google-Attributes: gidf78e5,public
X-Google-ArrivalTime: 2004-02-20 09:15:02 PST
Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.stueberl.de!kibo.news.demon.net!mutlu.news.demon.net!demon!mail2news.demon.co.uk!devnull
From: julien.lamy@ircad.u-strasbg.fr (Julien Lamy)
Newsgroups: comp.std.c++
Subject: Array of size 0
Date: Fri, 20 Feb 2004 17:15:00 +0000 (UTC)
Organization: CRC - Universite Louis Pasteur Strasbourg France
Lines: 20
Approved: fjh@cs.mu.oz.au (Fergus Henderson , moderator of comp.std.c++)
Message-ID: <403601F6.8010706@ircad.u-strasbg.fr>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: mail2news.demon.co.uk 1077297300 27032 10.0.0.1 (20 Feb 2004 17:15:00 GMT)
X-Complaints-To: abuse@demon.net
NNTP-Posting-Date: Fri, 20 Feb 2004 17:15:00 +0000 (UTC)
X-Received: from mulga.cs.mu.oz.au ([128.250.1.22])
	by news.demon.co.uk with esmtp (Exim 4.12)
	id 1AuEEt-00071r-00
	for mail2news@news.news.demon.net; Fri, 20 Feb 2004 17:14:59 +0000
X-Received: from mulga.cs.mu.OZ.AU (localhost [127.0.0.1]) by mulga.cs.mu.OZ.AU with ESMTP
	id i1KHEui2012871; Sat, 21 Feb 2004 04:14:56 +1100 (EST)
X-Received: (from fjh@localhost)
	by mulga.cs.mu.OZ.AU (8.12.10+Sun/8.12.9/Submit) id i1KHEtrP012861;
	Sat, 21 Feb 2004 04:14:55 +1100 (EST)
X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f
X-Path: comp-std-cpp-robomod!not-for-mail
X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov)
X-Delivered-To: std-c++@ucar.edu
X-Newsgroups: comp.std.c++
X-NNTP-Posting-Date: 20 Feb 2004 12:52:26 GMT
X-User-Agent: Mozilla Thunderbird 0.5 (X11/20040209)
X-Accept-Language: en-us, en
X-Spamscanner: mailbox7.ucsd.edu  (v1.4 Oct 30 2003 22:20:52, 0.0/5.0 2.63)
X-MailScanner: PASSED (v1.2.8 81419 i1KClntE091184 mailbox7.ucsd.edu)
X-Spam-Level: 
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.0 required=5.2 tests=none autolearn=no 
	version=2.60-mulga_r1
Xref: archiver1.google.com comp.std.c++:1179

Hello,
According to paragraph 6 of item 5.3.4 in the Standard, it is legal to
dynamically allocate an array of size 0, i.e.
new int[0]
is legal.
However, as I understand paragraph 1 of item 8.3.4 ("if the cosntant
expression is present, [...] its value shall be greater than zero"), it
is not legal to have
int myArray[0]
What is the rationale behind this difference ?
Thanks in advance,
--
Julien

---
[ 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                       ]



