diff options
author | mpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-10-07 04:18:19 +0000 |
---|---|---|
committer | mpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-10-07 04:18:19 +0000 |
commit | 224bdd518eae3c5b48c0f10988f2e520a6546685 (patch) | |
tree | bbe94e24f2eb7ab516cd5aa3d345aa21894c9678 /gcc/c | |
parent | b74245ec69a1273ff362da2bbba6810ef45bc045 (diff) | |
download | gcc-224bdd518eae3c5b48c0f10988f2e520a6546685.tar.gz |
* c-convert.c (convert): Use error_operand_p.
* c-typeck.c (require_complete_type): Likewise.
(really_atomic_lvalue): Likewise.
(digest_init): Likewise.
(handle_omp_array_sections_1): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@215964 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c')
-rw-r--r-- | gcc/c/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/c/c-convert.c | 3 | ||||
-rw-r--r-- | gcc/c/c-typeck.c | 9 |
3 files changed, 13 insertions, 7 deletions
diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog index 519aad0cff8..ec75d9807e9 100644 --- a/gcc/c/ChangeLog +++ b/gcc/c/ChangeLog @@ -1,3 +1,11 @@ +2014-10-07 Marek Polacek <polacek@redhat.com> + + * c-convert.c (convert): Use error_operand_p. + * c-typeck.c (require_complete_type): Likewise. + (really_atomic_lvalue): Likewise. + (digest_init): Likewise. + (handle_omp_array_sections_1): Likewise. + 2014-10-03 Marek Polacek <polacek@redhat.com> PR c/63453 diff --git a/gcc/c/c-convert.c b/gcc/c/c-convert.c index 38bacdaa4df..95be453fa3f 100644 --- a/gcc/c/c-convert.c +++ b/gcc/c/c-convert.c @@ -72,8 +72,7 @@ convert (tree type, tree expr) location_t loc = EXPR_LOCATION (expr); if (type == error_mark_node - || expr == error_mark_node - || TREE_TYPE (expr) == error_mark_node) + || error_operand_p (expr)) return error_mark_node; if ((invalid_conv_diag diff --git a/gcc/c/c-typeck.c b/gcc/c/c-typeck.c index f69c28bee07..b3b82bba2cc 100644 --- a/gcc/c/c-typeck.c +++ b/gcc/c/c-typeck.c @@ -192,7 +192,7 @@ require_complete_type (tree value) { tree type = TREE_TYPE (value); - if (value == error_mark_node || type == error_mark_node) + if (error_operand_p (value)) return error_mark_node; /* First, detect a valid value with a complete type. */ @@ -1950,7 +1950,7 @@ default_function_array_read_conversion (location_t loc, struct c_expr exp) static bool really_atomic_lvalue (tree expr) { - if (expr == error_mark_node || TREE_TYPE (expr) == error_mark_node) + if (error_operand_p (expr)) return false; if (!TYPE_ATOMIC (TREE_TYPE (expr))) return false; @@ -6492,8 +6492,7 @@ digest_init (location_t init_loc, tree type, tree init, tree origtype, if (type == error_mark_node || !init - || init == error_mark_node - || TREE_TYPE (init) == error_mark_node) + || error_operand_p (init)) return error_mark_node; STRIP_TYPE_NOPS (inside_init); @@ -11365,7 +11364,7 @@ handle_omp_array_sections_1 (tree c, tree t, vec<tree> &types, tree ret, low_bound, length, type; if (TREE_CODE (t) != TREE_LIST) { - if (t == error_mark_node || TREE_TYPE (t) == error_mark_node) + if (error_operand_p (t)) return error_mark_node; if (TREE_CODE (t) != VAR_DECL && TREE_CODE (t) != PARM_DECL) { |