c++/3827: No initialization of an int allocated with new int.
loewis@gcc.gnu.org
loewis@gcc.gnu.org
Wed Jul 25 22:55:00 GMT 2001
Synopsis: No initialization of an int allocated with new int.
State-Changed-From-To: open->closed
State-Changed-By: loewis
State-Changed-When: Wed Jul 25 22:55:52 2001
State-Changed-Why:
This is not a bug, the compiler is not supposed to default-initialize object of POD types allocated in new expressions.
If the new-initializer is omitted:
If T is a (possibly cv-qualified) non-POD class type (or array thereof), the object is default-initialized (8.5)
Otherwise, the object created has indeterminate value.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=3827&database=gcc
More information about the Gcc-bugs
mailing list