[cfe-dev] -Wmissing-field-initializers

Howard Hinnant hhinnant at apple.com
Mon Feb 20 08:48:20 PST 2012


I'm getting the following warning on building libc++:

../src/locale.cpp:4554:14: warning: missing field 'tm_min' initializer [-Wmissing-field-initializers]
    tm t = {0};
             ^
1 warning generated.

I know what the warning is saying.  My question is why?  I presume tm_min is getting initialized to 0 as intended.  The above is pretty standard fare (I thought) for zero-initializing an aggregate.  Isn't this warning a little too chatty?

Howard




More information about the cfe-dev mailing list