Re: [go-nuts] What does the content about unsafe.Poiner in the compiler section in Go 1.15 release notes?

2020-06-12 Thread T L
On Friday, June 12, 2020 at 1:33:32 PM UTC-4, Ian Lance Taylor wrote: > > On Fri, Jun 12, 2020 at 10:08 AM T L > > wrote: > > > > On Friday, June 12, 2020 at 1:02:30 PM UTC-4, Ian Lance Taylor wrote: > >> > >> On Fri, Jun 12, 2020 at 9:56 AM T L wrote: > >> > > >> > Is

Re: [go-nuts] What does the content about unsafe.Poiner in the compiler section in Go 1.15 release notes?

2020-06-12 Thread Ian Lance Taylor
On Fri, Jun 12, 2020 at 10:08 AM T L wrote: > > On Friday, June 12, 2020 at 1:02:30 PM UTC-4, Ian Lance Taylor wrote: >> >> On Fri, Jun 12, 2020 at 9:56 AM T L wrote: >> > >> > Is "uintptr(uintptr(ptr))" a typo? Or are there any other multiple chained >> > conversions examples? >> >> That is

Re: [go-nuts] What does the content about unsafe.Poiner in the compiler section in Go 1.15 release notes?

2020-06-12 Thread T L
On Friday, June 12, 2020 at 1:02:30 PM UTC-4, Ian Lance Taylor wrote: > > On Fri, Jun 12, 2020 at 9:56 AM T L > > wrote: > > > > Is "uintptr(uintptr(ptr))" a typo? Or are there any other multiple > chained conversions examples? > > That is not a typo. That is the case that worked in 1.14

Re: [go-nuts] What does the content about unsafe.Poiner in the compiler section in Go 1.15 release notes?

2020-06-12 Thread Ian Lance Taylor
On Fri, Jun 12, 2020 at 9:56 AM T L wrote: > > Is "uintptr(uintptr(ptr))" a typo? Or are there any other multiple chained > conversions examples? That is not a typo. That is the case that worked in 1.14 and does not work in 1.15. Ian > On Friday, June 12, 2020 at 12:47:03 PM UTC-4, Axel

Re: [go-nuts] What does the content about unsafe.Poiner in the compiler section in Go 1.15 release notes?

2020-06-12 Thread T L
Is "uintptr(uintptr(ptr))" a typo? Or are there any other multiple chained conversions examples? On Friday, June 12, 2020 at 12:47:03 PM UTC-4, Axel Wagner wrote: > > AIUI: The safety rules haven't changed. How the compiler interprets them > has. Previously, it interpreted them so as to allow

Re: [go-nuts] What does the content about unsafe.Poiner in the compiler section in Go 1.15 release notes?

2020-06-12 Thread Ian Lance Taylor
On Fri, Jun 12, 2020 at 9:46 AM 'Axel Wagner' via golang-nuts wrote: > > AIUI: The safety rules haven't changed. How the compiler interprets them has. > Previously, it interpreted them so as to allow multiple chained conversions. > Now it doesn't. Yes. Ian > On Fri, Jun 12, 2020 at 2:28 PM

Re: [go-nuts] What does the content about unsafe.Poiner in the compiler section in Go 1.15 release notes?

2020-06-12 Thread 'Axel Wagner' via golang-nuts
AIUI: The safety rules haven't changed. How the compiler interprets them has. Previously, it interpreted them so as to allow multiple chained conversions. Now it doesn't. On Fri, Jun 12, 2020 at 2:28 PM T L wrote: > > Package unsafe's safety rules >

[go-nuts] What does the content about unsafe.Poiner in the compiler section in Go 1.15 release notes?

2020-06-12 Thread T L
Package unsafe's safety rules allow converting an unsafe.Pointer into uintptr when calling certain functions. Previously, in some cases, the compiler allowed multiple chained conversions (for example, syscall.Syscall(…, uintptr(uintptr(ptr)), …)).