[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
GCC complaints about missing braces around initializer
From: |
Stefan Monnier |
Subject: |
GCC complaints about missing braces around initializer |
Date: |
Tue, 04 Dec 2001 21:55:31 -0500 |
When compiling with -Wall GCC complaints about missing braces around
initializers because the code does
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
change it to something that GCC likes better ?
It seems like it should be fair since the syntax preferred by GCC
is already used in various places, but I'd rather make sure,
because my memory of C's history is too fuzzy.
Stefan
@@ -10219,12 +10243,12 @@
};
struct event_head head_table[] = {
- &Qmouse_movement, "mouse-movement", &Qmouse_movement,
- &Qscroll_bar_movement, "scroll-bar-movement", &Qmouse_movement,
- &Qswitch_frame, "switch-frame", &Qswitch_frame,
- &Qdelete_frame, "delete-frame", &Qdelete_frame,
- &Qiconify_frame, "iconify-frame", &Qiconify_frame,
- &Qmake_frame_visible, "make-frame-visible", &Qmake_frame_visible,
+ {&Qmouse_movement, "mouse-movement", &Qmouse_movement},
+ {&Qscroll_bar_movement, "scroll-bar-movement",&Qmouse_movement},
+ {&Qswitch_frame, "switch-frame", &Qswitch_frame},
+ {&Qdelete_frame, "delete-frame", &Qdelete_frame},
+ {&Qiconify_frame, "iconify-frame", &Qiconify_frame},
+ {&Qmake_frame_visible, "make-frame-visible", &Qmake_frame_visible},
};
void
- Re: New mh-e toolbar icons, (continued)
- Re: New mh-e toolbar icons, Bill Wohler, 2001/12/02
- Re: New mh-e toolbar icons, Richard Stallman, 2001/12/03
- Re: New mh-e toolbar icons, Peter S Galbraith, 2001/12/03
- Re: New mh-e toolbar icons, Eli Zaretskii, 2001/12/04
- Re: New mh-e toolbar icons, Bill Wohler, 2001/12/04
- Re: New mh-e toolbar icons, Richard Stallman, 2001/12/04
- 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 <=
- 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, 2001/12/08
- 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