Mercury Bugs - mercury
View Issue Details
0000189mercuryBugpublic2011-03-16 04:352011-03-16 17:10
Assigned Tojuliensf 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0000189: foreign_enum is not 64-bit safe
DescriptionThe definition of MR_ForeignEnumFunctorDesc in mercury_type_info.h assumes a 32-bit word size. This causes problems with foreign enum values which have bit 31 set, as their Mercury counterparts are incorrectly sign-extended, causing matching to fail.
Additional InformationAs a workaround, one can cast foreign enum values to MR_int_least32_t before passing to Mercury.
TagsNo tags attached.
Attached Files

2011-03-16 17:10   
Fix committed. The field in MR_ForeignEnumFunctorDesc should have had type MR_Integer,
not MR_int_least32_t.

Issue History
2011-03-16 04:35colandermanNew Issue
2011-03-16 11:01juliensfStatusnew => assigned
2011-03-16 11:01juliensfAssigned To => juliensf
2011-03-16 17:10juliensfNote Added: 0000316
2011-03-16 17:10juliensfStatusassigned => resolved
2011-03-16 17:10juliensfResolutionopen => fixed