The Mercury Project
Re: [m-rev.] for review: fix singleton variable warning problem

[Mercury Logo]
Home

News

Information

Documentation

Mailing Lists
  Developers
  Reviews
  Users

Back-ends

Download

Related

Contact

Search

Bug Database

Re: [m-rev.] for review: fix singleton variable warning problem

From: Simon Taylor <stayl_at_cs.mu.OZ.AU>
Date: Wed, 29 May 2002 03:34:23 +1000

On 28-May-2002, Peter Ross <pro_at_missioncriticalit.com> wrote:
> Estimated hours taken: 4
> Branches: main
>
> Avoid a bug where predicates defined in both Mercury and a foreign
> language were issuing warnings about underscore variables occuring
> more than once. This is because if the foreign clause appears first
> than its varset is used for the names of the variables and hence a
> variable could be given an underscore name.

I'm not sure exactly what you mean here, but maybe there's a
shortcut being taken for the varsets for foreign clauses which
isn't correct now that we can mix Mercury clauses with foreign
clauses.
 
> mcpp/compiler/make_hlds.m:
> If a clause has foreign clauses don't check for singleton
> variables.

This isn't an acceptable fix.

> tests/hard_coded/Mmakefile:
> tests/hard_coded/no_warn_singleton.exp:
> tests/hard_coded/no_warn_singleton.m:
> A test case.

This probably belongs in tests/valid.

Simon.
--------------------------------------------------------------------------
mercury-reviews mailing list
post: mercury-reviews_at_cs.mu.oz.au
administrative address: owner-mercury-reviews_at_cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request_at_cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-reviews-request_at_cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
Received on Wed May 29 2002 - 03:34:39 EST


This mail archive was generated by hypermail 2.2.0 on Mon Aug 22 2011 - 12:38:36 EST.