[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Build failure from trunk
From: |
Jan Djärv |
Subject: |
Re: Build failure from trunk |
Date: |
Wed, 8 May 2013 18:01:57 +0200 |
Hello.
8 maj 2013 kl. 16:46 skrev Paul Eggert <address@hidden>:
> 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.
- Build failure from trunk, Matthew Leach, 2013/05/07
- Re: Build failure from trunk, Jan Djärv, 2013/05/07
- Re: Build failure from trunk, Paul Eggert, 2013/05/07
- Re: Build failure from trunk, Jan Djärv, 2013/05/08
- Re: Build failure from trunk, Paul Eggert, 2013/05/08
- Re: Build failure from trunk,
Jan Djärv <=
- Re: Build failure from trunk, Paul Eggert, 2013/05/08
- Re: Build failure from trunk, Jan Djärv, 2013/05/09
- Re: Build failure from trunk, Paul Eggert, 2013/05/09
- Re: Build failure from trunk, Jan Djärv, 2013/05/09