Subject: Re: [sv-cc] Updated extern/exports proposal
From: Andrzej Litwiniuk (Andrzej.Litwiniuk@synopsys.com)
Date: Thu Mar 13 2003 - 10:02:12 PST
> John,
>
> remember that any/all calls to a pure extern function may be optimized out if
> the compiler determines that the result is never used.
Similarly, a call to a pure extern function may be optimized out if the compiler
decides to re-use the value previously computed for the same inputs. This is why the return value shall depend solely on function's inputs.
> However, it is legitimate to open a file, read data & close the file before
> returning.
> Joao
Yes, but what a sensible use could a pure function make of the data read
from file, if the result must not depend on anything other then inputs?
Regards,
Andrzej
> 1. Maybe I missed this before, but why cannot pure functions open and close
> files? I don't see how this can have any side-effect that could affect a
> simulator implementation.
>
> -- John A.
This archive was generated by hypermail 2b28 : Thu Mar 13 2003 - 10:04:49 PST