Re: [go-nuts] undefined and implementation defined behavior in Go

2019-02-19 Thread Dan Kortschak
Saying something other than "something else" requires that the all of the other possible things that are not currently listed there must be listed. The possible outcomes listed are reasonably likely, but other non-"make demons fly out of your nose" type outcomes are also possible, like "program han

Re: [go-nuts] undefined and implementation defined behavior in Go

2019-02-19 Thread Ian Lance Taylor
On Tue, Feb 19, 2019 at 1:56 PM Manlio Perillo wrote: > > The Go specification do use both implementation-dependent and > implementation-defined, and I assumed it was a typo. > But what is the difference between implementation-dependent and > implementation-defined? I don't think they are used

Re: [go-nuts] undefined and implementation defined behavior in Go

2019-02-19 Thread Manlio Perillo
On Tuesday, February 19, 2019 at 9:36:10 PM UTC+1, Ian Lance Taylor wrote: > > On Tue, Feb 19, 2019 at 11:06 AM Manlio Perillo > > wrote: > > [...] > From http://www.open-std.org/jtc1/sc22/WG14/www/docs/n1256.pdf > > (hoping it is legal to copy and paste the text): > > > > undefined behavior

Re: [go-nuts] undefined and implementation defined behavior in Go

2019-02-19 Thread Ian Lance Taylor
On Tue, Feb 19, 2019 at 11:06 AM Manlio Perillo wrote: > > On Tuesday, February 19, 2019 at 7:26:22 PM UTC+1, Ian Lance Taylor wrote: >> >> On Tue, Feb 19, 2019 at 9:34 AM Manlio Perillo wrote: >> > >> > The Go language specification never mentions undefined behavior, however >> > Ian Lance Taylo

Re: [go-nuts] undefined and implementation defined behavior in Go

2019-02-19 Thread Manlio Perillo
On Tuesday, February 19, 2019 at 7:26:22 PM UTC+1, Ian Lance Taylor wrote: > > On Tue, Feb 19, 2019 at 9:34 AM Manlio Perillo > wrote: > > > > The Go language specification never mentions undefined behavior, however > > Ian Lance Taylor wrote, in [1], that: > > > > - if your program has a ra

Re: [go-nuts] undefined and implementation defined behavior in Go

2019-02-19 Thread Manlio Perillo
On Tuesday, February 19, 2019 at 7:26:22 PM UTC+1, Ian Lance Taylor wrote: > > On Tue, Feb 19, 2019 at 9:34 AM Manlio Perillo > wrote: > > > > The Go language specification never mentions undefined behavior, however > > Ian Lance Taylor wrote, in [1], that: > > > > - if your program has a ra

Re: [go-nuts] undefined and implementation defined behavior in Go

2019-02-19 Thread Manlio Perillo
On Tuesday, February 19, 2019 at 7:04:22 PM UTC+1, Harald Weidner wrote: > > Hello, > > > I was trying to get a list of undefined and implementation defined > > behaviors of the Go language from the specification, but it was not > easy. > > I tried to search for "undefined behavior" and "implem

Re: [go-nuts] undefined and implementation defined behavior in Go

2019-02-19 Thread Ian Lance Taylor
On Tue, Feb 19, 2019 at 10:04 AM Harald Weidner wrote: > > I would also consider the order in which init() functions of the same > package are executed undefined. The spec says they are executed "in the > order they appear in the source, possibly in multiple files, as presented > to the compiler".

Re: [go-nuts] undefined and implementation defined behavior in Go

2019-02-19 Thread Ian Lance Taylor
On Tue, Feb 19, 2019 at 9:34 AM Manlio Perillo wrote: > > The Go language specification never mentions undefined behavior, however > Ian Lance Taylor wrote, in [1], that: > > - if your program has a race condition, the behavior is undefined. > > [1] https://groups.google.com/forum/#!topic/golang-

Re: [go-nuts] undefined and implementation defined behavior in Go

2019-02-19 Thread Harald Weidner
Hello, > I was trying to get a list of undefined and implementation defined > behaviors of the Go language from the specification, but it was not easy. > I tried to search for "undefined behavior" and "implementation defined > behavior" without success. [...] > Is this list complete? The langua

[go-nuts] undefined and implementation defined behavior in Go

2019-02-19 Thread Manlio Perillo
Hi. I was trying to get a list of undefined and implementation defined behaviors of the Go language from the specification, but it was not easy. I tried to search for "undefined behavior" and "implementation defined behavior" without success. The ISO C standard use these terms, but the Go speci