This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: 2.1.127pre2
- To: "David S. Miller" <davem at dm dot cobaltmicro dot com>
- Subject: Re: 2.1.127pre2
- From: Linus Torvalds <torvalds at transmeta dot com>
- Date: Tue, 27 Oct 1998 10:07:41 -0800 (PST)
- cc: by-tor at by-tor dot tacorp dot net, linux-kernel at vger dot rutgers dot edu, egcs at cygnus dot com
On Mon, 26 Oct 1998, David S. Miller wrote:
>
> Linus, can we have a "rwlock_init()" just like we do for spinlocks so
> functions can initialize rwlock's in this manner without the compile
> bombing on non-SMP because it will in turn from:
>
> tmp->foo_rwlock = RWLOCK_INIT;
>
> end up seeing:
>
> tmp->foo_rwlock = { };
>
> which last time I checked is not legal C :-)
No, we should do it as
tmp->foo_rwlock = (rw_lock_t) RWLOCK_INIT;
which is legal gcc.
Linus