From owner-freebsd-hackers@FreeBSD.ORG Mon Jan 31 08:10:18 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1A039106564A for ; Mon, 31 Jan 2011 08:10:18 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from vlakno.cz (lev.vlakno.cz [77.93.215.190]) by mx1.freebsd.org (Postfix) with ESMTP id CE1408FC0A for ; Mon, 31 Jan 2011 08:10:17 +0000 (UTC) Received: from lev.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id AF68D9CB0C3; Mon, 31 Jan 2011 08:54:40 +0100 (CET) X-Virus-Scanned: amavisd-new at vlakno.cz Received: from vlakno.cz ([127.0.0.1]) by lev.vlakno.cz (lev.vlakno.cz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qTMD0LBHvhg3; Mon, 31 Jan 2011 08:54:40 +0100 (CET) Received: from vlk.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 1F7F69CB87D; Mon, 31 Jan 2011 08:54:40 +0100 (CET) Received: (from rdivacky@localhost) by vlk.vlakno.cz (8.14.4/8.14.4/Submit) id p0V7seo2049807; Mon, 31 Jan 2011 08:54:40 +0100 (CET) (envelope-from rdivacky) Date: Mon, 31 Jan 2011 08:54:39 +0100 From: Roman Divacky To: Alexander Best Message-ID: <20110131075439.GA49765@freebsd.org> References: <20110130172941.GA10701@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110130172941.GA10701@freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: freebsd-hackers@freebsd.org Subject: Re: empty function macros X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jan 2011 08:10:18 -0000 no problem with this with clang :) On Sun, Jan 30, 2011 at 05:29:41PM +0000, Alexander Best wrote: > hi there, > > i noticed freebsd has a few of the following macros: > > #define FUNC(sb) > > when you do something like > > if (cond) > FUNC(i) > > the compiler complains about an if statement with an empty body. any sensible > way of dealing with this issue? > > i saw some reiserfs code which does the following to silence compilers: > > #define FUNC(sb) do { } while (0) > > cheers. > alex > > -- > a13x > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"