[Issue 2092] New: Stuff that doesn't compile in Phobos

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat May 10 11:19:51 PDT 2008


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

           Summary: Stuff that doesn't compile in Phobos
           Product: D
           Version: 1.029
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: ary at esperanto.org.ar


Here's a listing of things that doesn't compile in Phobos. I'm using Phobos to
see if Descent semantic was ported correctly from DMD, and from a long time now
I've found errors in Phobos which Descent reports correctly.

Maybe you didn't notice them as errors because some of them are inside unittest
blocks, others are inside static ifs which may not hold.

etc.gamma.d
------------
Line 286:

assert(feqrel(tgamma(i * 1.0L), fact) > real.mant_dig - 15);

template std.math.feqrel(X) cannot deduce template function from argument types
(real,double)

Lines 420-421:

assert(std.math.isPosZero(lgamma(1.0L)));
assert(std.math.isPosZero(lgamma(2.0L)));

std.math.isPosZero doesn't exist.

std.math.d
------------
Function real frexp(real value, out int exp):

Inside "static if (real.mant_dig==53)" a variable named "ve" is used, by it
isn't declared anywhere. Possible solutions are "vu" or "vl", I don't know
which one is the correct one.

Function int issubnormal(real x):

Inside "static if (real.mant_dig == 53)" a function named "isSubnormal" is
invoked, but it isn't declared anywhere. Same with the last else. Probably it
should be "issubnormal".

Lines

904: vu[F.EXPPOS_SHORT] = (0x8000 & vu[F.EXPPOS_SHORT]) | 0x3FE0;
912: sgn = (0x8000 & vu[F.EXPPOS_SHORT])| 0x3FE0;

give warnings about implicit conversion. Wrapping everything in cast(ushort)
solves the problem.
(if warnings are enabled, some template instances fail)


-- 



More information about the Digitalmars-d-bugs mailing list