--- Comment #5 from kbateman at seicorp dot com 2007-09-12 12:52 ---
Whaddaya know. Section 5-16, Expressions:
If the new-initializer is of the form (), default-initialization shall be
performed (8.5);
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33401
--- Comment #4 from rguenth at gcc dot gnu dot org 2007-09-12 08:33 ---
So, invalid.
--
rguenth at gcc dot gnu dot org changed:
What|Removed |Added
Status|UNC
--- Comment #3 from sebor at roguewave dot com 2007-09-12 03:47 ---
You remember correctly :)
To avoid zeroing it out use 'new buffer' w/o the parentheses.
--
sebor at roguewave dot com changed:
What|Removed |Added
--- Comment #2 from pinskia at gcc dot gnu dot org 2007-09-12 00:45 ---
I have to remember what C++ says here but I think it says buf gets zero'd.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33401
--- Comment #1 from kbateman at seicorp dot com 2007-09-11 22:32 ---
Sorry, that a.s is from a run without -O2. The memset call is still in the -O2
output, though.
a.s:
...
movl$65536, (%esp)
call_Znwj
movl%eax, %ebx
movl$65536, %edx