Bug 4191 – [FreeBSD] real constants are rounded to double precision

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
FreeBSD
Creation time
2010-05-15T01:44:00Z
Last change time
2015-06-09T05:11:47Z
Keywords
patch, wrong-code
Assigned to
nobody
Creator
rsinfu

Attachments

IDFilenameSummaryContent-TypeSize
629freebsd-long-double.patchPatch for DMD (svn r487)text/plain1357

Comments

Comment #0 by rsinfu — 2010-05-15T01:44:46Z
Created attachment 629 Patch for DMD (svn r487) This code fails with dmd built on FreeBSD/i386: -------------------- static assert(real.max < real.infinity); // fails on FreeBSD -------------------- Some static assertions in std.math are blocked by this problem. There is a bug in GCC on FreeBSD/i386 and long double constants are rounded to double precision(*). A workaround is already there in DMD as Port::ldbl_max, but it seems it's forgotten. :) The attached patch enables this workaround, and adds necessary fpsetprec. [*] freebsd-standards: long double broken on i386? http://groups.google.co.jp/group/lucky.freebsd.standards/browse_thread/thread/5d7b42dac8d29461
Comment #1 by bugzilla — 2010-08-05T03:06:07Z