mirror of
https://github.com/mirror/tinycc.git
synced 2025-02-28 08:10:25 +08:00
string_test: we should always use 'unsigned int' for b
As recently shown in fb0ac2 (s/int/unsigned/ since GCC 4.3.2 produces code which doesn't stop) comparing (signed) int variable to 0x80000000 is not idea for x86_64. This is not a good idea for x86_32 either, because GCC 4.3.2 (the one in Debian Lenny) rightly assumes that a signed int could be never 0x80000000, and thus removes the check from while (b != 0x80000000) { ... completely. If we want this check, we need b to be always 'unsigned' Signed-off-by: Kirill Smelkov <kirr@landau.phys.spbu.ru>
This commit is contained in:
parent
5a044b67bb
commit
6213d4b4b6
Loading…
Reference in New Issue
Block a user