Jiri Slaby
2006-11-20 00:25:38 UTC
Hi,
cat >c.c <<EOF
struct {
unsigned int a, b;
} b[] = {
{ .a = 0 }
}, c[] = {
{ 0 }
};
EOF
Why $ gcc -W c.c -occ -c
c.c:6: warning: missing initializer
c.c:6: warning: (near initialization for 'c[0].b')
complains only for c[] (and not for b[])?
I use $ gcc --version
gcc (GCC) 4.1.1 20061011 (Red Hat 4.1.1-30)
and $ gcc34 --version
gcc34 (GCC) 3.4.6 20060404 (Red Hat 3.4.6-4)
with the same result.
Any clues?
please, could you answer the question for me here? (I tried gcc.gnu newsgroupcat >c.c <<EOF
struct {
unsigned int a, b;
} b[] = {
{ .a = 0 }
}, c[] = {
{ 0 }
};
EOF
Why $ gcc -W c.c -occ -c
c.c:6: warning: missing initializer
c.c:6: warning: (near initialization for 'c[0].b')
complains only for c[] (and not for b[])?
I use $ gcc --version
gcc (GCC) 4.1.1 20061011 (Red Hat 4.1.1-30)
and $ gcc34 --version
gcc34 (GCC) 3.4.6 20060404 (Red Hat 3.4.6-4)
with the same result.
Any clues?
for the first time)
thanks,
--
http://www.fi.muni.cz/~xslaby/ Jiri Slaby
faculty of informatics, masaryk university, brno, cz
e-mail: jirislaby gmail com, gpg pubkey fingerprint:
B674 9967 0407 CE62 ACC8 22A0 32CC 55C3 39D4 7A7E
http://www.fi.muni.cz/~xslaby/ Jiri Slaby
faculty of informatics, masaryk university, brno, cz
e-mail: jirislaby gmail com, gpg pubkey fingerprint:
B674 9967 0407 CE62 ACC8 22A0 32CC 55C3 39D4 7A7E