This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/25314] [3.4/4.0/4.1/4.2 Regression] Unreachable code at beginning of switch statement is not reported anymore



------- Comment #5 from pinskia at gcc dot gnu dot org  2005-12-12 03:01 -------
: Search converges between 2003-04-16-trunk (#231) and 2003-04-17-trunk (#232).

>From that I almost think it was orginally caused by (but I should note that the
4.0 regression would have been caused by the change over to tree-ssa):
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.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |roger at eyesopen dot com


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]