I have the following C++ 11 code:
int *ipa = new int[5]{1, 2, 3};
I thought I understood that elements 3 and 4 were supposed to be value (0 in this case) initialized. In Visual C++ 2013, that is happening. In Mingw 4.8.1 it is not; they are being default initialized (that is, uninitialized).
My question is, is this a known compiler (GCC or MingW) bug? I've searched through all the bug lists (and Googled) in vain. Or, have I somehow misunderstood what is supposed to happen?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With