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,2a34b7ad6c6a0774 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad01.newshosting.com!newshosting.com!198.186.194.249.MISMATCH!transit3.readnews.com!news-xxxfer.readnews.com!news-out.readnews.com!transit4.readnews.com!panix!bloom-beacon.mit.edu!newsswitch.lcs.mit.edu!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: Efficiency of code generated by Ada compilers Date: Sun, 08 Aug 2010 18:22:02 -0400 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <1jmwhfp.roo31ybayx2bN%csampson@inetworld.net> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls4.std.com 1281306106 12485 192.74.137.71 (8 Aug 2010 22:21:46 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Sun, 8 Aug 2010 22:21:46 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:pwgjA9ODJqxK05kLBXhzeRCTgNo= Xref: g2news1.google.com comp.lang.ada:12972 Date: 2010-08-08T18:22:02-04:00 List-Id: "(see below)" writes: > I don't use non-power-of-2 mod types, but I write emulators, and I would be > stuffed if I could not declare, e.g.: > > type KDF9_word is mod 2**48; Yes, that's one of the few cases where modular types make sense. Unfortunately, nothing in the Ada RM requires implementations to accept that. GNAT does, on all targets. But for a circular buffer of (say) 100 items? No, I wouldn't use modular types for the index. - Bob