This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: c++/3827: No initialization of an int allocated with new int.


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]