[Issue 3029] Bug in array value mangling rule

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Jun 6 09:07:03 PDT 2009


http://d.puremagic.com/issues/show_bug.cgi?id=3029





--- Comment #2 from Shin Fujishiro <rsinfu at gmail.com>  2009-06-06 09:07:02 PDT ---
Another (possibly better) option is to fix the numeric literal mangling rule as
this:
--------------------
Value:
    i Number        // positive numeric literal
    i N Number      // negative numeric literal
--------------------
The prefix 'i' avoids the mangled-name collision. And this rule is consistent
with other literal mangling rules, which are prefixed by some character (e.g.
'e' for floating point literals).

Patch (expression.c):
--------------------
 void IntegerExp::toMangleBuffer(OutBuffer *buf)
 {
     if ((sinteger_t)value < 0)
-    buf->printf("N%jd", -value);
+    buf->printf("iN%jd", -value);
     else
-    buf->printf("%jd", value);
+    buf->printf("i%jd", value);
 }
--------------------

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list