re PR objc/80949 (ICE in do_warn_duplicated_branches_r)
PR objc/80949 * c-warn.c (do_warn_duplicated_branches): Return if any of the branches is null. From-SVN: r249171
This commit is contained in:
parent
6ae036b330
commit
8a51658814
|
@ -1,3 +1,9 @@
|
||||||
|
2017-06-13 Marek Polacek <polacek@redhat.com>
|
||||||
|
|
||||||
|
PR objc/80949
|
||||||
|
* c-warn.c (do_warn_duplicated_branches): Return if any of the
|
||||||
|
branches is null.
|
||||||
|
|
||||||
2017-06-13 Martin Liska <mliska@suse.cz>
|
2017-06-13 Martin Liska <mliska@suse.cz>
|
||||||
|
|
||||||
PR sanitize/78204
|
PR sanitize/78204
|
||||||
|
|
|
@ -2354,8 +2354,8 @@ do_warn_duplicated_branches (tree expr)
|
||||||
tree thenb = COND_EXPR_THEN (expr);
|
tree thenb = COND_EXPR_THEN (expr);
|
||||||
tree elseb = COND_EXPR_ELSE (expr);
|
tree elseb = COND_EXPR_ELSE (expr);
|
||||||
|
|
||||||
/* Don't bother if there's no else branch. */
|
/* Don't bother if any of the branches is missing. */
|
||||||
if (elseb == NULL_TREE)
|
if (thenb == NULL_TREE || elseb == NULL_TREE)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* And don't warn for empty statements. */
|
/* And don't warn for empty statements. */
|
||||||
|
|
Loading…
Reference in New Issue