Article View: comp.sys.transputer
Article #105Re: Re: compiler error
From: Brian d'Auriol
Date: Mon, 10 Aug 1992 12:16
Date: Mon, 10 Aug 1992 12:16
42 lines
2214 bytes
2214 bytes
In article <5631@m1.cs.man.ac.uk> bane@vtx.ma.man.ac.uk) (M i c h a e l ;-) writes: > >Jan (jan@neuroinformatik.ruhrunibochum.de) asks with regard to my earlier mailing >about an compiler error: > >> According to the occam reference manual, the count can ba an expression, and >> an expression can certainly contain a function. Are you sure that your >> function doesn't evaluate to a negative value at compile time. (Although >> I'm not sure the occam compiler actually does the obvious thing and evalute >> such a function at compile time...) > >well the function was the Min of 2 integers, neither of which (as far as the SC knows) >is a compile-time constant (or known at compile time). > > > >I received this reply from Tony (arc1@uk.ac.ukc) which might shed a little light on >the subject: > >> Michael, >> Ah yes, I think there is a bug to do with return values on >> the stack getting nobbled in FUNCTION calls. Often having a >> non-trivial expression (i.e. anything more complicated than >> a varaible name or a constant) in the RETURN line of the >> function will cause this, or cause corrupted data values. >> This blew up one of our users. > >[NB: my function call only had a single INT value to be RETURNed] > > >To finish this discussion off, I'd just like to point out that I'm amazed that I >received the message COMPILER ERROR - please report which, to me, implies that it is >the compiler (and thus not, necessarily, my code) that was in deep trouble. Doubly >surprizing that the compiler failed in such a normal/straightforward piece of code. > > >All the best, >Michael > > >PS: Do many people still use occam? I was told recently by a systems person on a >transputer machine that nobody uses occam anymore...
Technical Details
Message-ID:
<1992Aug10.121620.213@jupiter.sun.csd.unb.ca>Path:
arc1-ca.pugleaf.net!sparky!uunet!utcsri!torn!csd.unb.ca!k3miReferences:
<5613@m1.cs.man.ac.uk> <JAN.92Aug7121302@pallas.neuroinformatik.ruhr-uni-bochum.de> <5631@m1.cs.man.ac.uk>Show Full Headers
Complete Article Headers
Newsgroups: comp.sys.transputer Path: arc1-ca.pugleaf.net!sparky!uunet!utcsri!torn!csd.unb.ca!k3mi From: k3mi@jupiter.sun.csd.unb.ca (Brian d'Auriol) Subject: Re: Re: compiler error Message-ID: <1992Aug10.121620.213@jupiter.sun.csd.unb.ca> Organization: University of New Brunswick References: <5613@m1.cs.man.ac.uk> <JAN.92Aug7121302@pallas.neuroinformatik.ruhr-uni-bochum.de> <5631@m1.cs.man.ac.uk> Date: Mon, 10 Aug 1992 12:16:20 GMT Lines: 44