This is the mail archive of the gcc-patches@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]

Re: Zero-length arrays




On Thu, 4 Jan 2001, Mark Mitchell wrote:
> 
> The usual heavy extension users are the Linux kernel and the C
> library.  Do y'all actually do this kind of initialization for
> statically allocated objects?

The suggested syntax from Richard would be my personal favourite by far:
it makes sense. So absolutely no complaints from kernel-land.

(I'd also love to get the warning about "extra elements" in general).

I think it's mainly glibc that may have some of the

	int x[0] = { 1, 2, 3, 4 };

type initializers, simply because that was historically the only way to do
them in gcc (horribly ugly, and apparently it took advantage of what could
best be characterized as a gcc oversight, but hey, the code is out there).

		Linus


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