view run/align_06.d @ 34:4e11884d76a4

fixed align_06 test
author thomask
date Wed, 13 Oct 2004 07:18:55 +0000
parents 127bfbbffe08
children 5f98d4a33d49
line wrap: on
line source

struct SmallStruct{
	align(1) byte a;
	align(1) byte b;
}

struct BigStruct{
	align(4) byte e;
	align(4) byte f;
}

int main(){
	SmallStruct s;
	BigStruct S;
	assert(&s.b-&s.a==1);
	assert(&S.f-&S.e==4);
	
	return 0;
}