Jonathan Wakely <redi at gcc dot> changed:

           What    |Removed                     |Added
           Keywords|                            |wrong-code
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2016-12-01
     Ever confirmed|0                           |1

--- Comment #2 from Jonathan Wakely <redi at gcc dot> ---
Since C++11 zero-initialization requires that padding is initialized to zero

        fprintf(stderr, "no initialization\n");

That's default-initialization (which for this type performs no initialization).

        struct tm tt2 = tm();
        fprintf(stderr, "default initialization\n");

That's value-initialization (which for this type performs zero-initialization).

                new (buf) tm();
                fprintf(stderr, "placement new with default constructor

That's also value-initialization (so should also perform zero-initialization).

However, GCC 4.8 has been unsupported for a while now, please try a supported
version (5 or 6).

Reply via email to