From mboxrd@z Thu Jan 1 00:00:00 1970 To: 9fans@cse.psu.edu From: Clint Olsen Message-ID: References: <29597830.1037174088@WAAKZAAMHEID>, Subject: Re: [9fans] how to avoid a memset() optimization Date: Fri, 22 Nov 2002 09:59:57 +0000 Topicbox-Message-UUID: 2652c0ac-eacb-11e9-9e20-41e7f4b1d025 In article , Ronald G. Minnich wrote: > > struct x { > int a; > int b; > }; > > resulting in code in which a and b are laid out in memory in the same > order as in the structure (this due to C++). Structure members can get > reordered. This would violate the C standard that a pointer to a struct is compatible with a pointer to its first argument. That be busted... -Clint