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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,c9d5fc258548b22a X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news1.google.com!news.glorb.com!news-xxxfer.readnews.com!textspool1.readnews.com!news-out.readnews.com!postnews3.readnews.com!not-for-mail Date: Wed, 09 Feb 2011 16:10:53 -0500 From: Hyman Rosen User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: How do I write directly to a memory address? References: <67063a5b-f588-45ea-bf22-ca4ba0196ee6@l11g2000yqb.googlegroups.com> <4d5008a5$0$6879$9b4e6d93@newsspool2.arcor-online.net> <4d5031fe$0$6765$9b4e6d93@newsspool3.arcor-online.net> <1f229967-d3cf-42b6-8087-c97ee08652f3@i40g2000yqh.googlegroups.com> <4d5110ea$0$7669$9b4e6d93@newsspool1.arcor-online.net> <1fb3ce45-ffcc-4c1c-8f76-d151975c8425@x1g2000yqb.googlegroups.com> <4d511500$0$7665$9b4e6d93@newsspool1.arcor-online.net> <4d518a90$0$7651$9b4e6d93@newsspool1.arcor-online.net> <4d51b471$0$6772$9b4e6d93@newsspool3.arcor-online.net> <1lajq4dvy7368.41bre951qpy3$.dlg@40tude.net> <6r07nah77nc1$.uwqkyjfg484k$.dlg@40tude.net> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <4d5302df$0$18057$882e7ee2@usenet-news.net> NNTP-Posting-Host: 3498b938.usenet-news.net X-Trace: DXC=c2_^3C_3P8kB@9lDYMBAi`^oXGM_6\KV`mX0AG3X_jUo<^JMhOhjP4nVjKk:Lk^BNacR12TN^Bg7nCKIHCW3N^VdOiaDcmXlf@e X-Complaints-To: abuse@usenet-news.net Xref: g2news2.google.com comp.lang.ada:18129 Date: 2011-02-09T16:10:53-05:00 List-Id: On 2/9/2011 3:19 PM, Vinzent Hoefler wrote: > So it probably was as readable as C-code could ever be. Of course, things like > putting "(void)" before each function where the return value is not evaluated > might not really count as "readable", but it's a good hint for the maintenance > programmer that it was ignored on purpose. Ugh. I would never allow such constructs to pass inspection. It isn't idiomatic C, and it's ugly as sin. Why might you have such ignored returns? For example, strcat and strcpy return their first argument so you can cascade, strcat(strcat(strcpy(buf, "a"), "b"), "c"); but typically you're just doing strcpy(buf, "hello"); If you write (void)strcpy(buf, "hello"); that doesn't tell me you're careful, I'll just hate you.