Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Jun 2009 13:20:44 +0300
From:      Andriy Gapon <avg@freebsd.org>
To:        Marcel Moolenaar <xcllnt@mac.com>
Cc:        Roman Divacky <rdivacky@freebsd.org>, Sam Leffler <sam@freebsd.org>, current@freebsd.org
Subject:   Re: [RFC]: (void)0 instead of empty defines
Message-ID:  <4A3771FC.7030301@freebsd.org>
In-Reply-To: <53E03A0A-8846-4EED-AE95-A15960FC6724@mac.com>
References:  <20090615181555.GA52009@freebsd.org> <4A369529.5090004@freebsd.org>	<20090615185812.GA67104@freebsd.org> <53E03A0A-8846-4EED-AE95-A15960FC6724@mac.com>

next in thread | previous in thread | raw e-mail | index | archive | help
on 15/06/2009 22:38 Marcel Moolenaar said the following:
> If the patch is all we need to compile the kernel with the warning
> enabled and knowing that the warning has already found real bugs,
> then it's a no-brainer to me: commit.

I agree - if FOO is a function-like or complete-statement-like macro than it is
more consistent to expand it to no-op statement than to nothing. (I am not sure if
 the same is true for other type of macros, e.g. expression-like ones).

BTW, I think that this is a very typical practice, many C projects that I worked
on used this convention. Our assert.h also does this.

-- 
Andriy Gapon



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4A3771FC.7030301>