Commit 7e44eda6 by Jim Wilson

(finish_decl): Correct typo in use of tree_int_cst_sgn.

From-SVN: r6989
parent 3797f4d4
......@@ -3469,8 +3469,11 @@ finish_decl (decl, init, asmspec_tree)
DECL_EXTERNAL (decl) = 1;
}
/* TYPE_MAX_VALUE is always one less than the number of elements
in the array, because we start counting at zero. Therefore,
warn only if the value is less than zero. */
if (pedantic && TYPE_DOMAIN (type) != 0
&& tree_int_cst_sgn (TYPE_MAX_VALUE (TYPE_DOMAIN (type))) <= 0)
&& tree_int_cst_sgn (TYPE_MAX_VALUE (TYPE_DOMAIN (type))) < 0)
error_with_decl (decl, "zero or negative size array `%s'");
layout_decl (decl, 0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment