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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,29f36805b9a20fe8 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-04-02 14:24:07 PST Newsgroups: comp.lang.ada Path: supernews.google.com!sn-xit-03!supernews.com!cyclone-sjo1.usenetserver.com!news-out-sjo.usenetserver.com!e420r-sjo4.usenetserver.com!news-out.usenetserver.com!newshub2.rdc1.sfba.home.com!news.home.com!enews.sgi.com!nntp.msen.com!uunet!ash.uu.net!world!bobduff From: Robert A Duff Subject: Re: Streams in Ada Sender: bobduff@world.std.com (Robert A Duff) Message-ID: Date: Mon, 2 Apr 2001 21:22:44 GMT References: <9aa3dd$efb$1@nh.pace.co.uk> <878zlj6m41.fsf@deneb.enyo.de> Organization: The World Public Access UNIX, Brookline, MA X-Newsreader: Gnus v5.3/Emacs 19.34 Xref: supernews.google.com comp.lang.ada:6378 Date: 2001-04-02T21:22:44+00:00 List-Id: Florian Weimer writes: > Robert A Duff writes: > > > > If I were writing an Ada compiler for the PDP-10, I would probably > > > choose Storage_Element'Size = 9. > > > > Sounds like a bad idea to me. Storage_Element'Size should be 36 on the > > PDP-10. I believe anything else would be unnecessarily inefficient. > > Are you sure? No. >... There are quite a few Ada compilers out there which use > Storage_Element'Size = 8 even though it's inefficient on that > particular platform. Which machines? I've never heard of such a thing. >...I think the size of a storage element is pretty > irrelevant for efficiency concerns. Well, maybe I misunderstood. I was presuming that if Storage_Element'Size = 8, then the compiler behaves accordingly (eg, for laying out arrays). *That's* what would affect efficiency. I guess it's true that Storage_Element'Size in and of itself is irrelevent unless you're using 'Address and related stuff. > > >...IIRC, the GCC porters are doing a > > > similar thing (CHAR_BITS == 8). > > Oops, CHAR_BITS == 9 of course. > > > That's because of various problems with the C language, which don't > > exist in Ada. C has no packed arrays, for example. Plus the fact that > > C culture has grown up in such a way that there's a huge amount of code > > that implicitly assumes that char is 8 bits. > > An 8 bit char on a PDP-10 doesn't work. Only values which are > divisors of 36 are acceptable. I don't see why. The PDP-10 hardware can deal with 8-bit bytes just fine (although you waste approx 1/9 of the bits). Is there some subtlety of C I'm missing? Or do I have to say you waste 1.0/9.0 of the bits? ;-) - Bob