------- Comment #18 from manu at gcc dot gnu dot org 2008-08-22 17:04 ------- (In reply to comment #1) > This happens because the warning happens very early in the compiler so it does > not know that the case5 is not going to be used. I think the warning is > correct and not really bogus if you take that into account.
I think that if the compiler knows that the code is never executed then, we shouldn't warn. Anyway, this could be seen as a request enhancement. BTW, the offending code is removed within the first vrp pass, so perhaps we are not properly detecting that the BB is unreachable. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36902