Closed dacreman closed 3 years ago
Thanks.
Ah the good memories of the char
convention on ARM...
A short-term solution is to allow warnings by configuring SWIFT with --enable-compiler-warnings
. It does not solve the actual problem but will let the code compile.
getopt()
should return an int
however if the posix standard is to be respected: https://man7.org/linux/man-pages/man3/getopt.3.html
Hmm, I thought we got all the instances of char
and turned them all into int8_t
explicitly to avoid this. but we probably missed the ones in the tests. It does like in this case c
should be an int
though
Yep, I am pushing that change now.
That's now done. This mirror will be updated over night with the fix.
The latest master on gitlab is now using the correct type here to get the return value of getopt()
.
Fixed in 5fdd4e10a8dd819f939df9e8d261bfa952ecffd3.
Running
make check
on an ARM64 system fails to build some tests. One problem is related assigning the return value ofgetopt
to a defaultchar
. On ARM64 platforms the defaultchar
type is unsigned so compiler warnings are generated which are promoted to errors e.g.Changing
char
tosigned char
should fix this. Files affected:Tested on the Isambard system (Thunder X2 processors) with GCC 9.3.0 and ARM 20.0 (based on LLVM 9.0.1) compilers called from Cray wrappers.