------- Comment #3 from pinskia at gcc dot gnu dot org  2009-06-11 09:16 -------
This is why -Wunreachable-code is not useful really.  There is nothing that GCC
can do really in this case.  The reason why the non constant form does not warn
is because the __builtin_constant_p is folded into 0 early so there is no dead
code.  With the __builtin_constant_p folding to 1, the __s1_len/__s2_len is not
constant propagated until later which causes GCC to remove an unreachable basic
block.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
          Component|c                           |middle-end
         Resolution|                            |INVALID


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40412

Reply via email to