From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jim Meyering Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Use "do...while (0)", not "if (1)..else" in macro definitions. Date: Mon, 04 Feb 2008 21:42:54 +0100 Message-ID: <87myqgbghd.fsf@rho.meyering.net> References: <877ihu84ub.fsf@rho.meyering.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1202157865 20919 80.91.229.12 (4 Feb 2008 20:44:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 4 Feb 2008 20:44:25 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 04 21:44:47 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JM8B9-0001wg-EY for ged-emacs-devel@m.gmane.org; Mon, 04 Feb 2008 21:44:35 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JM8Ah-0007qg-EL for ged-emacs-devel@m.gmane.org; Mon, 04 Feb 2008 15:44:07 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JM89c-0006Xu-Im for emacs-devel@gnu.org; Mon, 04 Feb 2008 15:43:00 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JM89a-0006Vr-Qg for emacs-devel@gnu.org; Mon, 04 Feb 2008 15:43:00 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JM89a-0006VT-IY for emacs-devel@gnu.org; Mon, 04 Feb 2008 15:42:58 -0500 Original-Received: from smtp3-g19.free.fr ([212.27.42.29]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JM89a-0007RA-97 for emacs-devel@gnu.org; Mon, 04 Feb 2008 15:42:58 -0500 Original-Received: from smtp3-g19.free.fr (localhost.localdomain [127.0.0.1]) by smtp3-g19.free.fr (Postfix) with ESMTP id AC43217B78A for ; Mon, 4 Feb 2008 21:42:56 +0100 (CET) Original-Received: from mx.meyering.net (mx.meyering.net [82.230.74.64]) by smtp3-g19.free.fr (Postfix) with ESMTP id 7A24317CA39 for ; Mon, 4 Feb 2008 21:42:55 +0100 (CET) Original-Received: from rho.meyering.net (localhost.localdomain [127.0.0.1]) by rho.meyering.net (Acme Bit-Twister) with ESMTP id 0F669386A1 for ; Mon, 4 Feb 2008 21:42:55 +0100 (CET) In-Reply-To: <877ihu84ub.fsf@rho.meyering.net> (Jim Meyering's message of "Mon, 28 Jan 2008 14:19:56 +0100") Original-Lines: 16 X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:88183 Archived-At: > 2008-01-28 Jim Meyering > > Use "do...while (0)", not "if (1)..else" in macro definitions. > The latter provokes a warning from gcc about the empty else, when > followed by ";". Also, without that trailing semicolon, it would > silently swallow up any following statement. > * syntax.h (SETUP_SYNTAX_TABLE): > (SETUP_SYNTAX_TABLE_FOR_OBJECT): Likewise. > * buffer.h (DECODE_POSITION): Likewise. > * charset.h (FETCH_STRING_CHAR_ADVANCE): Likewise. > (FETCH_STRING_CHAR_ADVANCE_NO_CHECK): Likewise. > (FETCH_CHAR_ADVANCE): Likewise. Ping? http://thread.gmane.org/gmane.emacs.devel/87706