You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When passing both a pointer to a struct and a member of this struct, the member is passed by reference (it seems), so changing the struct will change the second argument.
Tested with zig-linux-x86_64-0.9.0-dev.946+6237dc0a.
The text was updated successfully, but these errors were encountered:
This has the same root cause as #3696 and #4021 which is that the compiler doesn't recognize that there will be aliasing issues and passes the argument via a hidden pointer. The workaround is to copy the parameter to stack first but the underlying issue has not yet been solved.
Came across this behavior, looks like a bug to me:
will print:
When passing both a pointer to a struct and a member of this struct, the member is passed by reference (it seems), so changing the struct will change the second argument.
Tested with zig-linux-x86_64-0.9.0-dev.946+6237dc0a.
The text was updated successfully, but these errors were encountered: