From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?iso-8859-1?Q?Jan_Dj=E4rv?= Newsgroups: gmane.emacs.devel Subject: Re: Build failure from trunk Date: Wed, 8 May 2013 18:01:57 +0200 Message-ID: <2F51B02E-645E-41A1-91A0-1198E9898D1F@swipnet.se> References: <518A655A.4080508@cs.ucla.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 6.3 \(1503\)) Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1368028930 30198 80.91.229.3 (8 May 2013 16:02:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 8 May 2013 16:02:10 +0000 (UTC) Cc: Matthew Leach , emacs-devel@gnu.org To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed May 08 18:02:08 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Ua6oi-0001PT-C5 for ged-emacs-devel@m.gmane.org; Wed, 08 May 2013 18:02:08 +0200 Original-Received: from localhost ([::1]:36514 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ua6oh-0003rN-Ao for ged-emacs-devel@m.gmane.org; Wed, 08 May 2013 12:02:07 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:53884) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ua6oa-0003kY-Mp for emacs-devel@gnu.org; Wed, 08 May 2013 12:02:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ua6oY-0008MV-R2 for emacs-devel@gnu.org; Wed, 08 May 2013 12:02:00 -0400 Original-Received: from mailout.melmac.se ([62.20.26.67]:43532) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ua6oY-0008KG-Gu for emacs-devel@gnu.org; Wed, 08 May 2013 12:01:58 -0400 Original-Received: from mail01.melmac.se (mail01.melmac.se [62.20.26.80]) by mailout.melmac.se (Postfix) with ESMTP id 004009698 for ; Wed, 8 May 2013 18:01:54 +0200 (CEST) Original-Received: (qmail 23234 invoked by uid 89); 8 May 2013 16:01:46 -0000 Original-Received: from unknown (HELO coolsville.localdomain) (boel.djarv@bdtv.se@176.10.223.235) by mail01.melmac.se with ESMTPA; 8 May 2013 16:01:46 -0000 Original-Received: from [172.20.199.13] (unknown [172.20.199.13]) by coolsville.localdomain (Postfix) with ESMTPSA id EDC801A0017; Wed, 8 May 2013 16:02:22 +0000 (UTC) In-Reply-To: <518A655A.4080508@cs.ucla.edu> X-Mailer: Apple Mail (2.1503) X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 62.20.26.67 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:159431 Archived-At: Hello. 8 maj 2013 kl. 16:46 skrev Paul Eggert : > On 05/07/2013 10:06 PM, Jan Dj=E4rv wrote: >> #if !defined USE_GTK || GTK_MAJOR_VERSION < 3 + (GTK_MINOR_VERSION < = 4) >>=20 >> This will be true for Gtk 4.0 to 4.3, 5.0 to 5.3, 6.0 to 6.3 and so = on, so it is obviously not correct. >=20 > Sorry, I don't see the bug. Perhaps you misread the "+" as "|"? > For 4.0, for example, GTK_MAJOR_VERSION is 4 and GTK_MINOR_VERSION is = 0, > so the comparison evaluates to 4 < 3 + (0 < 4), > which is false, which is what is wanted here. I mixed up the precedence of < and +. Anyway, this is more unclear that = the corresponding #if later in the code, i.e.: #if GTK_MAJOR_VERSION > 3 || (GTK_MAJOR_VERSION =3D=3D 3 && = GTK_MINOR_VERSION >=3D 4) At least they should be the same so someone reading the code can see = that they are related. We don't have that style when checking Gtk+ versions in other places, so = introducing it here just makes the code harder to read. Jan D.