Eric Blake <e...@byu.net> writes: > Jim Meyering <jim <at> meyering.net> writes: >> -mbstate_t _gl_mbsrtowcs_state = 0; >> +mbstate_t _gl_mbsrtowcs_state = { 0, }; > > Is this correct for all platforms? If I read Posix correctly, mbstate_t can > be > a numeric type rather than a struct.
The initializer for an object scalar type may optionally be enclosed in braces. From C99 6.7.8 "Initialization", paragraph 11: The initializer for a scalar shall be a single expression, optionally enclosed in braces. C89 had similar text. -- "To the engineer, the world is a toy box full of sub-optimized and feature-poor toys." --Scott Adams