[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070731160248.GK21089@ftp.linux.org.uk>
Date: Tue, 31 Jul 2007 17:02:48 +0100
From: Al Viro <viro@....linux.org.uk>
To: Alexey Dobriyan <adobriyan@...ru>
Cc: akpm@...l.org, torvalds@...l.org, linux-kernel@...r.kernel.org,
herbert@...dor.apana.org.au
Subject: Re: WARN_ON() which sometimes sucks
On Tue, Jul 31, 2007 at 07:55:27PM +0400, Alexey Dobriyan wrote:
> It started when I tried to write
>
> WARN_ON(m->seq_ops_allocated);
>
> in today's "[PATCH] single_open/seq_release leak diagnostics?.
> Suprisingly compiler told me piss off with:
>
> CC fs/seq_file.o
> fs/seq_file.c: In function 'seq_release':
> fs/seq_file.c:285: error: 'typeof' applied to a bit-field
>
> Well, duh! Earlier versions of WARN_ON allowed that until commit
> 684f978347deb42d180373ac4c427f82ef963171? which added typeof().
>
> OK, nobody noticed that WARN_ON(bitfield) stopped working. But I
> question the rationale of that commit:
Actually, the real problem is different - WTF do we need that typeof
anyway?
int ret_warn_on = !!(condition);
[same as now]
will work just fine...
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists