Skip to content

Add support for unsafe.Add() for arrays and slices #1130

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

Open
nevkontakte opened this issue Jul 21, 2022 · 0 comments
Open

Add support for unsafe.Add() for arrays and slices #1130

nevkontakte opened this issue Jul 21, 2022 · 0 comments

Comments

@nevkontakte
Copy link
Member

unsafe.Add() as added in Go 1.17.

Even though we can't support general-case pointer arithmetic, it should be possible to support unsafe.Add() for slices and arrays specifically. This should improve portability with the code like https://github.com/gopherjs/gopherjs/blob/master/compiler/natives/src/crypto/internal/subtle/aliasing.go (or so I think).

@nevkontakte nevkontakte added this to the Go spec compliance milestone Jul 21, 2022
nevkontakte added a commit to nevkontakte/gopherjs that referenced this issue Jul 26, 2022
Although we could support this function, we currently do not and the
`unsafe` package generally has limited support status.

Filed gopherjs#1130 to track this.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant