This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC: Address some fallout from "fractional modes"


Richard Henderson <rth@redhat.com> writes:

> On Tue, Nov 04, 2003 at 04:39:27PM -0800, Zack Weinberg wrote:
>> +#define GET_MODE_SIZE(MODE)    ((unsigned short) mode_size[MODE])
>> +#define GET_MODE_BITSIZE(MODE) ((unsigned short) (GET_MODE_SIZE (MODE) * BITS_PER_UNIT))
>
> Why unsigned short?  It still promotes to signed int.

Using either "unsigned int" or "signed int" here causes "comparison of
signed and unsigned" warnings (in different places).  "unsigned short"
doesn't.

zw


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]