ddnet/src
Robert Müller 71b3c8a35b Force default char to be signed on all architectures
We assume that `char` is `signed` in various places in the code. In particular, the `Str.StrToInts` test will fail when `char` is not `signed` and names containing special characters will be displayed incorrectly on servers.

Therefore, the compiler flag `-fsigned-char` is set unconditionally instead of only for ARM and ARM64, as we expect `char` to be `signed` on all architectures.

A static assertion is added to ensure at compile time that `char` is `signed` independently from the flag added in `CMakeLists.txt`.

This is necessary at least for ARM, ARM64, PPC, PPC64, and PPC64LE. According to some sources, `char` may also be `unsigned` by default when compiling for Android, although this could not be confirmed with the current Android NDK using Clang.

For the PowerPC architectures, Compiler Explorer can be used to confirm that `char` is not `signed` by default by checking whether the static assertion compiles (see https://godbolt.org/z/9rn5Mrf59) and that the assembly is different with the `-fsigned-char` flag (see https://godbolt.org/z/138zTj3Wa).

Closes #8386.
2024-06-11 23:37:46 +02:00
..
android Improve Android storage usage, faster launch, remove permissions 2024-05-25 21:09:42 +02:00
antibot Rename all variables for strict camel-casing of abbreviations 2024-03-05 15:44:09 +01:00
base Fix clang-analyzer-unix.StdCLibraryFunctions 2024-05-26 19:31:54 +08:00
engine Merge pull request #8459 from def-/pr-time-cp-diff 2024-06-07 17:35:45 +00:00
game Force default char to be signed on all architectures 2024-06-11 23:37:46 +02:00
macos Add INotifications kernel interface 2023-12-16 18:15:43 +01:00
masterping update ci actions, update rust edition to 2021 since our MSRV covers it 2024-02-25 15:55:10 +01:00
mastersrv update ci actions, update rust edition to 2021 since our MSRV covers it 2024-02-25 15:55:10 +01:00
rust-bridge Rename all variables for strict camel-casing of abbreviations 2024-03-05 15:44:09 +01:00
steam Rename all variables for strict camel-casing of abbreviations 2024-03-05 15:44:09 +01:00
test Increment teehistorian version_minor to 8 2024-05-04 21:40:06 +02:00
tools Remove redundant casts 2024-05-26 19:31:54 +08:00