Old Wolf wrote:
struct S
{
char t[5][5];
int flags;
};
void func(void)
{
struct S s = { 0 };
}
I get a "warning: missing initializer" from gcc in C99 mode.
Marked OT since my post is mostly about gcc. I get:
temp.c: In function `func':
temp.c:9: warning: missing braces around initializer
temp.c:9: warning: (near initialization for `s.t')
temp.c:9: warning: unused variable `s'
These warnings all make sense (implicit braces are a nasty source of
potential errors and good to warn about). I don't see yours. My
command-line is:
gcc -std=c99 -Wall temp.c -o temp
Perhaps you misread it? If not, perhaps you have an older version of gcc
with a known bug? I have 3.3.4 20040623.
--
Derrick Coetzee
I grant this newsgroup posting into the public domain. I disclaim all
express or implied warranty and all liability. I am not a professional.