View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0000019 | mercury | Bug | public | 2007-10-16 16:24 | 2007-10-16 17:37 | ||||||||
Reporter | wangp | ||||||||||||
Assigned To | |||||||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||||||
Status | confirmed | Resolution | open | ||||||||||
Product Version | |||||||||||||
Target Version | Fixed in Version | ||||||||||||
Summary | 0000019: foreign type mutables don't work in high-level C grades | ||||||||||||
Description | In hlc grades, a mutable of a foreign type FT in a module M will result in a variable declaration in M.mih that refers to FT before the #inclusion of the header that defines FT. | ||||||||||||
Additional Information | For the given modules: % mmc -m aa -s hlc.gc Making Mercury/os/aa.o In file included from Mercury/cs/aa.c:26: aa.m:17: error: syntax error before '*' token aa.m:17: warning: type defaults to `int' in declaration of `aa__mutable_variable_my_bb' aa.m:17: warning: data definition has no type or storage class aa.m:17: error: conflicting types for 'aa__mutable_variable_my_bb' aa.m:17: error: previous declaration of 'aa__mutable_variable_my_bb' was here ** Error making `Mercury/os/aa.o'. The same thing works in asm_fast.gc | ||||||||||||
Tags | No tags attached. | ||||||||||||
Attached Files |
Notes | |
juliensf (administrator) 2007-10-16 16:46 Last edited: 2007-12-31 11:53 |
The same thing works in asm_fast.gc because in that grade mutables always have type MR_Word. I think that we need to ensure that all mutables that are foreign types in the hl* grades also have type MR_Word, rather than the foreign type. (Actually, since we don't know the type in question it should be boxed anyway.) [I reported a related set of bugs with float and non-word sized foreign type mutables in the hl* grades at the beginning of this year, I haven't fixed them yet since I was waiting for zs's parse tree restructure.] |
Issue History | |||
Date Modified | Username | Field | Change |
---|---|---|---|
2007-10-16 16:24 | wangp | New Issue | |
2007-10-16 16:24 | wangp | File Added: aa.m | |
2007-10-16 16:25 | wangp | File Added: bb.m | |
2007-10-16 16:46 | juliensf | Note Added: 0000027 | |
2007-10-16 16:46 | juliensf | Status | new => confirmed |
2007-10-16 17:37 | juliensf | Note Added: 0000028 | |
2007-10-16 17:40 | juliensf | Note Deleted: 0000028 | |
2007-12-31 11:53 | juliensf | Note Edited: 0000027 |