[GCC-XML] offset attribute problem

Brad King brad.king at kitware.com
Tue Oct 12 18:03:34 EDT 2004


Kang, Gene Y (N-Simulogix) wrote:

> Hello,  I'm having a problem with the latest CVS version of gccxml on my Sun box.  It seems I always get a 0 for the offset attribute.  My platform is Sun Sparc running Solaris 8.  Any ideas where I should start looking to debug this problem ?  By the way, I've built the same CVS version for my G5 running Mac OSX and the offset attribute seemed to be set correctly.

Try compiling this program with GCC on your Sun:

------------------------------------------
#include <stdio.h>

struct A
{
   int x;
   int y;
};

int main()
{
   printf("%lu\n", offsetof(A, y));
   return 0;
}
------------------------------------------

What is the output from running it?

-Brad




More information about the gccxml mailing list