[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GCC complaints about missing braces around initializer

From: Pavel Janík
Subject: Re: GCC complaints about missing braces around initializer
Date: Sun, 09 Dec 2001 02:22:06 +0100
User-agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.1.50 (i386-suse-linux-gnu)

   From: Richard Stallman <address@hidden>
   Date: Wed, 5 Dec 2001 19:45:25 -0700 (MST)

   >        struct foo var[] = { a11, a12, a13, a21, a22, a23 };
   >     instead of
   >        struct foo var[] = { {a11, a12, a13}, {a21, a22, a23} };
   >     is there a reason why the code is written this way or can I safely
   > -Wall includes a number of unreasonable warnings.  When I implemented
   > those warnings I decided that we WILL NOT make changes merely because
   > there is a -Wall warning.
   > So please don't propose or argue for any change on the basis of -Wall.
   > The change may be good or bad, but that is based on other reasons,
   > not -Wall.

With former syntax, real programmers must think a moment about why you used
an array with six fields when you are defining an array of only two
structures. It IS very uncommon syntax. An each uncommon thing is an
overhead for programmers.
Pavel Janík

Use the "telephone test" for readability.
                  --  The Elements of Programming Style (Kernighan & Plaugher)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]