From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2879 invoked by alias); 19 Oct 2009 17:40:36 -0000 Received: (qmail 2870 invoked by uid 22791); 19 Oct 2009 17:40:35 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.45.13) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 19 Oct 2009 17:40:31 +0000 Received: from spaceape8.eur.corp.google.com (spaceape8.eur.corp.google.com [172.28.16.142]) by smtp-out.google.com with ESMTP id n9JHeSQe031228 for ; Mon, 19 Oct 2009 10:40:29 -0700 Received: from gv-out-0910.google.com (gvfy18.prod.google.com [10.16.201.18]) by spaceape8.eur.corp.google.com with ESMTP id n9JHePiF019380 for ; Mon, 19 Oct 2009 10:40:26 -0700 Received: by gv-out-0910.google.com with SMTP id y18so447413gvf.18 for ; Mon, 19 Oct 2009 10:40:25 -0700 (PDT) Received: by 10.103.81.35 with SMTP id i35mr2284349mul.43.1255974025577; Mon, 19 Oct 2009 10:40:25 -0700 (PDT) Received: from coign.google.com (adsl-71-133-8-30.dsl.pltn13.pacbell.net [71.133.8.30]) by mx.google.com with ESMTPS id s11sm10536mue.41.2009.10.19.10.40.22 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 19 Oct 2009 10:40:23 -0700 (PDT) To: Bernd Roesch Cc: gcc@gcc.gnu.org Subject: Re: char drawstrings[DRAW_MAX][] = { " .. give error References: From: Ian Lance Taylor Reply-to: gcc-help@gcc.gnu.org Date: Mon, 19 Oct 2009 17:47:00 -0000 In-Reply-To: (Bernd Roesch's message of "Mon\, 19 Oct 2009 14\:29\:04 +0200") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-System-Of-Record: true X-IsSubscribed: yes 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-10/txt/msg00406.txt.bz2 Bernd Roesch writes: > I compile an old code which use this and i think its compile with Gcc 2.95 > and the > PPC GCC 1998 or 1999 > it fail to compile with newer compiler. > > #define DRAW_MAX 4 > char drawstrings[DRAW_MAX][] = { > "Number of points drawn using 3D hardware:", > "Number of lines drawn using 3D hardware:", > "Number of triangles drawn using 3D hardware:", > "Number of quads drawn using 3D hardware:"}; > > give error on GCC3.4.0 > > 98 E:\amiga\AmiDevCpp\bernd\StormMesaNew\src\AMIGA\src\ADisp_HW.h elements > of array `drawstrings' have incomplete type > > gcc4.5.0 report this. > > 6 E:\amiga\AmiDevCpp\bernd\StormMesaNew\src\AMIGA\src\ADisp_HW.h:98 array > type has incomplete element type > > Is this a GGC Bug, or is that syntax no longer support ?. > > I change code to this, thats more easy and it compile ok but must check if > its same. > > const char * drawstrings[] = { > "Number of points drawn using 3D hardware:", > "Number of lines drawn using 3D hardware:", > "Number of triangles drawn using 3D hardware:", > "Number of quads drawn using 3D hardware:" > }; This question is not appropriate for the gcc@gcc.gnu.org mailing list. It would be appropriate for gcc-help@gcc.gnu.org. Please take any followups to gcc-help. Thanks. Your program is not valid C, and I don't see how it could ever have been compiled by any C compiler. Changing it to something like char drawstrings[DRAW_MAX][80] would work. Ian