🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.modula2
Article #974

Re: JPI M2 2.00 - PROCEDURE FUNCTIONS & ERROR CHECKING

#974
From: Jens Tingleff
Date: Wed, 25 Jul 1990 06:58
27 lines
1853 bytes
preston@erato.rice.edu (Preston Briggs) writes:

>In article <1990Jul24.060519.23417@portia.Stanford.EDU> dhinds@portia.Stanford.EDU (David Hinds) writes:
[..]
>I think it probably can't be.  However, the compiler
>can still detect that there exists a path from the entrance
>to the END of a function with no RETURN.  It's one of the
>advantages of using control constructs with the infamous
>"single-entrance, single-exit" property.

Even if the language doesn't have the `nice' control structures, the
compiler can still detect the presence of a path. I'm thinking of
GNU CC which (when optimising) performs flow analysis that will
pester the knowledgeable user ;-) with message about end of non-void
function reached etc. If you don't have the (non-ANSI) patch declaring
`exit()' to be non-returning, the `main()' function is a liable 
candidate for such a warning... 

As said (too) many times, the existance of a path doesn't mean that there
is an error.

	Jens

Jens Tingleff MSc EE, Institute of Computer Science, Copenhagen University
Snail mail: DIKU Universitetsparken 1 DK2100 KBH O
"It never runs around here; it just comes crashing down"
	apologies to  Dire Straits 
Technical Details
Message-ID: <1990Jul25.065805.21266@diku.dk>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!mailrus!iuvax!rutgers!njin!uupsi!sunic!dkuug!freja.diku.dk!skinfaxe.diku.dk!jensting
References: <1960.26A95065@puddle.fidonet.org> <90204.213559TRL3@psuvm.psu.edu> <1990Jul24.060519.23417@portia.Stanford.EDU> <10180@brazos.Rice.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!mailrus!iuvax!rutgers!njin!uupsi!sunic!dkuug!freja.diku.dk!skinfaxe.diku.dk!jensting
From: jensting@skinfaxe.diku.dk (Jens Tingleff)
Newsgroups: comp.lang.modula2
Subject: Re: JPI M2 2.00 - PROCEDURE FUNCTIONS & ERROR CHECKING
Message-ID: <1990Jul25.065805.21266@diku.dk>
Date: 25 Jul 90 06:58:05 GMT
References: <1960.26A95065@puddle.fidonet.org> <90204.213559TRL3@psuvm.psu.edu> <1990Jul24.060519.23417@portia.Stanford.EDU> <10180@brazos.Rice.edu>
Sender: news@diku.dk (The Netnews System)
Organization: Department Of Computer Science, University Of Copenhagen
Lines: 27