From: Simon Wright <simon@pushface.org>
Subject: Re: Compiler doesn't respect 'Size for atomic object
Date: Thu, 21 Dec 2017 14:08:38 +0000
Date: 2017-12-21T14:08:38+00:00 [thread overview]
Message-ID: <lyh8skfa1l.fsf@pushface.org> (raw)
In-Reply-To: p1fmpg$inr$1@franka.jacob-sparre.dk
"Randy Brukardt" <randy@rrsoftware.com> writes:
> Still, you'll always have less issues if you avoid padding bits and
> have the subtype Object_Size (this is now in Ada 2020, so we can talk
> about it) be 32.
>
> Which is something you (Simon Wright, not Simon Clubley) might try,
> since Object_Size can be specified for any subtype. So try declaring:
>
> subype Simons_Interrupt_Id is Interrupt_Id with Object_Size => 32;
>
> and declare your object of that subtype. Then there are no padding
> bits (as defined by 13.1(7.2)).
Works a treat! Thanks!
(and Object_Size is available in GNAT back to at least 2015)
next prev parent reply other threads:[~2017-12-21 14:08 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-20 12:35 Compiler doesn't respect 'Size for atomic object Simon Wright
2017-12-20 19:23 ` Simon Clubley
2017-12-20 20:19 ` Simon Wright
2017-12-20 20:45 ` Simon Clubley
2017-12-21 7:10 ` Randy Brukardt
2017-12-21 14:08 ` Simon Wright [this message]
2017-12-20 21:20 ` Simon Wright
2017-12-21 5:55 ` Robert Eachus
2017-12-21 14:02 ` Simon Wright
2017-12-21 22:02 ` Simon Wright
2017-12-22 4:51 ` Robert Eachus
2017-12-22 10:21 ` Simon Wright
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox