public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* char drawstrings[DRAW_MAX][] = { " .. give error
@ 2009-10-19 17:34 Bernd Roesch
  2009-10-19 17:47 ` Ian Lance Taylor
  0 siblings, 1 reply; 2+ messages in thread
From: Bernd Roesch @ 2009-10-19 17:34 UTC (permalink / raw)
  To: gcc

Hi, 

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:"
        };

Bye

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: char drawstrings[DRAW_MAX][] = { " .. give error
  2009-10-19 17:34 char drawstrings[DRAW_MAX][] = { " .. give error Bernd Roesch
@ 2009-10-19 17:47 ` Ian Lance Taylor
  0 siblings, 0 replies; 2+ messages in thread
From: Ian Lance Taylor @ 2009-10-19 17:47 UTC (permalink / raw)
  To: Bernd Roesch; +Cc: gcc

Bernd Roesch <nospamname@gmx.de> 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-10-19 17:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-19 17:34 char drawstrings[DRAW_MAX][] = { " .. give error Bernd Roesch
2009-10-19 17:47 ` Ian Lance Taylor

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).