2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / consistency.vlad / layout / s-float-wchar_t.c
blob1af58d5896c1b3560c61fac82d541e415e6e891c
1 #include <stdio.h>
2 #include <stddef.h>
4 static struct sss{
5 float f;
6 wchar_t snd;
7 } sss;
9 #define _offsetof(st,f) ((char *)&((st *) 16)->f - (char *) 16)
11 int main (void) {
12 printf ("+++Struct float-wchar_t:\n");
13 printf ("size=%d,align=%d,offset-float=%d,offset-wchar_t=%d,\nalign-float=%d,align-wchar_t=%d\n",
14 sizeof (sss), __alignof__ (sss),
15 _offsetof (struct sss, f), _offsetof (struct sss, snd),
16 __alignof__ (sss.f), __alignof__ (sss.snd));
17 return 0;