omp-low.c (oacc_parse_default_dims): Avoid -Wsign-compare warning...
authorJakub Jelinek <jakub@redhat.com>
Mon, 1 Feb 2016 19:14:59 +0000 (20:14 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Mon, 1 Feb 2016 19:14:59 +0000 (20:14 +0100)
* omp-low.c (oacc_parse_default_dims): Avoid
-Wsign-compare warning, make sure value fits into int
rather than just unsigned int.

From-SVN: r233044

gcc/ChangeLog
gcc/omp-low.c

index ba4deed7a245705fa90094e4fec1ef9bf522b555..b3524271d589820e96e7965eb58fbf32424119c4 100644 (file)
@@ -1,3 +1,9 @@
+2016-02-01  Jakub Jelinek  <jakub@redhat.com>
+
+       * omp-low.c (oacc_parse_default_dims): Avoid
+       -Wsign-compare warning, make sure value fits into int
+       rather than just unsigned int.
+
 2016-02-01  Bin Cheng  <bin.cheng@arm.com>
 
        PR tree-optimization/67921
index ec4b4b5545891acb860c1bc8ea3c7257760854c4..0b702740cbf17c410d5ca9378e614b1d3db88a01 100644 (file)
@@ -20285,10 +20285,10 @@ oacc_parse_default_dims (const char *dims)
 
              errno = 0;
              val = strtol (pos, CONST_CAST (char **, &eptr), 10);
-             if (errno || val <= 0 || (unsigned)val != val)
+             if (errno || val <= 0 || (int) val != val)
                goto malformed;
              pos = eptr;
-             oacc_default_dims[ix] = (int)val;
+             oacc_default_dims[ix] = (int) val;
            }
        }
       if (*pos)