RE: difference between gcc 3.2.2 and 3.3.1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



It looks to me that you are trying to implicitly include a "test" member in the tag_xwt_gtk_modal struct simply by including another struct (BASE) without declaring a variable of that type.  I'm not sure this is valid C/C++...  If I'm wrong, then you should probably file a bug report.  Otherwise, you (or the maintainers of this library) should probably fix the library.

typedef struct base
{
   int test;
} BASE, *P_BASE;

typedef struct tag_xwt_gtk_modal
{
  BASE; <<<------------------------- I don't believe this is valid.
  int modal;
  int canceled;
  struct {
     int c;
     int d;
  };
} MODAL, *P_MODAL;

int main()
{
   MODAL x;
   x.modal = 1;
   x.test = 1;
   x.c = 1;
}


-----Original Message-----
From: gcc-help-owner@xxxxxxxxxxx [mailto:gcc-help-owner@xxxxxxxxxxx] On Behalf Of Tomaž Zupan
Sent: Monday, November 24, 2003 1:03 PM
To: gcc-help@xxxxxxxxxxx
Subject: RE: difference between gcc 3.2.2 and 3.3.1


> It would help if you included the actual error that your received.  Just
> copy the error text into the e-mail.
>

test.c:8: warning: declaration does not declare anything
test.c: In function `main':
test.c:21: error: structure has no member named `test'

-- 
Tomaž Zupan
ORPO d.o.o.




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux