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,FREEMAIL_FROM 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!news3.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 20:38:19 -0500 From: "Steve" Newsgroups: comp.lang.ada References: <1129320236.007525.185300@g44g2000cwa.googlegroups.com> Subject: Re: changing alignment of built-in boolean Date: Fri, 14 Oct 2005 18:39:42 -0700 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-RFC2646: Format=Flowed; Original Message-ID: NNTP-Posting-Host: 24.22.63.157 X-Trace: sv3-Y0t8q84g37An5nJ8+0746MpjSGAzgKKXadehqmIacMqHZ8JeyXps2W4bENZxRjT4B/xp+EO+VX3VLkH!FsamIkr2baEAfLcV+b1zNUF2W8lD+ABq73TzfNkpNaS3E37jVa2gMIw4G799EpEyXZDp6hTaMBw= 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:5675 Date: 2005-10-14T18:39:42-07:00 List-Id: wrote in message news: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. > > Feel free to suggest some other strategy for accomplishing this, though > I'd prefer not to make extensive changes to the Ada code (such as > changing it to use a subtype of Boolean). > > I'm using GNAT 3.15p on HPUX. > > Thanks. > GNAT appears to be happy with the following: procedure ClaTestAlignment is value : Boolean; for value'size use 32; for value'alignment use 4; begin null; end ClaTestAlignment; Also, me thinks (but cannot confirm) that the alignment value is in terms of storage units not bits. Steve (The Duck)