From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6698 invoked by alias); 28 May 2009 23:04:51 -0000 Received: (qmail 6680 invoked by uid 22791); 28 May 2009 23:04:51 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-ew0-f157.google.com (HELO mail-ew0-f157.google.com) (209.85.219.157) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 28 May 2009 23:04:45 +0000 Received: by ewy1 with SMTP id 1so6329129ewy.8 for ; Thu, 28 May 2009 16:04:43 -0700 (PDT) Received: by 10.210.16.10 with SMTP id 10mr3430693ebp.92.1243551883333; Thu, 28 May 2009 16:04:43 -0700 (PDT) Received: from ?192.168.2.99? (cpc2-cmbg8-0-0-cust61.cmbg.cable.ntl.com [82.6.108.62]) by mx.google.com with ESMTPS id 7sm1260100eyg.57.2009.05.28.16.04.41 (version=SSLv3 cipher=RC4-MD5); Thu, 28 May 2009 16:04:42 -0700 (PDT) Message-ID: <4A1F1B49.1020505@gmail.com> Date: Fri, 29 May 2009 09:04:00 -0000 From: Dave Korn User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: "Joseph S. Myers" CC: Dave Korn , "gcc@gcc.gnu.org" Subject: Re: What does zero-length array mean at file scope? References: <4A189BCD.1090707@gmail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2009-05/txt/msg00673.txt.bz2 Joseph S. Myers wrote: > On Sun, 24 May 2009, Dave Korn wrote: > >> So, is the testcase invalid, and should the compiler be warning about this >> declaration? I couldn't get any complaint out of it even with "-W -Wall >> -Wextra -pedantic -std=c89"? Or should the linker be allocating some space >> for this zero-sized common? > > I get "warning: ISO C forbids zero-size array 'i0'" with -pedantic. > Err. Yes, so do I now. It turns out you can't just tack a -W on a cut-n-pasted command line to cancel out an earlier -w. cheers, DaveK