This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


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

Re: [RFA] fix gdb.base/remote.c for small int targets


> Date: Thu, 30 Aug 2001 22:11:23 -0700 (PDT)
> From: Jeff Holcomb <jeffh@redhat.com>
>  
> -#ifdef mc68hc11
> +#include <limits.h>
> +/* For targets with 16bit int, use a 1k buffer. */
> +#if INT_MAX < 32768

Shouldn't you use 32768L or 32768U?  If an int is only 16 bits wide,
32768 might overflow into the sign bit, and then all bets are off.


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