Bug 221 – Inconsistent name mangling of bool (a relic of 'bit') [Patch included]

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P4
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
Windows
Creation time
2006-06-23T07:34:00Z
Last change time
2014-02-15T13:19:30Z
Keywords
wrong-code
Assigned to
bugzilla
Creator
clugdbug

Comments

Comment #0 by clugdbug — 2006-06-23T07:34:08Z
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.
Comment #1 by thomas-dloop — 2006-09-14T02:25:24Z
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 [email protected] 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-----
Comment #2 by clugdbug — 2006-11-23T03:41:05Z
mtype.c line 174-175, mangleChar[Tbit] = 'b'; mangleChar[Tbool] = 'x'; This should be changed so they are both 'b'.
Comment #3 by matti.niemenmaa+dbugzilla — 2006-12-03T03:56:38Z
Fixed in DMD 0.176.