Re: [9fans] Don't Plan 9 C compiler initialize the rest of member of a?struct?

2019-04-01 Thread Skip Tavakkolian
what I have in /sys/src/cmd/cc here is identical to what's on 9p.io. On Mon, Apr 1, 2019 at 7:23 PM Kurt H Maier wrote: > On Mon, Apr 01, 2019 at 09:20:43PM -0400, Dan Cross wrote: > > On Mon, Apr 1, 2019 at 8:36 PM Kurt H Maier wrote: > > > > > On Mon, Apr 01, 2019 at 08:26:30PM -0400, Jeremy

Re: [9fans] Don't Plan 9 C compiler initialize the rest of member of a?struct?

2019-04-01 Thread Kurt H Maier
On Mon, Apr 01, 2019 at 09:20:43PM -0400, Dan Cross wrote: > On Mon, Apr 1, 2019 at 8:36 PM Kurt H Maier wrote: > > > On Mon, Apr 01, 2019 at 08:26:30PM -0400, Jeremy O'Brien wrote: > > > On Mon, Apr 1, 2019, at 11:33, Kyohei Kadota wrote: > > > > Hi, 9fans. I use 9legacy. > > > > > > > > About

[9fans] Git/fs: Possibly Usable

2019-04-01 Thread ori
It was mentioned on this list a short while ago. Now, it's more or less at the point where it works for me. Expect many bugs and problems, and many more missing tools, but "the rest is just scripting". One caveat I have: Git's index file format is a bit boneheaded, so I'm ignoring it. The index

Re: [9fans] Don't Plan 9 C compiler initialize the rest of member of a struct?

2019-04-01 Thread Jeremy O'Brien
On Mon, Apr 1, 2019, at 11:33, Kyohei Kadota wrote: > Hi, 9fans. I use 9legacy. > > About below program, I expected that flags field will initialize to > zero but the value of flags was a garbage, ex, "f8f7". > Is this expected? > > ``` > #include > > struct option { > int n; > char

Re: [9fans] Don't Plan 9 C compiler initialize the rest of member of a struct?

2019-04-01 Thread Charles Forsyth
Yes, that's normal C behaviour. Only external and static storage is guaranteed to be zero. In a modern environment it seems a little mean, especially since you gave opt a partial initial value, but there are no half-measures in C. On Tue, 2 Apr 2019 at 01:27, Jeremy O'Brien wrote: > On Mon, Apr

Re: [9fans] Don't Plan 9 C compiler initialize the rest of member of a?struct?

2019-04-01 Thread Kurt H Maier
On Mon, Apr 01, 2019 at 08:26:30PM -0400, Jeremy O'Brien wrote: > On Mon, Apr 1, 2019, at 11:33, Kyohei Kadota wrote: > > Hi, 9fans. I use 9legacy. > > > > About below program, I expected that flags field will initialize to > > zero but the value of flags was a garbage, ex, "f8f7". > > Is this

Re: [9fans] Don't Plan 9 C compiler initialize the rest of member of a?struct?

2019-04-01 Thread Dan Cross
On Mon, Apr 1, 2019 at 8:36 PM Kurt H Maier wrote: > On Mon, Apr 01, 2019 at 08:26:30PM -0400, Jeremy O'Brien wrote: > > On Mon, Apr 1, 2019, at 11:33, Kyohei Kadota wrote: > > > Hi, 9fans. I use 9legacy. > > > > > > About below program, I expected that flags field will initialize to > > > zero

[9fans] Don't Plan 9 C compiler initialize the rest of member of a struct?

2019-04-01 Thread Kyohei Kadota
Hi, 9fans. I use 9legacy. About below program, I expected that flags field will initialize to zero but the value of flags was a garbage, ex, "f8f7". Is this expected? ``` #include struct option { int n; char *s; int flags; }; int main(void) { struct option opt = {1, "test"};

Re: [9fans] Are there disadvantages to walk?

2019-04-01 Thread hiro
perhaps you mean that if you bind a lot you have to walk a lot :)

[9fans] Are there disadvantages to walk?

2019-04-01 Thread Ethan Gardener
I remember hearing of some disadvantage to walking directories, but can't remember what it was. Could someone remind me, please? Perhaps there was more than one, of course. Perhaps a performance trick couldn't be employed?

Re: [9fans] Are there disadvantages to walk?

2019-04-01 Thread Ethan Gardener
On Mon, Apr 1, 2019, at 5:27 PM, hiro wrote: > perhaps you mean that if you bind a lot you have to walk a lot :) If that's the only issue, I'll be happy. :)

Re: [9fans] Are there disadvantages to walk?

2019-04-01 Thread Brian L. Stuart
On Mon, 4/1/19, Ethan Gardener wrote: > I remember hearing of some disadvantage to > walking directories, but can't remember what it was.  > Could someone remind me, please?  Perhaps there was > more than one, of course.  Perhaps a performance trick > couldn't be employed? The only complaint

Re: [9fans] Don't Plan 9 C compiler initialize the rest of member of a struct?

2019-04-01 Thread Skip Tavakkolian
It should initialize to zero. 8c and 5c both do the right thing here. Which distribution and cputype? On Mon, Apr 1, 2019, 8:34 AM Kyohei Kadota wrote: > Hi, 9fans. I use 9legacy. > > About below program, I expected that flags field will initialize to > zero but the value of flags was a