From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16096 invoked by alias); 20 Nov 2006 00:26:09 -0000 Received: (qmail 16088 invoked by uid 22791); 20 Nov 2006 00:26:09 -0000 X-Spam-Check-By: sourceware.org Received: from tirith.ics.muni.cz (HELO tirith.ics.muni.cz) (147.251.4.36) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 20 Nov 2006 00:26:00 +0000 Received: from anxur.fi.muni.cz (anxur.fi.muni.cz [147.251.48.3]) by tirith.ics.muni.cz (8.13.4/8.13.4/Debian-3sarge3) with ESMTP id kAK0PtVk027480 for ; Mon, 20 Nov 2006 01:25:56 +0100 Received: from [192.168.1.14] (wsc.tgnet.cz [212.80.64.118]) by anxur.fi.muni.cz (Postfix) with ESMTP id C2F4322AEAF for ; Mon, 20 Nov 2006 01:25:55 +0100 (CET) Message-ID: <4560F602.1050506@gmail.com> Date: Mon, 20 Nov 2006 00:26:00 -0000 From: Jiri Slaby User-Agent: Thunderbird 2.0a1 (X11/20060724) MIME-Version: 1.0 To: gcc-help@gcc.gnu.org Subject: Fw: strange 'warning: missing initializer' Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Muni-Spam-TestIP: 147.251.48.3 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2006-11/txt/msg00240.txt.bz2 > Hi, > > what's the difference for gcc in dot notation and direct value here: > cat >c.c < 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