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

Simon Taylor stayl at cs.mu.OZ.AU
Wed May 29 03:34:23 AEST 2002


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
--------------------------------------------------------------------------



More information about the reviews mailing list