unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Jan Djärv" <jan.h.d@swipnet.se>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: Matthew Leach <matthew@mattleach.net>, emacs-devel@gnu.org
Subject: Re: Build failure from trunk
Date: Wed, 8 May 2013 18:01:57 +0200	[thread overview]
Message-ID: <2F51B02E-645E-41A1-91A0-1198E9898D1F@swipnet.se> (raw)
In-Reply-To: <518A655A.4080508@cs.ucla.edu>

Hello.

8 maj 2013 kl. 16:46 skrev Paul Eggert <eggert@cs.ucla.edu>:

> On 05/07/2013 10:06 PM, Jan Djärv wrote:
>> #if !defined USE_GTK || GTK_MAJOR_VERSION < 3 + (GTK_MINOR_VERSION < 4)
>> 
>> 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.
> 
> 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 == 3 && GTK_MINOR_VERSION >= 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.




  reply	other threads:[~2013-05-08 16:01 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-07  8:43 Build failure from trunk Matthew Leach
2013-05-07 17:48 ` Jan Djärv
2013-05-07 19:29   ` Paul Eggert
2013-05-08  5:06   ` Jan Djärv
2013-05-08 14:46     ` Paul Eggert
2013-05-08 16:01       ` Jan Djärv [this message]
2013-05-08 23:00         ` Paul Eggert
2013-05-09  8:10           ` Jan Djärv
2013-05-09 14:51             ` Paul Eggert
2013-05-09 15:19               ` Jan Djärv

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2F51B02E-645E-41A1-91A0-1198E9898D1F@swipnet.se \
    --to=jan.h.d@swipnet.se \
    --cc=eggert@cs.ucla.edu \
    --cc=emacs-devel@gnu.org \
    --cc=matthew@mattleach.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).