Mercury Bugs - mercury
View Issue Details
0000082mercuryBugpublic2008-08-25 14:382008-08-27 14:05
Reportermaclarty 
Assigned Towangp 
PrioritynormalSeveritymajorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0000082: Functions returning a wrapped dummy type cause invalid c code to be generated in grade hlc.gc
DescriptionCompiling the attached code yields:

$ mmc --make --grade hlc.gc main
Making Mercury/int3s/main.int3
Making Mercury/int3s/mod1.int3
Making Mercury/ints/main.int
Making Mercury/ints/mod1.int
Making Mercury/cs/main.c
Making Mercury/cs/mod1.c
Making Mercury/os/main.o
main.m: In function `main_2_p_0':
main.m:14: error: void value not ignored as it ought to be
** Error making `Mercury/os/main.o'.

$ mmc --version
Mercury Compiler, version rotd-2008-08-20, configured for i686-pc-linux-gnu
TagsNo tags attached.
Attached Files? main.m (186) 2008-08-25 14:38
https://bugs.mercurylang.org/file_download.php?file_id=64&type=bug
? mod1.m (192) 2008-08-25 14:39
https://bugs.mercurylang.org/file_download.php?file_id=65&type=bug

Notes
(0000142)
wangp   
2008-08-26 11:40   
The problem is that there are three kinds of dummy types, but the code which
generates .int files only recognises two of them. No-tag dummy types need
to have their definitions written out to .int files, so importing modules
will know they are dummy types. I am working on this.
(0000143)
wangp   
2008-08-27 14:05   
Patch committed

Issue History
2008-08-25 14:38maclartyNew Issue
2008-08-25 14:38maclartyFile Added: main.m
2008-08-25 14:39maclartyFile Added: mod1.m
2008-08-26 11:40wangpNote Added: 0000142
2008-08-27 14:05wangpStatusnew => resolved
2008-08-27 14:05wangpResolutionopen => fixed
2008-08-27 14:05wangpAssigned To => wangp
2008-08-27 14:05wangpNote Added: 0000143