]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/c/c-parser.c
Merge in trunk.
[thirdparty/gcc.git] / gcc / c / c-parser.c
index a8f4774136d3875e9af0e70d74631d50df6af403..6f52ba94e77a0a09eb1500b367a087203bb55331 100644 (file)
@@ -383,7 +383,7 @@ c_lex_one_token (c_parser *parser, c_token *token)
       break;
     case CPP_PRAGMA:
       /* We smuggled the cpp_token->u.pragma value in an INTEGER_CST.  */
-      token->pragma_kind = (enum pragma_kind) TREE_INT_CST_LOW (token->value);
+      token->pragma_kind = (enum pragma_kind) tree_to_hwi (token->value);
       token->value = NULL;
       break;
     default:
@@ -9517,8 +9517,8 @@ c_parser_omp_clause_collapse (c_parser *parser, tree list)
   mark_exp_read (num);
   num = c_fully_fold (num, false, NULL);
   if (!INTEGRAL_TYPE_P (TREE_TYPE (num))
-      || !host_integerp (num, 0)
-      || (n = tree_low_cst (num, 0)) <= 0
+      || !tree_fits_shwi_p (num)
+      || (n = tree_to_shwi (num)) <= 0
       || (int) n != n)
     {
       error_at (loc,
@@ -11244,7 +11244,7 @@ c_parser_omp_for_loop (location_t loc, c_parser *parser, enum tree_code code,
 
   for (cl = clauses; cl; cl = OMP_CLAUSE_CHAIN (cl))
     if (OMP_CLAUSE_CODE (cl) == OMP_CLAUSE_COLLAPSE)
-      collapse = tree_low_cst (OMP_CLAUSE_COLLAPSE_EXPR (cl), 0);
+      collapse = tree_to_shwi (OMP_CLAUSE_COLLAPSE_EXPR (cl));
 
   gcc_assert (collapse >= 1);