This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Ada and x86_64
- From: David Brown <gcc at davidb dot org>
- To: David Edelsohn <dje at watson dot ibm dot com>
- Cc: Jan Hubicka <jh at suse dot cz>, aj at suse dot de, dewar at gnat dot com, gcc at gcc dot gnu dot org
- Date: Mon, 26 Aug 2002 17:34:47 -0700
- Subject: Re: Ada and x86_64
- References: <200208261918.PAA27528@makai.watson.ibm.com>
On Mon, Aug 26, 2002 at 03:18:36PM -0400, David Edelsohn wrote:
> While knowing nothing about Ada,
>
> private
> type sigset_t is array (0 .. 31) of unsigned_long;
> pragma Convention (C, sigset_t);
> for sigset_t'Size use 1024;
>
> implies that it is setting the size of sigset_t to 1024. I don't know
> whether this can be changed in the file based on __x86_64__ flag or
> whether one needs a separate file for x64-64 configuration.
Hmm. I don't know of the history of this construct, but perhaps
pragma Pack (sigset_t);
would give the intent better.
I'm not sure why the constant would depend on the size of unsigned_long,
but if you want to do if with the for .. Size expression:
for sigset_t'Size use 32 * unsigned_long'Size;
but that would really ever be different than the pragma Pack.
If, what was really intended was that the structure should at least be
1024 bytes long, this would work:
for sigset_t'Size use Natural'Max (1024, unsigned_long'Size * 32);
Dave Brown