NoQ added a comment.
Random thoughts:
- This checker doesn't alter the exploded graph, so it cannot be causing or
suppressing positives in other checkers.
- We should not be adding platform-specific behavior (eg. working as if
`sizeof(int) == 1`) without actually ensuring that it is so on
danielmarjamaki abandoned this revision.
danielmarjamaki added a comment.
hmm.. I don't actually care much about this specific check at the moment.
I saw other false positives (unreachable code) and thought that this check made
the analyzer think there was corrupted memory.
Now I can't
danielmarjamaki added a comment.
If the -fno-strict-aliasing would fix this warning then it would be OK.
If you are telling me that this CastToStruct check is about alignment or
endianness then I think the message is highly misleading. We should rewrite the
message.
In general, using char
NoQ added a subscriber: cfe-commits.
NoQ added a comment.
Adding cfe-commits as per developer policy.
Yeah, it doesn't probably cause the same kind of memory corruption, however i
wouldn't call this code safe: it still violates the //strict aliasing rule//,
unless the array is of `char`s. I