From 2fd7d416ccfdb678771bbbd8c00c8b51cbd5fec8 Mon Sep 17 00:00:00 2001 From: Anil Madhavapeddy Date: Fri, 5 Sep 2003 20:40:39 +0000 Subject: Stop the bounds checker warning on a bound of 0, so now it only triggers on negative values. Suppresses some warnings on code which is useless but legal. deraadt@ ok --- gnu/egcs/gcc/c-common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gnu/egcs') diff --git a/gnu/egcs/gcc/c-common.c b/gnu/egcs/gcc/c-common.c index 95942113ff0..1f76a3381e1 100644 --- a/gnu/egcs/gcc/c-common.c +++ b/gnu/egcs/gcc/c-common.c @@ -2060,7 +2060,7 @@ check_bound_info (info, params) case string_bound_type: case buffer_bound_type: /* warn about illegal bounds value */ - if (length < 1) + if (length < 0) warning ("non-positive bounds length (%d) detected", length); /* check if the static buffer is smaller than bound length */ if (array_size < length) -- cgit v1.2.3