Bug 12756 – Cannot build dmd on windows because of longdouble

Status
RESOLVED
Resolution
FIXED
Severity
blocker
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
Windows
Creation time
2014-05-16T12:56:00Z
Last change time
2014-05-17T19:02:38Z
Keywords
pull
Assigned to
nobody
Creator
temtaime

Comments

Comment #0 by temtaime — 2014-05-16T12:56:58Z
constfold.c(136): error: no suitable constructor exists to convert from "double" to "longdouble" real_t r1 = 0.0; ^ constfold.c(137): error: no suitable constructor exists to convert from "double" to "longdouble" real_t i1 = 0.0; ^ constfold.c(140): error: no suitable constructor exists to convert from "double" to "longdouble" real_t r2 = 0.0; ^ constfold.c(141): error: no suitable constructor exists to convert from "double" to "longdouble" real_t i2 = 0.0; ^ constfold.c(221): error: no suitable constructor exists to convert from "double" to "longdouble" real_t r1 = 0.0; ^ constfold.c(222): error: no suitable constructor exists to convert from "double" to "longdouble" real_t i1 = 0.0; ^ constfold.c(225): error: no suitable constructor exists to convert from "double" to "longdouble" real_t r2 = 0.0; ^ constfold.c(226): error: no suitable constructor exists to convert from "double" to "longdouble" real_t i2 = 0.0; ^ This errors because MSVC uses longdouble emulation. longdouble is a struct that doesn't have operator=.
Comment #1 by temtaime — 2014-05-16T13:00:54Z
Because recent MSVC's(2013 and never) supports native longdouble i think we should remove that emulation away.
Comment #2 by r.sagitario — 2014-05-17T07:25:11Z
VS knows "long double", but it is not 80 bits wide, but just the same 64 bits as "double". https://github.com/D-Programming-Language/dmd/pull/3553
Comment #3 by andrej.mitrovich — 2014-05-17T07:41:48Z
(In reply to Temtaime from comment #1) > Because recent MSVC's(2013 and never) supports native longdouble i think we > should remove that emulation away. Let's not break VS2010 compatibility please.
Comment #4 by github-bugzilla — 2014-05-17T08:33:20Z
Commit pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/f5f7b136ab9f23ea6a6a533421b73922874f33f5 Merge pull request #3553 from rainers/fix1_VC fix Issue 12756 - Cannot build dmd on windows because of longdouble
Comment #5 by temtaime — 2014-05-17T10:10:21Z
@Andrej for which purpose we should keep it ? Maybe be should have compatibility for vs 2005 too ? I think we should go forward. But ok i googled and yes long double in VS is alias of double. Too sad.
Comment #6 by andrej.mitrovich — 2014-05-17T10:19:07Z
(In reply to Temtaime from comment #5) > @Andrej for which purpose we should keep it ? DMD is supported on systems from Win7 onward (XP also works but Walter decided it should become deprecated). VS2013 requires Win7 SP1 at a minimum.
Comment #7 by temtaime — 2014-05-17T10:24:22Z
VS2013 supports Windows XP targeting with v120_xp toolset. It must be deprecated. Windows XP is the past. Its lifetime already ended.
Comment #8 by yebblies — 2014-05-17T16:21:38Z
(In reply to Andrej Mitrovic from comment #6) > DMD is supported on systems from Win7 onward (XP also works but Walter > decided it should become deprecated). VS2013 requires Win7 SP1 at a minimum. Do you have a link to where Walter said this? (In reply to Temtaime from comment #7) > It must be deprecated. Windows XP is the past. Its lifetime already ended. Excluding Windows 7, XP still has a bigger desktop market share than all other operating systems combined, according to some sources. Age is not a good reason D shouldn't support the second most common operating system. We shouldn't force anyone to upgrade their toolchain without a very good reason either.
Comment #9 by andrej.mitrovich — 2014-05-17T19:02:38Z
(In reply to yebblies from comment #8) > (In reply to Andrej Mitrovic from comment #6) > > DMD is supported on systems from Win7 onward (XP also works but Walter > > decided it should become deprecated). VS2013 requires Win7 SP1 at a minimum. > > Do you have a link to where Walter said this? Here's a list of his interesting replies, sorted by date: http://forum.dlang.org/post/[email protected] http://forum.dlang.org/post/[email protected] http://forum.dlang.org/post/[email protected] http://forum.dlang.org/post/[email protected] > We shouldn't force anyone to upgrade their toolchain without a very good > reason either. The way I see it, if it's not /too much/ trouble then there's absolutely no reason to break tools. Recently and somewhat related: someone reported to Epic that UE4 didn't work on XP. They responded promptly that they're going to fix the issue ASAP. Business is business!