Re: [parisc-linux] possible gcc-3.2 bug?

2002-10-15 Thread John David Anglin
> well, it's doesn't seem to be very consistent about it then... > > static rwlock_t x = (rwlock_t) { { 1 }, 0 }; > is ok > > static rwlock_t x = { (spinlock_t) { 1 }, 0 }; > is also ok > > only when you have both casts does it fail... Ok, I think I see what is going on. "(rwlock_t) { { 1 }, 0

Re: [parisc-linux] possible gcc-3.2 bug?

2002-10-15 Thread Randolph Chung
> > -8<--- > > /* compile with gcc -c foo.c */ > > > > typedef struct { > > volatile unsigned int lock; > > } spinlock_t; > > > > typedef struct { > > spinlock_t lock; > > volatile int counter; > > } rwlock_t; > > > > void foo(void)

Re: [parisc-linux] possible gcc-3.2 bug?

2002-10-15 Thread John David Anglin
> The following piece of code compiles with gcc-3.0 but not with > gcc-3.2... is this a gcc bug? or is the code broken? I would say the later. > [EMAIL PROTECTED]:~$ gcc-3.2 -c t.c > t.c: In function `foo': > t.c:12: initializer element is not constant > > (it's a simplified example of some code

possible gcc-3.2 bug?

2002-10-15 Thread Randolph Chung
The following piece of code compiles with gcc-3.0 but not with gcc-3.2... is this a gcc bug? or is the code broken? [EMAIL PROTECTED]:~$ gcc-3.2 -c t.c t.c: In function `foo': t.c:12: initializer element is not constant (it's a simplified example of some code from the parisc-linux kernel) --