Nim
Nim copied to clipboard
fix #17351
fix #17351. Initialization of parent struct in C++ appeared only in C++17. https://stackoverflow.com/questions/47333843/using-initializer-list-for-a-struct-with-inheritance
Looks like CI is using gcc 5.5 which doesn't support required C++ feature. The best option is to upgrade the CI
If I got it correctly mingw is taken from nim website https://nim-lang.org/download/mingw64.7z. Who has permission to upgrade it?
Who has permission to upgrade it?
Me. What version of mingw should we ship?
The first gcc version that has the necessary feature is 8.0. https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/8.1.0/threads-win32/seh/x86_64-8.1.0-release-win32-seh-rt_v6-rev0.7z/download should work. Let me test it later today.
nim with gcc v8 had bugs https://github.com/nim-lang/Nim/issues/9375 no idea if there are still any issues. anyways, is there any reason to not update to latest mingw?
I have tried gcc 8.1 I have proposed above and I haven't experienced any issues, checked for issues mentioned in #9375 as well. I think it is ok to upgrade.
If there si objection to gcc 8.1 there is tdm-gcc 9.2 https://jmeubank.github.io/tdm-gcc/articles/2020-03/9.2.0-release. I also had good experience with it but it comes with installer.
can you please check whether upgrading C compiler would fix these windows-specific bugs affecting math issues https://github.com/nim-lang/Nim/issues/17017?
tested, #17017 is not a problem on mingw 8.1
tested, #17017 is not a problem on mingw 8.1
great, just to clarify, what's the output you get for:
import math
func c_frexp2(x: cdouble, exponent: var cint): cdouble {.
importc: "frexp", header: "<math.h>".}
var x = cdouble(-0.0)
var exponent: cint
echo c_frexp2(x, exponent)
echo sqrt(-1.0)
echo gamma(-1.0)
?
it should be:
-0.0
nan
nan
Even if nim-lang.org/download/mingw64.7z is updated, most people won't get to know that a newer gcc is required for some bug fixes. is the mingw download integrated into choosenim, so that when the nim version is upgraded, newer mingw will be downloaded as well?
The MingW we ship with Nim has been updated. The next release will have it.
This pull request has been automatically marked as stale because it has not had recent activity. If you think it is still a valid PR, please rebase it on the latest devel; otherwise it will be closed. Thank you for your contributions.
Succeeded by https://github.com/nim-lang/Nim/pull/20407