Re: Further news on Clang - spurious warnings

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Peter Geoghegan <peter(at)2ndquadrant(dot)com>
Cc: PG Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Further news on Clang - spurious warnings
Date: 2011-08-03 09:34:26
Message-ID: 4E391622.90802@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 03.08.2011 12:25, Peter Geoghegan wrote:
> Attached patch removes the tautologolical part of an evaluated
> expression, fixing the problem flagged by this quite valid warning.

The check is only tautological if the compiler implements enums as
unsigned integers. Whether enums are signed or not is
implementation-dependent. Perhaps cast status to unsigned or signed
explicitly before the checks?

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2011-08-03 10:05:52 Re: Further news on Clang - spurious warnings
Previous Message Peter Geoghegan 2011-08-03 09:25:31 Re: Further news on Clang - spurious warnings