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

From Greg Stark
Subject Re: Further news on Clang - spurious warnings
Date
Msg-id CAM-w4HOA-_vkj4LaChHTttwE5VXmTxx-3_wVrjYeJwrK3OpS9g@mail.gmail.com
Whole thread Raw
In response to Re: Further news on Clang - spurious warnings  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
<p>I realize it's a bit late to jump in here with the path already having been committed. But I think there's a point
thatwas missed in the discussion. One reason to do the test as Tom recommended is that the warning probably indicates
thatthe test as written was just going to be optimized away as dead code. I think the cast to unsigned is the least
likelyidiom to be optimized away whereas any of the formulations based on comparing the enum with enum labels is quite
likelyto be. 

pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: index-only scans
Next
From: Tom Lane
Date:
Subject: VACUUM FULL versus TOAST