From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29845 invoked by alias); 31 Oct 2010 07:34:34 -0000 Received: (qmail 29453 invoked by uid 22791); 31 Oct 2010 07:34:33 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,MISSING_MID X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 31 Oct 2010 07:34:29 +0000 From: "mark at tibanne dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/32402] Error while allocating array of pointers to objects of a pure virtual class X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: mark at tibanne dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: CC In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Sun, 31 Oct 2010 07:34:00 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-10/txt/msg02617.txt.bz2 Message-ID: <20101031073400.8jAMC4Wtj2T3ye7xBBM80KTOxqedpWL2mGBgvMeoKY8@z> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32402 Mark Karpeles changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mark at tibanne dot com --- Comment #10 from Mark Karpeles 2010-10-31 07:34:09 UTC --- Ok, I've read the bug report following a report from a friend, and after checking various sources I've come to the following conclusion: new pure(*[3]) is not valid When parsed, "new pure(*[3])" is parsed as "new instance of class pure with parameter *[3]". Anyway I see no logical reason why one would want to put part of its allocation into parenthesis. "new pure*[3]" should be perfectly acceptable, is easier to read, and is accepted by GCC without problems. Jonathan Wakely's example with decltype() is non related as decltype() is a new compiler keyword, which is valid in this context, but has nothing to do with the original problem. Anyway I believe this bug report should be closed before more people spend time looking at C++ references for this.