[LLVMbugs] [Bug 13380] Value/Default initialization of new in LLVM

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Jul 17 09:57:25 PDT 2012


http://llvm.org/bugs/show_bug.cgi?id=13380

Douglas Gregor <dgregor at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #2 from Douglas Gregor <dgregor at apple.com> 2012-07-17 11:57:25 CDT ---
The complete example is:


extern "C" int printf(const char*, ...);

struct A {
  int i;
};

int main()
{
 A *a = new A[2] ();
 printf("%d\n", a[0].i);
}

Top-of-tree Clang properly value-initializes the allocated memory, so this has
already been fixed.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list