annotate tests/mini/union2.d @ 883:b52d5de7783f

GC defines and linkage changes.
author Christian Kamm <kamm incasoftware de>
date Thu, 08 Jan 2009 18:20:02 +0100
parents 44f08170f4ef
children
rev   line source
lindquist@73 1 module union2;
lindquist@73 2
lindquist@73 3 union U
lindquist@73 4 {
lindquist@73 5 float f;
lindquist@73 6 long l;
lindquist@73 7 }
lindquist@73 8
lindquist@73 9 U u;
lindquist@73 10
lindquist@73 11 void main()
lindquist@73 12 {
lindquist@73 13 assert(u.f !<>= 0);
lindquist@94 14 {
lindquist@94 15 uint* p = 1 + cast(uint*)&u;
lindquist@94 16 {assert(*p == 0);}
lindquist@94 17 }
lindquist@73 18 }