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

David Daney ddaney@avtrex.com
Mon Feb 16 22:01:00 GMT 2004


Florian Weimer wrote:

>David Daney wrote:
>
>  
>
>>   pSections = new (char*)[10];
>>    
>>
>
>I think you must omit the parens.  They are not allowed if you allocate
>arrays.
>  
>
I know that I can omit the parentheses.

The problem is that I have existing code with the parentheses that 
compiles fine under 3.3.1.

I can now see that if I use -pedantic that it is not allowed.

Is it really the right-thing to make it fail under 3.4?

David Daney



More information about the Gcc mailing list