-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix #17351 #17375
fix #17351 #17375
Conversation
@@ -14,3 +14,13 @@ block: # issue #13071 | |||
a = e.msg & $e.name # was segfaulting here for `nim cpp --gc:arc` | |||
doAssert a == "foo:MyExcept" | |||
fun() | |||
|
|||
|
|||
block: # issue #17351 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
block: # issue #17351 | |
block: # bug #17351 |
https://nim-lang.github.io/Nim/contributing.html
Always refer to a GitHub issue using the following exact syntax: bug #1234 as shown above, so that it's consistent and easier to search or for tooling. Some browser extensions [...]
|
||
block: # issue #17351 | ||
type | ||
Foo {.inheritable.} = object |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wrong file (texceptions.nim
): this isn't related to exceptions nor to arc; instead put it in for eg:
tests/misc/t17351.nim
with:
discard """
targets: "c cpp"
"""
(and optionally with matrix "--gc:arc; --gc:refc"
)
@@ -113,7 +113,7 @@ compiler nintendoSwitchGCC: | |||
asmStmtFrmt: "asm($1);$n", | |||
structStmtFmt: "$1 $3 $2 ", # struct|union [packed] $name | |||
produceAsm: gnuAsmListing, | |||
cppXsupport: "-std=gnu++14 -funsigned-char", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang is also affected by this
Looks like CI is using gcc 5.5 which doesn't support required C++ feature. |
If I got it correctly mingw is taken from nim website https://nim-lang.org/download/mingw64.7z. |
Me. What version of mingw should we ship? |
The first gcc version that has the necessary feature is 8.0. |
nim with gcc v8 had bugs #9375 |
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 #17017? |
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:
|
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. |
The MingW we ship with Nim has been updated. The next release will have it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please solve the comments
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 #20407 |
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