core.stdc.fenv: proper support for Microsoft C Runtime (Visual Studio >= 2013)#969
core.stdc.fenv: proper support for Microsoft C Runtime (Visual Studio >= 2013)#969rainers merged 3 commits intodlang:masterfrom
Conversation
|
The failing Win64 autotest just illustrates that currently declared functions (in this case, fesetenv and fetestexcept declared in the same module) are not available in the linked C runtime (presumably MSVC < 2013) and thus lead to linking errors when used. |
|
Please rebase. Windows experts n da house who can review this? |
There was a problem hiding this comment.
You should also use CRuntime_DigitalMars for the version condition just above this one. DMC_RUNTIME is no longer correct.
|
PING! It's almost been half a year now and I don't see any reason not to merge this. |
|
I like to see this merged, too. It supports the Win64 port of LDC. |
|
I guess the resistence to merging comes from the impression that the change only works for VS2013 and later. IIUC this is not the case, though some C99 functions are not available in earlier versions and will cause link errors. |
The VS2013 seems to unmask the requested exceptions, so it is an actual change, but let's consider the VS2015 version a bug fix. The older version didn't even compile for C code: https://connect.microsoft.com/VisualStudio/feedback/details/806624/fenv-h-unusable-in-vs-2013 |
|
It'd be nice if there would be some tests for this, though I understand that's a bit difficult if they depend on the version of the MS runtime. |
|
Auto-merge toggled on |
core.stdc.fenv: proper support for Microsoft C Runtime (Visual Studio >= 2013)
VCRT 2013 uses a minimally different feraiseexcept() implementation than this one from VCRT 2014 CTP 3 (2013 additionally sets the exception flags via fesetexceptflag), but I guess that doesn't make a huge difference. The rest of 2013 is identical to 2014, so MSVC 2013 should be supported too.
More important are the correct constants and the implementation of 2 inline functions (to prevent linking errors).