------- Comment #8 from gdr at gcc dot gnu dot org 2005-12-04 05:04 -------
(In reply to comment #0)
> The following code:
>
> struct S
> { int x[3]; };
>
> void f()
> { S s = {1,2,3};}
>
> With -Wmissing-braces (which is implied by -Wall, among others) gives:
>
> warning: missing braces around initializer for 'int [3]'
>
> In the specific case where a struct contains only a single array, adding the
> extra braces doesn't really seem that useful.
>
> The reason it would be nice to fix this that in the definition of tr1::array
> in
> the TR1 specification (page 88, 6.2.2) says
After more thoughts on this issue, it appears to me that it is asking for
a special casing justforo tr1::array<> to work. I don't know whether
that is a workable approach. I would reommend -Wno-missing-braces in this
specific case. Thoughts?
--
gdr at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |gdr at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25137