Re: Further news on Clang - spurious warnings - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Further news on Clang - spurious warnings
Date
Msg-id 4E391622.90802@enterprisedb.com
Whole thread Raw
In response to Re: Further news on Clang - spurious warnings  (Peter Geoghegan <peter@2ndquadrant.com>)
Responses Re: Further news on Clang - spurious warnings
List 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


pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: Further news on Clang - spurious warnings
Next
From: Peter Geoghegan
Date:
Subject: Re: Further news on Clang - spurious warnings