https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103483
Jeffrey A. Law <law at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |law at gcc dot gnu.org --- Comment #19 from Jeffrey A. Law <law at gcc dot gnu.org> --- Just threading doesn't create nonsensical blocks out of thin air. It may expose nonsensical code that already existed though. That's inherent in the path isolating nature of the transformation. But that's not what's going on in the example you posted. What's going on there is we have a memcpy where we know the source has only 3 bytes of storage, but we *may* pass in a length of 4 for the memcpy as "mystrlen" is opaque.. That is precisely the kind of scenario where these warnings are supposed to trigger. I would strongly disagree with the recommendation not to warn because of information deduced from conditionals on the path. That would cripple the warnings in precisely the case where they're the most valuable IMHO.