]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/c-family/c-format.c
Merge from trunk.
[thirdparty/gcc.git] / gcc / c-family / c-format.c
index 0552c84464fcf8234f530b41fe4651e8e13d1322..0ae6733c2d703ddeb1a4259d799500c5522a6162 100644 (file)
@@ -227,7 +227,7 @@ check_format_string (tree fntype, unsigned HOST_WIDE_INT format_num,
 static bool
 get_constant (tree expr, unsigned HOST_WIDE_INT *value, int validated_p)
 {
-  if (TREE_CODE (expr) != INTEGER_CST || TREE_INT_CST_HIGH (expr) != 0)
+  if (!cst_fits_uhwi_p (expr))
     {
       gcc_assert (!validated_p);
       return false;