From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 18539 invoked from network); 21 Nov 1998 20:42:11 -0000 Received: from mail.redhat.com (199.183.24.239) by lists.redhat.com with SMTP; 21 Nov 1998 20:42:11 -0000 Received: from post.mail.demon.net (post-11.mail.demon.net [194.217.242.40]) by mail.redhat.com (8.8.7/8.8.7) with ESMTP id PAA02801 for ; Sat, 21 Nov 1998 15:42:11 -0500 Received: from [194.222.210.232] (helo=tardis.home.dave) by post.mail.demon.net with smtp (Exim 2.053 #1) id 0zhJr7-0006CE-00 for axp-list@redhat.com; Sat, 21 Nov 1998 20:42:10 +0000 Date: Sat, 21 Nov 1998 20:40:56 +0000 (GMT) From: Dave Gilbert X-Sender: gilbertd@tardis.home.dave To: axp-list@redhat.com Subject: Re: Writing portable Code for Glibc and 32/64 bit In-Reply-To: <199811212012.PAA15380@adder.cs.Virginia.EDU> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Sat, 21 Nov 1998, Greg Lindahl wrote: That I wrote: > > A portability problem I have tried to figure out a good soloution for is > > that of structure sizes in arrays - e.g. > > > > struct frob { > > void *a; > > void *b; > > int x; > > int dummy; > #ifdef PTRS_ARE_64_BITS > void *__ignore_me; > #endif > > } Yeh - but what about the size of int's and all the possible alignment issues in a more general case. > However, I would first prove to myself that it makes a significant > difference in the run-time of my program to waste all that memory. And Sure. > it's hard to believe that this is worth hacking the compiler chain to > do this kind of thing for other people. Oh yeh - I don't think it warrants a compiler chain change; I just want to know how to write it generically in the source. Dave -------------------------------------------------------------------- / Dr. David Alan Gilbert | Running Linux on Alpha(LX) | Happy \ \ gro.gilbert @ treblig.org | & ARM(EBSA285,old Arc) | In Hex / \____________________________|___ http://www.treblig.demon.co.uk __/