comp.lang.ada
 help / color / mirror / Atom feed
From: tmoran@acm.org
Subject: Re: changing alignment of built-in boolean
Date: Fri, 14 Oct 2005 18:29:06 -0500
Date: 2005-10-14T18:29:06-05:00	[thread overview]
Message-ID: <4MOdnUYpPdbfos3eRVn-rQ@comcast.com> (raw)
In-Reply-To: 1129320236.007525.185300@g44g2000cwa.googlegroups.com

> Is it possible, in GNAT, to force the built-in Boolean type to use
> 4-byte (32-bit) alignment?  Reason: I have to interface some Ada code
> to a package that insists on 32-bit variables on 4-byte-aligned
> addresses.
    So it's not really the case that *every* Boolean needs this, just the
ones in the data structures you share with that other package.  If you are
sharing records, it would be safer to *always* use a representation clause
on the shared records to make sure alignments, sizes, packing, and
ordering all match.  If you are passing simple Boolean variables or
expressions as subroutine parameters, the Convention on your pragma
Imports ought to do the right thing.



  parent reply	other threads:[~2005-10-14 23:29 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-14 20:03 changing alignment of built-in boolean invalidemail
2005-10-14 22:55 ` Ludovic Brenta
2005-10-14 23:33   ` invalidemail
2005-10-15  7:13     ` Martin Krischik
2005-10-17 18:02       ` Jean-Pierre Rosen
2005-10-14 23:29 ` tmoran [this message]
2005-10-15  1:39 ` Steve
2005-10-15  6:45   ` Jeffrey R. Carter
2005-10-15  6:40 ` Jeffrey R. Carter
2005-10-16 17:48   ` invalidemail
2005-11-09  3:25   ` Anonymous Coward
2005-11-09  5:42     ` christoph.grein
2005-11-09 22:14     ` Jeffrey R. Carter
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox