[Bug c/44842] New: gcc should not issue warnings for code that will never be executed

2010-07-06 Thread vincent at vinc17 dot org
GCC issues warnings like division by zero or right shift count = width of type even though the corresponding code will never be executed (under a condition that is always false); it shouldn't do this, at least by default. For instance: int tst (void) { int x; x = 0 ? 1 / 0 : 0; return x;

Re: [Bug c/44842] New: gcc should not issue warnings for code that will never be executed

2010-07-06 Thread Andrew Pinski
This is a dup of a much older bug which I cannot find right now. On Jul 6, 2010, at 8:10 AM, vincent at vinc17 dot org gcc-bugzi...@gcc.gnu.org wrote: GCC issues warnings like division by zero or right shift count = width of type even though the corresponding code will never be executed