Possible new[] regression in 3.4 WRT 3.3.[12]

Florian Weimer fw@deneb.enyo.de
Mon Feb 16 21:53:00 GMT 2004


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-)



More information about the Gcc mailing list