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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Compiler doesn't respect 'Size for atomic object Date: Wed, 20 Dec 2017 20:19:12 +0000 Organization: A noiseless patient Spider Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: reader02.eternal-september.org; posting-host="47d826f47b613d695456d8f7d5ba85c7"; logging-data="7606"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/Eu/R8g3ZkBNbN4qx0P3g3sX8nQsh6vOc=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (darwin) Cancel-Lock: sha1:fXl9ewinkpPFAUs6sy7VGjp5qQ8= sha1:+pm/8gOfxZWmyo6nQYgd+Ue9K+8= Xref: reader02.eternal-september.org comp.lang.ada:49554 Date: 2017-12-20T20:19:12+00:00 List-Id: Simon Clubley writes: > If you use a naturally 32-bit variable instead of your Interrupt_ID > data type, does it work ok ? Yes. My workround is to declare the atomic object as Integer, and convert the Interrupt_ID to Integer (the ARM says only that Interrupt_ID is discrete, but that's a bridge to cross when we come to it; it's naturally an Integer on Cortex-M).