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

Cannot take the address of complex expression #715

Closed
kamphaus opened this issue May 7, 2018 · 0 comments
Closed

Cannot take the address of complex expression #715

kamphaus opened this issue May 7, 2018 · 0 comments

Comments

@kamphaus
Copy link
Contributor

kamphaus commented May 7, 2018

pcre_uchar s[] = "abcd";
pcre_uchar *a = &s[1];
pcre_uchar *b = &s[0];
is_eq(a + 2 - 1 - b, 2);

gives the go build errors:

cannot take the address of (*(*[1000000000]pcre_uchar)(unsafe.Pointer(uintptr(unsafe.Pointer(&(*(*[1000000000]pcre_uchar)(unsafe.Pointer(uintptr(unsafe.Pointer(&a[0])) + uintptr(int32(2)) * unsafe.Sizeof(a[0]))))[:][0])) - uintptr(int32(1)) * unsafe.Sizeof((*(*[1000000000]pcre_uchar)(unsafe.Pointer(uintptr(unsafe.Pointer(&a[0])) + uintptr(int32(2)) * unsafe.Sizeof(a[0]))))[:][0]))))[:]
cannot take the address of (*(*[1000000000]pcre_uchar)(unsafe.Pointer(uintptr(unsafe.Pointer(&(*(*[1000000000]pcre_uchar)(unsafe.Pointer(uintptr(unsafe.Pointer(&a[0])) + uintptr(int32(2)) * unsafe.Sizeof(a[0]))))[:][0])) - uintptr(int32(1)) * unsafe.Sizeof((*(*[1000000000]pcre_uchar)(unsafe.Pointer(uintptr(unsafe.Pointer(&a[0])) + uintptr(int32(2)) * unsafe.Sizeof(a[0]))))[:][0]))))[:]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant