Skip to content
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

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions compiler/extccomp.nim
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ compiler gcc:
asmStmtFrmt: "asm($1);$n",
structStmtFmt: "$1 $3 $2 ", # struct|union [packed] $name
produceAsm: gnuAsmListing,
cppXsupport: "-std=gnu++14 -funsigned-char",
cppXsupport: "-std=gnu++17 -funsigned-char",
props: {hasSwitchRange, hasComputedGoto, hasCpp, hasGcGuard, hasGnuAsm,
hasAttribute})

Expand All @@ -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",
Copy link
Member

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

cppXsupport: "-std=gnu++17 -funsigned-char",
props: {hasSwitchRange, hasComputedGoto, hasCpp, hasGcGuard, hasGnuAsm,
hasAttribute})

Expand Down
10 changes: 10 additions & 0 deletions tests/arc/texceptions.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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 [...]

type
Foo {.inheritable.} = object
Copy link
Member

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")

Foo2 = object of Foo
Bar = object
x: Foo2

var b = Bar()