www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 221] New: Inconsistent name mangling of bool (a relic of 'bit')

reply d-bugmail puremagic.com writes:
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.


-- 
Jun 23 2006
next sibling parent Thomas Kuehne <thomas-dloop kuehne.cn> writes:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

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 -----BEGIN PGP SIGNATURE----- iD8DBQFFCP9OLK5blCcjpWoRArQ5AJ4zICwdJn/+XCb25p/EEl9NJYzlOgCfeaQR di6qDDkQF3WGNA0dRlieCVE= =QXjy -----END PGP SIGNATURE-----
Sep 14 2006
prev sibling next sibling parent d-bugmail puremagic.com writes:
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'.


-- 
Nov 23 2006
prev sibling parent d-bugmail puremagic.com writes:
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.


-- 
Dec 03 2006