This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Possible new[] regression in 3.4 WRT 3.3.[12]
- From: Florian Weimer <fw at deneb dot enyo dot de>
- To: David Daney <ddaney at avtrex dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Mon, 16 Feb 2004 22:53:52 +0100
- Subject: Re: Possible new[] regression in 3.4 WRT 3.3.[12]
- References: <40313773.2060603@avtrex.com>
David Daney wrote:
> pSections = new (char*)[10];
I think you must omit the parens. They are not allowed if you allocate
arrays.
> [daney@dl junk]$ mipsel-linux-g++ -c d1.cpp
> d1.cpp: In function `char** f1()':
> d1.cpp:7: error: expected `;' before '[' token
As this is a common error (we also had a report about the throw case),
the diagnostic should be slightly more informative. 8-)