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=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,7e490a18b9688bd9 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.14.132 with SMTP id p4mr2315694pbc.14.1316473889990; Mon, 19 Sep 2011 16:11:29 -0700 (PDT) MIME-Version: 1.0 Path: lh7ni743pbb.0!nntp.google.com!news1.google.com!goblin3!goblin1!goblin.stu.neva.ru!news.tornevall.net!news.jacob-sparre.dk!pnx.dk!jacob-sparre.dk!ada-dk.org!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Stream_Element_Array Date: Mon, 19 Sep 2011 18:11:26 -0500 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <1e6rw4vto3ldb.i8d7fxixapx4.dlg@40tude.net> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1316473888 17732 69.95.181.76 (19 Sep 2011 23:11:28 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Mon, 19 Sep 2011 23:11:28 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6109 Xref: news1.google.com comp.lang.ada:18034 Date: 2011-09-19T18:11:26-05:00 List-Id: "Dmitry A. Kazakov" wrote in message news:b7yqos9wk4fn.15kuyzgqrkhge.dlg@40tude.net... > On Wed, 14 Sep 2011 11:53:13 +0100, Simon Wright wrote: > >> I know the RM doesn't specify this, and goes out of its way to allow >> 9-bit bytes and 36-bit storage units. But how many real-life situations >> are there where Stream_Element'Size isn't 8? > > Why not to mandate it 8-bit then? Even if the machine does not support > memory access to octets, I think it would be worth the efforts to have the > compiler doing packing/unpacking stuff, rather than the programmer. Mostly because of machines with odd word sizes, like the Unisys U2200 we worked on. For that, Stream_Element'Size = 9, and there is no "packing" or "unpacking" going on; the elements all had an extra bit compared to the "normal" (zero if converted from a text stream from some other processor). There would be no way to map Stream_Element'Size = 8 on such an architechture. But I agree that on more conventional architectures, Stream_Element'Size should be 8. I'd consider it wrong (morally, not formally) for it to be anything else on any machine whose word size is a multiple of 8. (Probably there ought to be implementation advice to that effect.) Randy.