This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/23480] New: default-initializing variable size array new expression does not work
- From: "avi at argo dot co dot il" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Aug 2005 12:45:13 -0000
- Subject: [Bug c++/23480] New: default-initializing variable size array new expression does not work
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
the following function
int* f(int n) { return new int[n](); }
translates to
_Z1fi:
.LFB2:
pushl %ebp
.LCFI0:
movl %esp, %ebp
.LCFI1:
sall $2, 8(%ebp)
leave
.LCFI2:
jmp _Znaj
which does not default-initialize the array.
--
Summary: default-initializing variable size array new expression
does not work
Product: gcc
Version: 4.0.1
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: avi at argo dot co dot il
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i386-redhat-linux
GCC host triplet: i386-redhat-linux
GCC target triplet: i386-redhat-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23480