[m-dev.] for review: --no-const-ground-terms

Fergus Henderson fjh at cs.mu.OZ.AU
Tue Oct 10 12:31:04 AEDT 2000


On 09-Oct-2000, Peter Ross <Peter.Ross at cs.kuleuven.ac.be> wrote:
> For Fergus to review, I am not sure if it is trivial to do on the MLDS
> backend, so any comments appreciated.
...
> Add the option --const-ground-terms, which determines whether or not
> static ground terms are output as `const'.  This option will be used to
> avoid problem where a static ground term has one of its fields updated
> by structure reuse.  This causes a segfault as the memory is readonly.

I think the whole idea won't work.  It's only safe to make it static
if it's readonly.  If you'd doing destructive update on it, then it's
not safe to make it static, because next time you try to use the static
variable, it won't have the right value!

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3        |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list