summaryrefslogtreecommitdiffstats
path: root/contrib/gcc/c-format.c
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2002-05-09 20:02:13 +0000
committerobrien <obrien@FreeBSD.org>2002-05-09 20:02:13 +0000
commitc8f5fc7032940ad6633f932ac40cade82ec4d0cc (patch)
tree29a0f0a6c79a69ecc64f612947a0fe5904311713 /contrib/gcc/c-format.c
parentc9ab9ae440a8066b2c2b85b157b1fdadcf09916a (diff)
downloadFreeBSD-src-c8f5fc7032940ad6633f932ac40cade82ec4d0cc.zip
FreeBSD-src-c8f5fc7032940ad6633f932ac40cade82ec4d0cc.tar.gz
Gcc 3.1.0 pre-release from the FSF anoncvs repo on 9-May-2002 15:57:15 EDT.
Diffstat (limited to 'contrib/gcc/c-format.c')
-rw-r--r--contrib/gcc/c-format.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/contrib/gcc/c-format.c b/contrib/gcc/c-format.c
index b15b630..d52cfba 100644
--- a/contrib/gcc/c-format.c
+++ b/contrib/gcc/c-format.c
@@ -1,6 +1,6 @@
/* Check calls to formatted I/O functions (-Wformat).
- Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
- Free Software Foundation, Inc.
+ Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+ 2001, 2002 Free Software Foundation, Inc.
This file is part of GCC.
@@ -1516,13 +1516,12 @@ check_format_info_recurse (status, res, info, format_tree, params, arg_num)
res->number_non_literal++;
return;
}
- if (!host_integerp (arg1, 1))
+ if (!host_integerp (arg1, 0)
+ || (offset = tree_low_cst (arg1, 0)) < 0)
{
res->number_non_literal++;
return;
}
-
- offset = TREE_INT_CST_LOW (arg1);
}
if (TREE_CODE (format_tree) != ADDR_EXPR)
{
OpenPOWER on IntegriCloud