New -Wall issues
Jonathan Wakely
jwakely.gcc@gmail.com
Fri Oct 10 11:44:00 GMT 2008
2008/10/10 Chris Fairles:
>
> The duration default constructor is defined as:
> duration() = default;
>
> From my readings (8.4p9, 12.6.2p4, 8.5p6) __r is default-initialized
> which means, for a non-class, non-array type no initialization is
> performed leaving __r with an indeterminate value.
>
> My question is, why doesn't -O0 also emit the warning?
Detecting uninitialised data requires the value-propagation pass of
the optimiser, at -O0 it doesn't happen.
Jonathan
More information about the Libstdc++
mailing list