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: a07f3367d7,73cb216d191f0fef X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit X-Received: by 10.180.8.4 with SMTP id n4mr2641044wia.0.1363918479009; Thu, 21 Mar 2013 19:14:39 -0700 (PDT) Path: p18ni6019wiv.0!nntp.google.com!feeder1.cambriumusenet.nl!82.197.223.108.MISMATCH!feeder2.cambriumusenet.nl!feeder3.cambriumusenet.nl!feed.tweaknews.nl!194.109.133.86.MISMATCH!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!border4.nntp.ams.giganews.com!border2.nntp.ams.giganews.com!border3.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!newsreader4.netcologne.de!news.netcologne.de!novia!news-out.readnews.com!transit3.readnews.com!panix!bloom-beacon.mit.edu!newsswitch.lcs.mit.edu!nntp.TheWorld.com!.POSTED!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: Is this expected behavior or not Date: Sat, 16 Mar 2013 16:49:58 -0400 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <8klywqh2pf$.1f949flc1xeia.dlg@40tude.net> <513f6e2f$0$6572$9b4e6d93@newsspool3.arcor-online.net> <513faaf7$0$6626$9b4e6d93@newsspool2.arcor-online.net> <51408e81$0$6577$9b4e6d93@newsspool3.arcor-online.net> <11rcs3gg4taww$.bylek8fsshyz$.dlg@40tude.net> <99929f93-b80f-47c3-8a37-c81002733754@googlegroups.com> <87ec4b1d-f7cd-49a4-8cff-d44aeb76a1ad@googlegroups.com> <51443b97$0$6635$9b4e6d93@newsspool2.arcor-online.net> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 X-Trace: pcls6.std.com 1363466998 8845 192.74.137.71 (16 Mar 2013 20:49:58 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Sat, 16 Mar 2013 20:49:58 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:8KjawEcV8zW1GPOPqxG1moIWIA4= Content-Type: text/plain; charset=us-ascii Date: 2013-03-16T16:49:58-04:00 List-Id: Georg Bauhaus writes: > On 15.03.13 22:46, Robert A Duff wrote: >> That works in C because all sizes >> are known at compile time. > > That's true in C89, but C99 makes sizeof an execution > time operator for variable length arrays. Ah, yes. Thanks for the reminder. >...The operand > is then evaluated. Right. It seems confusing to me that the operand of sizeof is evaluated in some cases but not others. In Ada, the prefix of 'Size is always evaluated. My suggestion that the prefix of 'Type could be unevaluated (always) could work for the same reason sizeof can work like it does in C89. - Bob