This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/13019] g++ erroneously accepts new-initializers for arrays
- From: "gdr at integrable-solutions dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 12 Nov 2003 11:52:06 -0000
- Subject: [Bug c++/13019] g++ erroneously accepts new-initializers for arrays
- References: <20031112062350.13019.bagnara@cs.unipr.it>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From gdr at integrable-solutions dot net 2003-11-12 11:52 -------
Subject: Re: New: g++ erroneously accepts new-initializers for arrays
"bagnara at cs dot unipr dot it" <gcc-bugzilla@gcc.gnu.org> writes:
| Compiling the following one-liner with g++ 3.3.2
| and 3.4 20031102 (experimental) succeeds.
|
| int* pa = new int[10](5);
|
| According to my reading of the standard (5.3.4.15)
| the program is ill-formed and should be rejected
| by the compiler.
Yes. I think this is an (odd) long-term GNU extension.
-- Gaby
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13019