[cfe-dev] -fsanitize=enum false positive with ˜ios::failbit ?
arcata at gmail.com
Thu Feb 28 12:33:56 PST 2013
On Thu, Feb 28, 2013 at 11:36 AM, Sean McBride <sean at rogue-research.com>wrote:
> The C++03 standard does "~ios::failbit" in 184.108.40.206/22, which suggests
> it's valid and clang is wrong.
> Is this a false positive?
I don't think so. Enum values are only defined for the number of bits
needed to represent the type's member values, so if 'x' is a defined
iostate value, then 'x & ~ios::failbit' results in a valid iostate value,
but ~ios::failbit is not itself a valid iostate value.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-dev