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,aa955fc1adc2b46d X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!news.glorb.com!cox.net!news-xfer.cox.net!p01!dukeread05.POSTED!53ab2750!not-for-mail From: David Emery User-Agent: Thunderbird 1.5.0.2 (Macintosh/20060308) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: of possible interest References: <1146769504.421510.21010@j73g2000cwa.googlegroups.com> <8764klwpz5.fsf@ludovic-brenta.org> <87u082ouzs.fsf@ludovic-brenta.org> <0gcs52lejunc5qar09mf2mng2kg8kumedk@4ax.com> <20060507223701.175e2ec9@localhost.darkstar> <1147040746.9037.12.camel@localhost.localdomain> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Date: Thu, 11 May 2006 18:25:32 -0400 NNTP-Posting-Host: 24.249.249.75 X-Complaints-To: abuse@cox.net X-Trace: dukeread05 1147386332 24.249.249.75 (Thu, 11 May 2006 18:25:32 EDT) NNTP-Posting-Date: Thu, 11 May 2006 18:25:32 EDT Organization: Cox Communications Xref: g2news2.google.com comp.lang.ada:4204 Date: 2006-05-11T18:25:32-04:00 List-Id: There's a lot of anecdotal and probably some documented evidence on large chunks of C code where the return value of a system call was ignored. Those 2 ATT/Bell Labs studies on common programming errors in C on the 5ESS project documented this as a problem (if I remember correctly) and recommended some solutions (but not the right one, switching to a language with exceptions and where at least syntactically, you had to provide a container for a function return, even if you ignore the result... :-). A good compiler should issue a warning in the following situation: declare return_value : error_status_codes; begin return_value := some_function (parameters); do_more_computations (parameters); end; noting that "return_value" is never used. That's usually a hint of a problem. dave