Mercury Bugs - mercury
View Issue Details
0000092mercuryBugpublic2009-03-09 23:432025-07-10 00:09
Reporterjuliensf 
Assigned Tozs 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0000092: generated C code contains a block that defines a variable that shadows a headvar in hlc.gc
DescriptionCompiling the C code generated for the attached module in the hlc.gc grade results in:

shadowed_headvar.m: In function 'shadowed_headvar__type_defined_in_runtime_1_p_0':
shadowed_headvar.m:64: warning: declaration of 'shadowed_headvar__HeadVar__1_1' shadows a parameter
shadowed_headvar.m:38: warning: shadowed declaration is here
TagsNo tags attached.
Attached Files? shadowed_headvar.m (2,455) 2009-03-09 23:43
https://bugs.mercurylang.org/file_download.php?file_id=71&type=bug

Notes
(0001234)
zs   
2025-07-10 00:09   
I think this bug was fixed, possibly unintentionally, soon after
it was filed. In an email to m-rev on 2017 Apr 24, juliensf wrote
about this bug:

> IIRC I couldn't reproduce it with the rotd
> from a few weeks after I found it.

We certainly haven't been able to reproduce it since, and the current
setup for deciding the names of the C variables representing Mercury
variables *should* rule out any possibility of the reported shadowing.

Issue History
2009-03-09 23:43juliensfNew Issue
2009-03-09 23:43juliensfFile Added: shadowed_headvar.m
2025-07-10 00:09zsAssigned To => zs
2025-07-10 00:09zsStatusnew => closed
2025-07-10 00:09zsResolutionopen => fixed
2025-07-10 00:09zsNote Added: 0001234