http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48562

           Summary: Prematurely destroys initializer_list array when using
                    new-expression
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: schaub.johan...@googlemail.com


The C++0x spec requires that GCC destroys the backing-up array at "delete p",
but GCC appears to destroy it immediately after the first declaration (as
checked by using a class type that has a side-effecting destructor). 

    auto *p= new initializer_list<int>{1, 2, 3}; 
    { auto q(*p); }
    delete p;

Reply via email to