egcs-971225, hpux9 pa/pa.c warning: comparisons like X<=Y<=Z ...

Kaveh R. Ghazi ghazi@caip.rutgers.edu
Fri Jan 2 06:35:00 GMT 1998


Hi,

	When bootstrapping on hpux9 using -W -Wall, I got a warning
from pa/pa.c which looked odd.

 > ./config/pa/pa.c:420: warning: comparisons like X<=Y<=Z do not have
 > 	their mathematical meaning

 > int
 > arith_double_operand (op, mode)
 >      rtx op;
 >      enum machine_mode mode;
 > {
 >   return (register_operand (op, mode)
 >           || (GET_CODE (op) == CONST_DOUBLE
 >               && GET_MODE (op) == mode
 >               && VAL_14_BITS_P (CONST_DOUBLE_LOW (op))
 >               && (CONST_DOUBLE_HIGH (op) >= 0
 > LINE 420 --->>    == ((CONST_DOUBLE_LOW (op) & 0x1000) == 0))));
 > }


	The expression actually does (X >= 0 == Y), is this really
what was desired?  Is yes, I'd like to add parens around the "X >= 0"
part to make the intention more clear and have the warning go away.
(At least, I *think* that's the right place to add the parens...)

		Thanks,
		--Kaveh
--
Kaveh R. Ghazi			Project Manager / Custom Development
ghazi@caip.rutgers.edu		ICon CMT Corp.



More information about the Gcc-bugs mailing list