From -5908700729767533003
X-Google-Thread: f78e5,6bb94f62f97d8704
X-Google-NewGroupId: yes
X-Google-Attributes: gid7894ca11fe,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII
Path: g2news1.google.com!news2.google.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!news.giganews.com.POSTED!not-for-mail
NNTP-Posting-Date: Fri, 16 Jul 2010 17:30:09 -0500
Return-Path: <cppmods@ruralroute.cs.rpi.edu>
To: (Usenet)
From: =?ISO-8859-1?Q?Daniel_Kr=FCgler?= <daniel.kruegler@googlemail.com>
Newsgroups: comp.std.c++
Subject: Re: A couple of questions on new-expression with array initializer
Organization: http://groups.google.com
Sender: cppmods@cs.rpi.edu
Approved: james.dennett@gmail.com
Message-ID: <3a0ad452-7fcb-4257-b242-b839de342a78@j13g2000yqj.googlegroups.com>
References: <i1nvr3$7r5$03$1@news.t-online.com>
Content-Type: text/plain; charset=ISO-8859-1
X-Original-Date: Fri, 16 Jul 2010 14:42:03 -0700 (PDT)
X-Submission-Address: std-c++@netlab.cs.rpi.edu
Date: Fri, 16 Jul 2010 17:24:50 CST
Lines: 32
X-Usenet-Provider: http://www.giganews.com
X-Trace: sv3-3VOPzaVVU1I42LrXYn/zwcDSanKiol5KwmDhW4ooesUk3Q94iihU2WJ3qNUtz2+FDwbEs8yO9q9ZEU6!LLGhqTapkjyXp6wgL2W2aLKhaYH+Hubr3KH4/PYPGYCLFvCCuglfWoIx+pt9w2uxDKGbDYnxMFXx!Ei0t3dcyDyXrq3eLnzlOQIwF0IE=
X-Complaints-To: abuse@giganews.com
X-DMCA-Notifications: http://www.giganews.com/info/dmca.html
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
Xref: g2news1.google.com comp.std.c++:2773

On 17 Jul., 00:19, "Johannes Schaub (litb)" <schaub-johan...@web.de>
wrote:
> The FCD says that the following code is ill-formed. But we can't know that
> until runtime
>
> int n = 2;
> new int[n]{1, 2, 3};
>
> How is the runtime supposed to emit the diagnostic message? See 8.5.1/6 and
> 5.3.4/15:
>
> 6 An initializer-list is ill-formed if the number of initializer-clauses
> exceeds the number of members or elements to initialize.
>
> Hmm, GCC just segfaults. I wonder whether printing "segfault" is a valid
> runtime diagnostic message. Any insights?

This should be core issue

http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#938

HTH & Greetings from Bremen,

Daniel Kr�gler


--
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@netlab.cs.rpi.edu]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html                      ]



