public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jiri Slaby <jirislaby@gmail.com>
To: gcc-help@gcc.gnu.org
Subject: Fw: strange 'warning: missing initializer'
Date: Mon, 20 Nov 2006 00:26:00 -0000	[thread overview]
Message-ID: <4560F602.1050506@gmail.com> (raw)

> Hi,
>
> what's the difference for gcc in dot notation and direct value here:
> 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 newsgroup
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

             reply	other threads:[~2006-11-20  0:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-20  0:26 Jiri Slaby [this message]
2006-11-20  3:41 ` John Love-Jensen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4560F602.1050506@gmail.com \
    --to=jirislaby@gmail.com \
    --cc=gcc-help@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).