diff options
author | Roger Sayle <roger@eyesopen.com> | 2003-04-17 01:22:51 +0000 |
---|---|---|
committer | Roger Sayle <sayle@gcc.gnu.org> | 2003-04-17 01:22:51 +0000 |
commit | 96c6931df4d8809e4adf59a64977ac3889f6560b (patch) | |
tree | 44b4d881f76561d90d3775b429d23bd5cec3c3fa /gcc/config | |
parent | 3568b0ef3daa7aabadde5d9124a1a85668b0bc7e (diff) | |
download | gcc-96c6931df4d8809e4adf59a64977ac3889f6560b.zip gcc-96c6931df4d8809e4adf59a64977ac3889f6560b.tar.gz gcc-96c6931df4d8809e4adf59a64977ac3889f6560b.tar.bz2 |
re PR c/10175 (-Wunreachable-code doesn't work for single lines)
2003-04-16 Roger Sayle <roger@eyesopen.com>
* c-semantics.c (find_reachable_label): New function to find a
potentially reachable label in an expression.
(expand_unreachable_if_stmt): Similar to expand_if_stmt but
assumes the start of the IF_STMT is unreachable (dead) code.
(expand_unreachable_stmt): Similar to expand_stmt but assumes
the start of the statement list is unreachable (dead) code.
(genrtl_if_stmt): If the controlling expression of the IF
is constant, use expand_unreachable_stmt for the THEN or ELSE
clause as appropriate.
(genrtl_switch_stmt): Use expand_unreachable_stmt to expand
the body of a SWITCH statement.
(expand_stmt): The code immediately following a "return",
"break", "continue" or "goto" is unreachable.
* Makefile.in (c-semantics.o): Depend upon tree-inline.h.
* gcc.dg/Wunreachable-5.c: New test case for PR c/10175.
* gcc.c-torture/execute/medce-1.c: New test case.
* gcc.c-torture/execute/medce-2.c: New test case.
From-SVN: r65715
Diffstat (limited to 'gcc/config')
0 files changed, 0 insertions, 0 deletions