comp.lang.ada
 help / color / mirror / Atom feed
From: David Emery <demery@cox.net>
Subject: Re: of possible interest
Date: Thu, 11 May 2006 18:25:32 -0400
Date: 2006-05-11T18:25:32-04:00	[thread overview]
Message-ID: <wRO8g.9628$B42.4085@dukeread05> (raw)
In-Reply-To: <wccpsioqbay.fsf@shell01.TheWorld.com>

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



  reply	other threads:[~2006-05-11 22:25 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-04 19:05 of possible interest Marco
2006-05-04 19:26 ` Ludovic Brenta
2006-05-04 23:30   ` Georg Bauhaus
2006-05-05  2:49     ` Ed Falis
2006-05-05 14:40     ` Ludovic Brenta
2006-05-07  7:46   ` Nasser Abbasi
2006-05-07 11:50     ` Larry Kilgallen
2006-05-07 12:54     ` Ludovic Brenta
     [not found]       ` <0gcs52lejunc5qar09mf2mng2kg8kumedk@4ax.com>
2006-05-07 20:37         ` Frederic Praca
2006-05-07 22:25           ` Georg Bauhaus
2006-05-08  7:26             ` Ludovic Brenta
2006-05-09  0:41             ` Robert A Duff
2006-05-11 22:25               ` David Emery [this message]
2006-05-12 15:45                 ` Pascal Obry
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox