Re: Plan needed for switching m68k to 32-bit alignment

Thorsten Glaser <[email protected]>
Newsgroups gmane.linux.ports.m68k,gmane.linux.debian.ports.68k
Message-ID <[email protected]>
Forgot…

>tg@fish:~ $ ./a.out

struct baa {
	int a;
	long long b;
};

#include <stddef.h>
#include <stdio.h>

int main(void) {
	struct baa stct;

#define t(w,s) printf("%s\ts=%u\ta=%u\n", #w, \
	    (unsigned)sizeof(s), (unsigned)__alignof__(s))
#define o(w,m) printf("%s\ts=%u\ta=%u\to=%u\n", #w, \
	    (unsigned)sizeof(stct.m), (unsigned)__alignof__(stct.m), \
	    (unsigned)offsetof(struct baa, m))
	t(int, int);
	t(llong, long long);
	t(baa, struct baa);
	o(baa.a, a);
	o(baa.b, b);
	return (0);
}

bye,
//mirabilos
-- 
[16:04:33] bkix: "veni vidi violini"
[16:04:45] bkix: "ich kam, sah und vergeigte"...
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.