[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090319190730.GC28946@ZenIV.linux.org.uk>
Date: Thu, 19 Mar 2009 19:07:31 +0000
From: Al Viro <viro@...IV.linux.org.uk>
To: Vegard Nossum <vegard.nossum@...il.com>
Cc: Christopher Li <sparse@...isli.org>, linux-sparse@...r.kernel.org,
Hannes Eder <hannes@...neseder.net>,
linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...e.hu>
Subject: Nasal demons in preprocessor use (Re: [PATCH] test-suite: new
preprocessor test case)
On Thu, Mar 19, 2009 at 07:51:22PM +0100, Hannes Eder wrote:
> When currently running sparse agains the current linux-next tree, a
> lot of checks produce error messages like this:
>
> include/linux/skbuff.h:381:9: error: expected preprocessor identifier
Cute. If anything, this kmemcheck_define_bitfield stuff needs to be moved
inside the ifdefs.
Folks, this is not a valid C, period. And no, there's no promise that
gcc won't change its behaviour on such constructs whenever they feel
like that.
Preprocessor directives do not belong in argument lists. Not #ifdef,
not #define, not #include; this is undefined behaviour.
--
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