[gcc r9-9275] runtime: cast SIGSTKSZ to uintptr
Ian Lance Taylor
ian@gcc.gnu.org
Tue Mar 9 00:16:27 GMT 2021
https://gcc.gnu.org/g:1a543ca52392b7aea135f47ac244485fcea0d267
commit r9-9275-g1a543ca52392b7aea135f47ac244485fcea0d267
Author: Ian Lance Taylor <iant@golang.org>
Date: Mon Mar 8 15:24:06 2021 -0800
runtime: cast SIGSTKSZ to uintptr
PR go/99458
* libgo/runtime/proc.c: cast SIGSTKSZ to uintptr
In newer versions of glibc it is long, which causes a signed
comparison warning.
Diff:
---
libgo/runtime/proc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libgo/runtime/proc.c b/libgo/runtime/proc.c
index 1569b5bb898..bb4c56dceb2 100644
--- a/libgo/runtime/proc.c
+++ b/libgo/runtime/proc.c
@@ -804,8 +804,8 @@ runtime_malg(bool allocatestack, bool signalstack, byte** ret_stack, uintptr* re
if(signalstack) {
stacksize = 32 * 1024; // OS X wants >= 8K, GNU/Linux >= 2K
#ifdef SIGSTKSZ
- if(stacksize < SIGSTKSZ)
- stacksize = SIGSTKSZ;
+ if(stacksize < (uintptr)(SIGSTKSZ))
+ stacksize = (uintptr)(SIGSTKSZ);
#endif
}
More information about the Gcc-cvs
mailing list