This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Ada and x86_64

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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]