🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.transputer
Article #100

Re: Re: compiler error

#100
From: bane M i c h a e l -
Date: Fri, 07 Aug 1992 16:06
41 lines
2049 bytes
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: <5631@m1.cs.man.ac.uk>
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!uknet!mucs!vtx.ma.man.ac.uk!bane
References: <5593@m1.cs.man.ac.uk> <5613@m1.cs.man.ac.uk> <JAN.92Aug7121302@pallas.neuroinformatik.ruhr-uni-bochum.de>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!uknet!mucs!vtx.ma.man.ac.uk!bane
From: bane@vtx.ma.man.ac.uk) (M i c h a e l ;-)
Newsgroups: comp.sys.transputer
Subject: Re: Re: compiler error
Message-ID: <5631@m1.cs.man.ac.uk>
Date: 7 Aug 92 16:06:14 GMT
References: <5593@m1.cs.man.ac.uk> <5613@m1.cs.man.ac.uk> <JAN.92Aug7121302@pallas.neuroinformatik.ruhr-uni-bochum.de>
Sender: news@cs.man.ac.uk
Lines: 41