Lint: * c-exp.y (parse_number): Avoid shift warning.
* serial.h (struct ttystate): Declare empty one on DOS.
This commit is contained in:
parent
6aa83a798d
commit
f24c159f1b
|
@ -1,3 +1,8 @@
|
||||||
|
Sat Mar 20 00:33:39 1993 John Gilmore (gnu@cygnus.com)
|
||||||
|
|
||||||
|
* c-exp.y (parse_number): Avoid shift warning.
|
||||||
|
* serial.h (struct ttystate): Declare empty one on DOS.
|
||||||
|
|
||||||
Fri Mar 19 12:59:50 1993 Stu Grossman (grossman@cygnus.com)
|
Fri Mar 19 12:59:50 1993 Stu Grossman (grossman@cygnus.com)
|
||||||
|
|
||||||
* xm-sun4os4.h: Return type of free() should be void, not int.
|
* xm-sun4os4.h: Return type of free() should be void, not int.
|
||||||
|
|
13
gdb/c-exp.y
13
gdb/c-exp.y
|
@ -1042,9 +1042,18 @@ parse_number (p, len, parsed_float, putithere)
|
||||||
/* If the number is too big to be an int, or it's got an l suffix
|
/* If the number is too big to be an int, or it's got an l suffix
|
||||||
then it's a long. Work out if this has to be a long by
|
then it's a long. Work out if this has to be a long by
|
||||||
shifting right and and seeing if anything remains, and the
|
shifting right and and seeing if anything remains, and the
|
||||||
target int size is different to the target long size. */
|
target int size is different to the target long size.
|
||||||
|
|
||||||
if ((TARGET_INT_BIT != TARGET_LONG_BIT && (n >> TARGET_INT_BIT)) || long_p)
|
In the expression below, we could have tested
|
||||||
|
(n >> TARGET_INT_BIT)
|
||||||
|
to see if it was zero,
|
||||||
|
but too many compilers warn about that, when ints and longs
|
||||||
|
are the same size. So we shift it twice, with fewer bits
|
||||||
|
each time, for the same result. */
|
||||||
|
|
||||||
|
if ( (TARGET_INT_BIT != TARGET_LONG_BIT
|
||||||
|
&& ((n >> 2) >> (TARGET_INT_BIT-2))) /* Avoid shift warning */
|
||||||
|
|| long_p)
|
||||||
{
|
{
|
||||||
high_bit = ((unsigned LONGEST)1) << (TARGET_LONG_BIT-1);
|
high_bit = ((unsigned LONGEST)1) << (TARGET_LONG_BIT-1);
|
||||||
unsigned_type = builtin_type_unsigned_long;
|
unsigned_type = builtin_type_unsigned_long;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Remote serial support interface definitions for GDB, the GNU Debugger.
|
/* Remote serial support interface definitions for GDB, the GNU Debugger.
|
||||||
Copyright 1992 Free Software Foundation, Inc.
|
Copyright 1992, 1993 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GDB.
|
This file is part of GDB.
|
||||||
|
|
||||||
|
@ -21,6 +21,10 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||||
|
|
||||||
/* Then you use the asynctsr */
|
/* Then you use the asynctsr */
|
||||||
|
|
||||||
|
struct ttystate {
|
||||||
|
/* No members */
|
||||||
|
};
|
||||||
|
|
||||||
#else
|
#else
|
||||||
#ifdef HAVE_TERMIO
|
#ifdef HAVE_TERMIO
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue