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,f7c38a023cf370dc,start X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!e18g2000vbx.googlegroups.com!not-for-mail From: okellogg Newsgroups: comp.lang.ada Subject: Should representation clauses be complete for each bit? Date: Wed, 20 Jul 2011 03:34:23 -0700 (PDT) Organization: http://groups.google.com Message-ID: <73c10395-ec4f-4a02-b0fc-e35bc14424fa@e18g2000vbx.googlegroups.com> NNTP-Posting-Host: 80.156.46.211 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1311158185 32354 127.0.0.1 (20 Jul 2011 10:36:25 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 20 Jul 2011 10:36:25 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: e18g2000vbx.googlegroups.com; posting-host=80.156.46.211; posting-account=a23u_AkAAAB-Xz81hSqodYsmJRrMwioK User-Agent: G2/1.0 X-HTTP-Via: 1.1 GSM7272, 1.1 GSM7273, 1.1 GSW7281 X-Google-Web-Client: true X-Google-Header-Order: VCRUHALNK X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C; .NET4.0E),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:20234 Date: 2011-07-20T03:34:23-07:00 List-Id: Picking up an age old thread, http://groups.google.com/group/comp.lang.ada/browse_thread/thread/9ab165cd2cc73cb IMHO it would be a real gain if we could explicitly mention the unused bits in the rep spec. Reusing the example from the OP, > type x is record > one : boolean; > two : boolean; > three : boolean; > end record; > for x use record > one at 0 range 0..0; > two at 0 range 3..3; > three at 0 range 15..15; > end record; What I imagine is something like, for x use record one at 0 range 0 .. 0; null at 0 range 1 .. 2; // note reserved word "null" two at 0 range 3 .. 3; null at 0 range 4 .. 14; three at 0 range 15 .. 15; end record; for x'Size use 16; The components with "null" would instruct the compiler to fill the bits with 0. -- Oliver