error messages and error handling

This commit is contained in:
dick
1988-09-16 23:19:50 +00:00
parent a5f48d6493
commit 1f7115fa8d
27 changed files with 111 additions and 101 deletions

View File

@@ -97,12 +97,12 @@ check_array_subscript(expr)
arith size = expr->VL_VALUE;
if (size < 0) {
error("negative number of array elements");
error("array size is negative");
expr->VL_VALUE = (arith)1;
}
else
if (size == 0) {
warning("empty array declaration");
warning("array size is 0");
}
else
if (size & ~max_unsigned) { /* absolutely ridiculous */