This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/32402] Error while allocating array of pointers to objects of a pure virtual class


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]