From: Roman Lechtchinsky Date: Sun, 26 May 2002 01:42:23 +0000 (+0000) Subject: * gettextP.h (SWAP): Change parameter type to unsigned int. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2dff889ead0aa83aa45cd09e19e08eadcaa8895b;p=gcc.git * gettextP.h (SWAP): Change parameter type to unsigned int. From-SVN: r53878 --- diff --git a/gcc/intl/ChangeLog b/gcc/intl/ChangeLog index 019e30024ab..1fe7f37090b 100644 --- a/gcc/intl/ChangeLog +++ b/gcc/intl/ChangeLog @@ -1,3 +1,7 @@ +2002-05-25 Roman Lechtchinsky + + * gettextP.h (SWAP): Change parameter type to unsigned int. + Tue Dec 11 07:08:57 2001 Douglas B. Rupp * localealias.c (strings.h): Include. diff --git a/gcc/intl/gettextP.h b/gcc/intl/gettextP.h index 5a925519e56..31f6d2c1985 100644 --- a/gcc/intl/gettextP.h +++ b/gcc/intl/gettextP.h @@ -63,12 +63,14 @@ # include # define SWAP(i) bswap_32 (i) #else -/* GCC LOCAL: Prototype first to avoid warnings. */ -static inline nls_uint32 SWAP PARAMS ((nls_uint32)); +/* GCC LOCAL: Prototype first to avoid warnings; change argument to + unsigned int to avoid K&R type promotion errors with 64-bit "int". */ +static inline nls_uint32 SWAP PARAMS ((unsigned int)); static inline nls_uint32 SWAP (i) - nls_uint32 i; + unsigned int ii; { + nls_uint32 i = ii; return (i << 24) | ((i & 0xff00) << 8) | ((i >> 8) & 0xff00) | (i >> 24); } #endif