All of lore.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@ftp.linux.org.uk>
To: Alexey Dobriyan <adobriyan@sw.ru>
Cc: akpm@osdl.org, torvalds@osdl.org, linux-kernel@vger.kernel.org,
	herbert@gondor.apana.org.au
Subject: Re: WARN_ON() which sometimes sucks
Date: Tue, 31 Jul 2007 17:02:48 +0100	[thread overview]
Message-ID: <20070731160248.GK21089@ftp.linux.org.uk> (raw)
In-Reply-To: <20070731155527.GB7253@localhost.sw.ru>

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...

  reply	other threads:[~2007-07-31 16:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-31 15:55 WARN_ON() which sometimes sucks Alexey Dobriyan
2007-07-31 16:02 ` Al Viro [this message]
2007-08-01  3:53   ` Paul Mackerras
2007-08-01  4:05     ` Linus Torvalds
2007-08-01  4:20       ` Paul Mackerras
2007-08-01 15:17         ` Joe Korty

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070731160248.GK21089@ftp.linux.org.uk \
    --to=viro@ftp.linux.org.uk \
    --cc=adobriyan@sw.ru \
    --cc=akpm@osdl.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.