From: "Jan Beulich" Subject: Re: uint64_aligned_t not compatible across gcc versions Date: Tue, 29 Aug 2006 10:49:25 +0200 Message-ID: <44F41BB5.76E4.0078.0@novell.com> References: <44F328A7.76E4.0078.0@novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org One more point here: The addition of this type and XEN_GUEST_HANDLE_64(), as it turns out, makes things more complicated/unreliable in the compatibility stuff rather then helping the situation: Since we need to force 4-byte alignment on uint64_t (and possible derived types) fields, we have to use #pragma pack() framing the entire (generated) compatibility headers. However, #pragma pack() takes precendence over attribute((aligned())), and hence there is no easy way to force 8-byte alignment on uint64_aligned_t fields. The only option I currently have is to (a) exclude sysctl.h and domctl.h from the processing (which is probably intended, but opens the possibility of unintentionally introducing fields of types that need translation, which would go undetected at build time), and (b) assume that no other header uses this type, or depends on the 8-byte alignment forced on __guest_handle_64_XXX. Both are maintenance-wise bad in my opinion. Ideas? Jan