Thread overview
[Issue 221] New: Inconsistent name mangling of bool (a relic of 'bit')
Jun 23, 2006
d-bugmail
Sep 14, 2006
Thomas Kuehne
[Issue 221] Inconsistent name mangling of bool (a relic of 'bit') [Patch included]
Nov 23, 2006
d-bugmail
Dec 03, 2006
d-bugmail
June 23, 2006
http://d.puremagic.com/issues/show_bug.cgi?id=221

           Summary: Inconsistent name mangling of bool (a relic of 'bit')
           Product: D
           Version: 0.160
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: minor
          Priority: P4
         Component: DMD
        AssignedTo: bugzilla@digitalmars.com
        ReportedBy: clugdbug@yahoo.com.au


Long ago, bit was name-mangled as 'x', but now that bit is gone, bool is
name-mangled as 'b'.
However, for function parameters, bool is still name-mangled as 'x' rather than
the expected 'b'.

bool.mangleof == "b"

but...

(void function(bool)).mangleof ==  "PFxZv"

instead of the more natural "PFbZv"

This means that one of the few unused name-mangling letters ('x') is wasted. Probably an implementation quirk rather than a bug.


-- 

September 14, 2006
d-bugmail@puremagic.com schrieb am 2006-06-23:
> http://d.puremagic.com/issues/show_bug.cgi?id=221

> Long ago, bit was name-mangled as 'x', but now that bit is gone, bool is
> name-mangled as 'b'.
> However, for function parameters, bool is still name-mangled as 'x' rather than
> the expected 'b'.
>
> bool.mangleof == "b"
>
> but...
>
> (void function(bool)).mangleof ==  "PFxZv"
>
> instead of the more natural "PFbZv"
>
> This means that one of the few unused name-mangling letters ('x') is wasted. Probably an implementation quirk rather than a bug.

Added to DStress as http://dstress.kuehne.cn/compile/b/bool_07_A.d http://dstress.kuehne.cn/compile/b/bool_07_B.d http://dstress.kuehne.cn/compile/b/bool_07_C.d

Thomas


November 23, 2006
http://d.puremagic.com/issues/show_bug.cgi?id=221


clugdbug@yahoo.com.au changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|minor                       |normal
            Summary|Inconsistent name mangling  |Inconsistent name mangling
                   |of bool (a relic of 'bit')  |of bool (a relic of 'bit')
                   |                            |[Patch included]




------- Comment #2 from clugdbug@yahoo.com.au  2006-11-23 03:41 -------

mtype.c line 174-175,

    mangleChar[Tbit] = 'b';
    mangleChar[Tbool] = 'x';

This should be changed so they are both 'b'.


-- 

December 03, 2006
http://d.puremagic.com/issues/show_bug.cgi?id=221


deewiant@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




------- Comment #3 from deewiant@gmail.com  2006-12-03 03:56 -------
Fixed in DMD 0.176.


--