This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/32402] Error while allocating array of pointers to objects of a pure virtual class
- From: "mark at tibanne dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 31 Oct 2010 07:34:27 +0000
- Subject: [Bug c++/32402] Error while allocating array of pointers to objects of a pure virtual class
- Auto-submitted: auto-generated
- References: <bug-32402-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32402
Mark Karpeles <mark at tibanne dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mark at tibanne dot com
--- Comment #10 from Mark Karpeles <mark at tibanne dot com> 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.