diff options
author | Jakub Jelinek <jakub@redhat.com> | 2016-02-01 19:14:59 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2016-02-01 19:14:59 +0000 |
commit | 4de880c709212c138cebdf8511d2acfaba34dd97 (patch) | |
tree | 2be1c7b1e24e9d8573337a06ff2538e3cbffa648 | |
parent | 4abcbb77ecd0f968495636f6f04d5771069518c9 (diff) |
* omp-low.c (oacc_parse_default_dims): Avoid
-Wsign-compare warning, make sure value fits into int
rather than just unsigned int.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@233044 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/omp-low.c | 4 |
2 files changed, 8 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ba4deed7a24..b3524271d58 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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 diff --git a/gcc/omp-low.c b/gcc/omp-low.c index ec4b4b55458..0b702740cbf 100644 --- a/gcc/omp-low.c +++ b/gcc/omp-low.c @@ -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) |