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!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Jeffrey Carter Newsgroups: comp.lang.ada Subject: Re: 'Size hack for enumerated types Date: Sun, 06 Jul 2014 16:30:05 -0700 Organization: Also freenews.netfront.net; news.tornevall.net; news.eternal-september.org Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Sun, 6 Jul 2014 23:30:11 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="ba346f17b503f6aa8ecbfd6d1e2a9f59"; logging-data="24528"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19Z8F0DVPKzaWthqEsfcudm+fuhsr728EM=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 In-Reply-To: Cancel-Lock: sha1:sA9qXQFFqVt19Jied9Pe8mZm2g0= Xref: news.eternal-september.org comp.lang.ada:20756 Date: 2014-07-06T16:30:05-07:00 List-Id: On 07/06/2014 04:01 PM, Victor Porton wrote: > > I see no reason for Increment function to work well with Convention => C, it > seems that you are lucky with your compiler. Clearly you don't understand Convention C. > After all Flag_Type and enum flag_type may be of different size! No, they may not. Convention C means the Ada compiler should represent the type exactly as the (targeted) C compiler would represent the equivalent C type. -- Jeff Carter "Why, the Mayflower was full of Fireflies, and a few horseflies, too. The Fireflies were on the upper deck, and the horseflies were on the Fireflies." Duck Soup 95