]> git.ipfire.org Git - thirdparty/gcc.git/commit
libgomp: Fix up build on mingw [PR107641]
authorJakub Jelinek <jakub@redhat.com>
Mon, 14 Nov 2022 08:15:08 +0000 (09:15 +0100)
committerTobias Burnus <tobias@codesourcery.com>
Mon, 14 Nov 2022 08:15:08 +0000 (09:15 +0100)
commitc56df70095fc101648928cb31a4c73b68ee911bb
tree4230b08a00308192cae49f671fe80a1f146096d8
parentecf1603b7ad29a44622d6ef5fff78e40a12757c6
libgomp: Fix up build on mingw [PR107641]

Pointers should be first casted to intptr_t/uintptr_t before casting
them to another integral type to avoid warnings.
Furthermore, the function has code like
  else if (upper <= UINT_MAX)
    something;
  else
    something_else;
so it seems using unsigned type for upper where upper <= UINT_MAX is always
true is not intended.

2022-11-12  Jakub Jelinek  <jakub@redhat.com>

PR libgomp/107641
* env.c (parse_unsigned_long): Cast params[2] to uintptr_t rather than
unsigned long.  Change type of upper from unsigned to unsigned long.

(cherry picked from commit 2a193e9df82917eaf440a20f99a3febe91dcb5fe)
libgomp/ChangeLog.omp
libgomp/env.c