This is the mail archive of the gcc@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]

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


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


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