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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no 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: g2news1.google.com!news3.google.com!feeder.news-service.com!feeder.news-service.com!2a02:590:1:1::196.MISMATCH!news.teledata-fn.de!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: How do I write directly to a memory address? Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <67063a5b-f588-45ea-bf22-ca4ba0196ee6@l11g2000yqb.googlegroups.com> <31c357bd-c8dc-4583-a454-86d9c579e5f4@m13g2000yqb.googlegroups.com> <05a3673e-fb97-449c-94ed-1139eb085c32@x1g2000yqb.googlegroups.com> <4d4bd59e$0$6893$9b4e6d93@newsspool2.arcor-online.net> Date: Fri, 4 Feb 2011 12:07:54 +0100 Message-ID: NNTP-Posting-Date: 04 Feb 2011 12:07:54 CET NNTP-Posting-Host: 383fc615.newsspool1.arcor-online.net X-Trace: DXC=bC3\cEXFZ^QYI9]OHn9o5^ic==]BZ:af^4Fo<]lROoRQ<`=YMgDjhgRRUbKm`amj0^[6LHn;2LCV^7enW;^6ZC`T\`mfM[68DCS9EUYjn?;;3V X-Complaints-To: usenet-abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:16865 Date: 2011-02-04T12:07:54+01:00 List-Id: On Fri, 04 Feb 2011 11:31:58 +0100, Georg Bauhaus wrote: > On 2/4/11 10:24 AM, Ludovic Brenta wrote: > >> Did I mention that *every* time I look at C code I see a bug? >> Sometimes, looking twice at the same code reveals two bugs! Here you >> do not check that message != NULL; the condition should be: >> >> while (message&& *message != 0) > > I think you won't be convincing a C programmer by stipulating that > he has been stupid and passed a null pointer for message. It might help to convince him that C is not a simple language. > He hasn't, he has thought about his program. Important is not "if", but "what." > And it won't help promote Ada to argue that the stupid misuse > of a C function is a property of C. It is not a misuse, it is how C is used, the state of the art. > You are inventing contract > breaches that are equivalent to those in the style of Ariane 4/5. > Ada's type system and range checking has not prevented > programmers and engineers making a mistake. I love this kind of logic: if you cannot prevent cancer, why would you check the car brakes? > CVEs, as every real C programmer knows, are caused by stupid, > incompetent C programmers who should find a different occupation. Nope, the fact is that probably no programmer is competent to use C. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de