Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Ticket #949 (closed defect: fixed)

Opened 8 months ago

Last modified 8 months ago

Mac OS X: tango.math.IEEE doesn't compile

Reported by: afb Assigned to: Don Clugston
Priority: major Milestone: 0.99.5
Component: Tango Version: trunk
Keywords: Cc:

Description

tango/math/IEEE.d:1534: Error: undefined identifier bitsdiff
tango/math/IEEE.d:1534: Error: template instance 'floatTraits!(real)' is not a variable
tango/math/IEEE.d:1534: Error: no property 'EXPPOS_SHORT' for type 'int'
tango/math/IEEE.d:1537: Error: undefined identifier bitsdiff
tango/math/IEEE.d:1538: Error: undefined identifier bitsdiff
tango/math/IEEE.d:1544: Error: undefined identifier bitsdiff
tango/math/IEEE.d:1544: Error: template instance 'floatTraits!(real)' is not a variable
tango/math/IEEE.d:1544: Error: no property 'EXPPOS_SHORT' for type 'int'
tango/math/IEEE.d:1544: Error: template instance 'floatTraits!(real)' is not a variable
tango/math/IEEE.d:1544: Error: no property 'EXPPOS_SHORT' for type 'int'
tango/math/IEEE.d:1544: Error: template instance 'floatTraits!(real)' is not a variable
tango/math/IEEE.d:1544: Error: no property 'EXPMASK' for type 'int'

Most likely since "doubledouble" is the default type of real...

Changing runtime assert into compiletime assert gives:

tango/math/IEEE.d:1525: static assert  "Unsupported"

Attachments

tango-ieee-warnings.patch (0.8 kB) - added by afb on 02/28/08 03:09:54.

Change History

02/28/08 02:37:15 changed by kris

  • owner changed from kris to Don Clugston.

(follow-up: ↓ 3 ) 02/28/08 03:01:41 changed by Don Clugston

commit #3308 should fix this.

(in reply to: ↑ 2 ) 02/28/08 03:07:17 changed by afb

Replying to Don Clugston:

commit #3308 should fix this.

Partially, these still remain:

tango/math/IEEE.d:685: Error: template instance 'floatTraits!(real)' is not a variable
tango/math/IEEE.d:685: Error: no property 'EXPMASK' for type 'int'
tango/math/IEEE.d:700: Error: template instance 'floatTraits!(real)' is not a variable
tango/math/IEEE.d:700: Error: no property 'POW2MANTDIG' for type 'int'
tango/math/IEEE.d:701: Error: template instance 'floatTraits!(real)' is not a variable
tango/math/IEEE.d:701: Error: no property 'EXPPOS_SHORT' for type 'int'

Also got two -w warnings that I patched:

warning - tango/math/IEEE.d:577: Error: statement is not reachable
warning - tango/math/IEEE.d:686: Error: implicit conversion of expression (cast(int)((cast(short*)(& x))[4u]) & 32767) of type int to short can cause loss of data

02/28/08 03:09:54 changed by afb

  • attachment tango-ieee-warnings.patch added.

02/28/08 09:18:59 changed by Don Clugston

  • status changed from new to assigned.

I've stopped the warnings, but the line numbers in the error messages don't make sense.

02/28/08 09:37:17 changed by afb

line numbers might have been from a hacked version, sorry about that. (should have referred to the same lines that was in the patch though)

02/28/08 11:38:32 changed by Don Clugston

I didn't use the patch. The code I submitted compiles on DMD-Win when triggered by the static assert -- are you sure there wasn't a bug in the patch? Because that code should n't be triggered on Mac OS X. real.mant_dig != 64 on MacOSX.

02/28/08 17:55:47 changed by afb

  • status changed from assigned to closed.
  • resolution set to fixed.

Seems to build fine now, maybe I was mistaken