[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)
- Re: New mh-e toolbar icons, (continued)
- Re: New mh-e toolbar icons, Peter S Galbraith, 2001/12/04
- Too new DOC file or .elc file, Stefan Monnier, 2001/12/04
- Re: Too new DOC file or .elc file, Richard Stallman, 2001/12/05
- Re: Too new DOC file or .elc file, Stefan Monnier, 2001/12/06
- GCC complaints about missing braces around initializer, Stefan Monnier, 2001/12/04
- Re: GCC complaints about missing braces around initializer, Pavel Janík, 2001/12/05
- Re: GCC complaints about missing braces around initializer, Richard Stallman, 2001/12/05
- Re: GCC complaints about missing braces around initializer, Pavel Janík, 2001/12/08
- Re: GCC complaints about missing braces around initializer, Richard Stallman, 2001/12/05
- Re: GCC complaints about missing braces around initializer, Paul Eggert, 2001/12/07
- Re: GCC complaints about missing braces around initializer,
Pavel Janík <=
- Re: New mh-e toolbar icons, Eli Zaretskii, 2001/12/05
- Re: New mh-e toolbar icons, Bill Wohler, 2001/12/05
- Re: New mh-e toolbar icons, Richard Stallman, 2001/12/03
- Re: New mh-e toolbar icons, Jason Rumney, 2001/12/04