diff options
author | Alexander Kabaev <kan@FreeBSD.org> | 2005-06-03 03:28:44 +0000 |
---|---|---|
committer | Alexander Kabaev <kan@FreeBSD.org> | 2005-06-03 03:28:44 +0000 |
commit | d51085f37e16c95804f0fdabb7b1226e4b4e7de9 (patch) | |
tree | f0dc8ad34f9fcaf27052e24e893a4284b5fee6e9 /contrib/gcc/c-semantics.c | |
parent | 1689e31de64dad8b8826dc924a82c7ba59a54bf4 (diff) |
Gcc 3.4.4 release.
Notes
Notes:
svn path=/vendor/gcc/dist/; revision=146895
Diffstat (limited to 'contrib/gcc/c-semantics.c')
-rw-r--r-- | contrib/gcc/c-semantics.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/contrib/gcc/c-semantics.c b/contrib/gcc/c-semantics.c index 38c4021d6cf1..692adfcde26b 100644 --- a/contrib/gcc/c-semantics.c +++ b/contrib/gcc/c-semantics.c @@ -937,6 +937,9 @@ expand_unreachable_if_stmt (tree t) return true; } + /* Account for declarations as conditions. */ + expand_cond (IF_COND (t)); + if (THEN_CLAUSE (t) && ELSE_CLAUSE (t)) { n = expand_unreachable_stmt (THEN_CLAUSE (t), 0); @@ -969,7 +972,9 @@ expand_unreachable_if_stmt (tree t) /* Expand an unreachable statement list. This function skips all statements preceding the first potentially reachable label and then returns the label (or, in same cases, the statement after - one containing the label). */ + one containing the label). This function returns NULL_TREE if + the end of the given statement list is unreachable, and a + non-NULL value, possibly error_mark_node, otherwise. */ static tree expand_unreachable_stmt (tree t, int warn) { @@ -1019,7 +1024,7 @@ expand_unreachable_stmt (tree t, int warn) case IF_STMT: if (expand_unreachable_if_stmt (t)) - return TREE_CHAIN (t); + return TREE_CHAIN (t) ? TREE_CHAIN (t) : error_mark_node; break; case WHILE_STMT: @@ -1027,7 +1032,7 @@ expand_unreachable_stmt (tree t, int warn) no need to rotate the loop, instead the WHILE_STMT can be expanded like a DO_STMT. */ genrtl_do_stmt_1 (WHILE_COND (t), WHILE_BODY (t)); - return TREE_CHAIN (t); + return TREE_CHAIN (t) ? TREE_CHAIN (t) : error_mark_node; case COMPOUND_STMT: { @@ -1036,7 +1041,7 @@ expand_unreachable_stmt (tree t, int warn) if (n != NULL_TREE) { expand_stmt (n); - return TREE_CHAIN (t); + return TREE_CHAIN (t) ? TREE_CHAIN (t) : error_mark_node; } warn = false; break; |