omp-low.c (oacc_parse_default_dims): Avoid -Wsign-compare warning...
* 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
This commit is contained in:
parent
e681fb2b53
commit
8131b4d77f
|
@ -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>
|
2016-02-01 Bin Cheng <bin.cheng@arm.com>
|
||||||
|
|
||||||
PR tree-optimization/67921
|
PR tree-optimization/67921
|
||||||
|
|
|
@ -20285,7 +20285,7 @@ oacc_parse_default_dims (const char *dims)
|
||||||
|
|
||||||
errno = 0;
|
errno = 0;
|
||||||
val = strtol (pos, CONST_CAST (char **, &eptr), 10);
|
val = strtol (pos, CONST_CAST (char **, &eptr), 10);
|
||||||
if (errno || val <= 0 || (unsigned)val != val)
|
if (errno || val <= 0 || (int) val != val)
|
||||||
goto malformed;
|
goto malformed;
|
||||||
pos = eptr;
|
pos = eptr;
|
||||||
oacc_default_dims[ix] = (int) val;
|
oacc_default_dims[ix] = (int) val;
|
||||||
|
|
Loading…
Reference in New Issue