From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: warning compiling dbusbind.c Date: Thu, 24 Jan 2008 21:19:29 -0500 Message-ID: References: <5btzl3f2xh.fsf@fencepost.gnu.org> <87prvr7zvt.fsf@gmx.de> <18329.7503.159519.468559@kahikatea.snap.net.nz> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1201227599 15285 80.91.229.12 (25 Jan 2008 02:19:59 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 25 Jan 2008 02:19:59 +0000 (UTC) Cc: Glenn Morris , Michael Albinus , emacs-devel@gnu.org To: Nick Roberts Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jan 25 03:20:18 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 1JIEAy-000419-An for ged-emacs-devel@m.gmane.org; Fri, 25 Jan 2008 03:20:16 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JIEAY-0000Ub-4s for ged-emacs-devel@m.gmane.org; Thu, 24 Jan 2008 21:19:50 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JIEAS-0000U9-NZ for emacs-devel@gnu.org; Thu, 24 Jan 2008 21:19:44 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JIEAM-0000MT-KZ for emacs-devel@gnu.org; Thu, 24 Jan 2008 21:19:44 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JIEAM-0000MP-FX for emacs-devel@gnu.org; Thu, 24 Jan 2008 21:19:38 -0500 Original-Received: from ironport2-out.pppoe.ca ([206.248.154.182]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JIEAI-0000xL-Jq; Thu, 24 Jan 2008 21:19:34 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ao8CAFrWmEfO+J8vdGdsb2JhbACQJAEwnlN/ X-IronPort-AV: E=Sophos;i="4.25,247,1199682000"; d="scan'208";a="13193774" Original-Received: from smtp.pppoe.ca ([65.39.196.238]) by ironport2-out.pppoe.ca with ESMTP; 24 Jan 2008 21:19:29 -0500 Original-Received: from pastel.home ([206.248.159.47]) by smtp.pppoe.ca (Internet Mail Server v1.0) with ESMTP id FDS80429; Thu, 24 Jan 2008 21:19:29 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 6A01B858A; Thu, 24 Jan 2008 21:19:29 -0500 (EST) In-Reply-To: <18329.7503.159519.468559@kahikatea.snap.net.nz> (Nick Roberts's message of "Fri, 25 Jan 2008 12:20:47 +1300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. 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:87463 Archived-At: >> > Yuck. I must prefer living with the warning (which is just that: >> > a warning. We already have several similar ones). >> >> I menioned this because it is the only warning of any kind I get when >> compiling the Emacs C code. > Indeed, in GDB all files are compiled with the -Werror option, presumably > because GCC folks are more knowledgeable about what is undesirable than the > average developer. But uglifying the code and making it less maintainable just to get rid of a minor warning is not good software engineering practices. I'd much rather introduce a dummy macro like #define DEFEAT_WARNING(x) ((EMACS_INT)(x)) or even #define DEFEAT_WARNING(x) ((((EMACS_INT)(x))+1)-1) then introduce the "#if BITS_PER_EMACS_INT >= 32" that dispatches to two different macros, where the reason why it's correct is not nearly as obvious. Stefan