This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/25137] Warning "missing braces around initializer" causing problems with tr1::array



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]