We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I need to use __restrict__ C keyword inside an iterator, but when inside an iterator codegenDecl does not work, test case:
__restrict__
iterator myitems(s : seq[int]): int = var data {.codegenDecl: "$# __restrict__ $#".} :ptr int = nil yield 1 for i in @[1].myitems: discard
This generates the following C code:
NI* data; nimln_(2, "test2.nim"); data = NIM_NIL;
NI* data should have been NI* __restrict__ data
NI* data
NI* __restrict__ data
Any workarounds? I want to use restrict to make GCC optimize my iterator better.
The text was updated successfully, but these errors were encountered:
The issue is at transformVarSection in transf.nim.
transformVarSection
transf.nim
Sorry, something went wrong.
fix nim-lang#6497
9ccb3c2
581bcfe
fix #6497 (#16027)
5977f55
* fix #6497 * add testcase for #16027 (cherry picked from commit 581bcfe)
fix nim-lang#6497 (nim-lang#16027)
be1a444
* fix nim-lang#6497 * add testcase for nim-lang#16027
3847491
ringabout
No branches or pull requests
I need to use
__restrict__
C keyword inside an iterator, but when inside an iterator codegenDecl does not work, test case:This generates the following C code:
NI* data
should have beenNI* __restrict__ data
Any workarounds? I want to use restrict to make GCC optimize my iterator better.
The text was updated successfully, but these errors were encountered: