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 that was missed in the discussion. One reason to do the test as Tom recommended is that the warning probably indicates that the test as written was just going to be optimized away as dead code. I think the cast to unsigned is the least likely idiom to be optimized away whereas any of the formulations based on comparing the enum with enum labels is quite likely to be.
- Re: [HACKERS] Further news on Cl... Peter Geoghegan
- Re: [HACKERS] Further news on Cl... Tom Lane
- Re: [HACKERS] Further news on Cl... Peter Geoghegan
- Re: [HACKERS] Further news on Cl... Peter Geoghegan
- Re: [HACKERS] Further news on Cl... Robert Haas
- Re: [HACKERS] Further news on Cl... Peter Geoghegan
- Re: [HACKERS] Further news on Cl... Peter Geoghegan
- Re: [HACKERS] Further news on Cl... Tom Lane
- Re: [HACKERS] Further news on Cl... Peter Geoghegan
- Re: [HACKERS] Further news on Cl... Tom Lane
- Re: [HACKERS] Further news on Cl... Greg Stark
- Re: [HACKERS] Further news on Clang - spurious wa... Peter Eisentraut
- Re: [HACKERS] Further news on Clang - spurious warning... David E. Wheeler
- Re: [HACKERS] Further news on Clang - spurious wa... Peter Eisentraut
- Re: [HACKERS] Further news on Clang - spuriou... David E. Wheeler
- Re: [HACKERS] Further news on Clang - spu... Grzegorz Jaskiewicz
- Re: [HACKERS] Further news on Clang -... David E. Wheeler
- Re: [HACKERS] Further news on Cl... Peter Eisentraut
- Re: [HACKERS] Further news on Cl... David E. Wheeler
- Re: [HACKERS] Further news on Cl... Peter Geoghegan