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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.46.0.131 with SMTP id e3mr2389952lji.10.1466285202482; Sat, 18 Jun 2016 14:26:42 -0700 (PDT) X-Received: by 10.157.45.136 with SMTP id g8mr278245otb.3.1466285202386; Sat, 18 Jun 2016 14:26:42 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!goblin1!goblin.stu.neva.ru!w10no2596441lbo.0!news-out.google.com!f5ni5856lbb.0!nntp.google.com!oe3no4396949lbb.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sat, 18 Jun 2016 14:26:42 -0700 (PDT) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=185.97.12.162; posting-account=9fwclgkAAAD6oQ5usUYhee1l39geVY99 NNTP-Posting-Host: 185.97.12.162 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <63c033c6-10b5-44fc-8d93-a786392a6058@googlegroups.com> Subject: Curiosity about different integer types From: mockturtle Injection-Date: Sat, 18 Jun 2016 21:26:42 +0000 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:30795 Date: 2016-06-18T14:26:42-07:00 List-Id: Dear all, few days ago a curiosity came to my mind. Consider this type Foo is new Integer range 0 .. 115; type Bar is new Integer range -1000 .. 1000; My gut feeling is that, despite the fact that they are both derived from In= teger, there is no guarantee that the "binary type" underneath them is the = same. For example, Foo could be implemented as an 8-bit integer, while Bar= could be implemented as a 16-bit integer, or maybe both could be implement= ed as (say) 32-bit integers. Am I right? I tried to do some experiments with gcc and both types are imp= lemented with the same binary type, but it could be only for efficiency rea= sons...