On Mon, Aug 30, 2010 at 10:48:55AM -0500, Anthony Liguori wrote: > No, this is GCC being stupid. > > How else do you terminate a list? IOW: > > MyDeviceInfo device_infos[] = { > {"foo", 0, 2}, > {"bar", 0, 1}, > {} /* or { 0 } */ > }; > > This is such a pervasive idiom that there's simply no way that GCC can > possibly try to warn against this. Plus, it's entirely reasonable. > > I think this is just a false positive in GCC. Otherwise, there's a ton > of code that it should be throwing warnings against.
Well, it sounds like Jes was compiling QEMU was extra warning flags, and I doubt people do much beyond -Wall and maybe one or two others. I could see petitioning GCC to only complain if -pedantic. -Nathan