This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/25137] Warning "missing braces around initializer" causing problems with tr1::array
- From: "chris at bubblescope dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Nov 2005 15:17:02 -0000
- Subject: [Bug c++/25137] Warning "missing braces around initializer" causing problems with tr1::array
- References: <bug-25137-9525@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from chris at bubblescope dot net 2005-11-28 15:17 -------
Thats an option too, but I thought I'd see about gcc's opinion first, as I
expected a much faster reply than I would get from the C++ steering committee
:)
I find the warning helpful for constructs like:
struct S { int x[3]; int y[3]; }, or struct T {int x; S s;}; and such things, I
felt it was less useful for a single array inside a struct.
I'm guessing one of the major reasons that it would be nice to keep the style:
array<int,3> s = {1,2,3};
is to make it look as possible like:
int s[3] = {1,2,3};
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25137