From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,32e730fd939a8067 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.comcast.com!news.comcast.com.POSTED!not-for-mail NNTP-Posting-Date: Fri, 14 Oct 2005 18:29:06 -0500 From: tmoran@acm.org Newsgroups: comp.lang.ada Subject: Re: changing alignment of built-in boolean References: <1129320236.007525.185300@g44g2000cwa.googlegroups.com> X-Newsreader: Tom's custom newsreader Message-ID: <4MOdnUYpPdbfos3eRVn-rQ@comcast.com> Date: Fri, 14 Oct 2005 18:29:06 -0500 NNTP-Posting-Host: 24.6.102.223 X-Trace: sv3-t1qCCTCXH9Nj/V2ltxPwVlXOKfXE6RU5pdk/CHkeuuNSD6NHipj5ZONe/u+uK1Z+48DEAO7EY8KO4aV!LHpnOCzJ+IgJuGQJi4u2pvPZTTyvnnvwWloUSsHkxqtZey3jMlqFRXIWH6sOBmiprgfMz/zmu2T7 X-Complaints-To: abuse@comcast.net X-DMCA-Complaints-To: dmca@comcast.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.32 Xref: g2news1.google.com comp.lang.ada:5669 Date: 2005-10-14T18:29:06-05:00 List-Id: > 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.