ISO C++ forbids initialization in array new?

2005-08-18 Thread WU Yongwei
Well, I see this in the gcc error message. Can someone here kindly point to me which part of the Standard specified this behaviour? I thought it should be in 5.3.4, but was not able to find the words there. By the way, anyone knows the rationale of this behaviour? Thanks in advance. Best regar

Re: ISO C++ forbids initialization in array new?

2005-08-19 Thread Jonathan Wakely
WU Yongwei wrote: > Well, I see this in the gcc error message. Can someone here kindly > point to me which part of the Standard specified this behaviour? I > thought it should be in 5.3.4, but was not able to find the words > there. It might be better if the error message said "non-default init

Re: ISO C++ forbids initialization in array new?

2005-08-19 Thread Jonathan Wakely
Jonathan Wakely wrote: > WU Yongwei wrote: > > > Well, I see this in the gcc error message. Can someone here kindly > > point to me which part of the Standard specified this behaviour? I > > thought it should be in 5.3.4, but was not able to find the words > > there. > > It might be better if

Re: ISO C++ forbids initialization in array new?

2005-08-19 Thread Alisdair Meredith
WU Yongwei wrote: > Well, I see this in the gcc error message. Can someone here kindly > point to me which part of the Standard specified this behaviour? I > thought it should be in 5.3.4, but was not able to find the words > there. > > By the way, anyone knows the rationale of this behaviour?

Re: ISO C++ forbids initialization in array new?

2005-08-19 Thread Joe Buck
On Fri, Aug 19, 2005 at 09:19:55AM +0100, Jonathan Wakely wrote: > WU Yongwei wrote: > > > Well, I see this in the gcc error message. Can someone here kindly > > point to me which part of the Standard specified this behaviour? I > > thought it should be in 5.3.4, but was not able to find the wor

Re: ISO C++ forbids initialization in array new?

2005-08-19 Thread Andreas Schwab
Joe Buck <[EMAIL PROTECTED]> writes: > On Fri, Aug 19, 2005 at 09:19:55AM +0100, Jonathan Wakely wrote: >> I assume you are trying something like this: >> >> int* i = new int[5](23); > > While this is not gcc-help, maybe we could make a FAQ item for this. > For people who want to do something

Re: ISO C++ forbids initialization in array new?

2005-08-22 Thread WU Yongwei
On 8/19/05, Jonathan Wakely <[EMAIL PROTECTED]> wrote: > WU Yongwei wrote: > > Well, I see this in the gcc error message. Can someone here kindly > > point to me which part of the Standard specified this behaviour? I > > thought it should be in 5.3.4, but was not able to find the words > > there.