<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.