[Bug middle-end/35188] Missing a warning: inherently false expressions

2008-02-16 Thread manu at gcc dot gnu dot org
--- Comment #8 from manu at gcc dot gnu dot org 2008-02-16 18:16 --- Closing. Thanks for the report anyway. -- manu at gcc dot gnu dot org changed: What|Removed |Added

[Bug middle-end/35188] Missing a warning: inherently false expressions

2008-02-16 Thread tuttle at sandbox dot cz
--- Comment #7 from tuttle at sandbox dot cz 2008-02-16 18:09 --- That's great, even my older gcc 4.1.3 warns for every if-body with -O1 -Wunreachable code. Shame on me I did not came with -O1 myself, sorry. Anyway my first code line int var1 = (1 && 0); is not about the execution rea

[Bug middle-end/35188] Missing a warning: inherently false expressions

2008-02-16 Thread manu at gcc dot gnu dot org
--- Comment #6 from manu at gcc dot gnu dot org 2008-02-16 17:50 --- > Please do not expect a compilable testcase from me. 1) I don't know whether > this is a bug, 2) have no experience in gcc testcases. The above is a testcase. See http://gcc.gnu.org/bugs.html#report on how to make a g

[Bug middle-end/35188] Missing a warning: inherently false expressions

2008-02-16 Thread tuttle at sandbox dot cz
--- Comment #5 from tuttle at sandbox dot cz 2008-02-16 14:12 --- I think we could generalize a bit: This in fact is not bound to if-statement or code reachability. Tried the following with snapshot gcc-4.3-20080215 -Wextra -Wall -Wunreachable-code. #include int main() { int var1 =