From mboxrd@z Thu Jan 1 00:00:00 1970 From: "John David Anglin" To: dave@hiauly1.hia.nrc.ca (John David Anglin) Cc: gcc-patches@gcc.gnu.org Subject: Re: Evaluation order of &&s in ||, in macro INDEX_TERM_P, in vax.h Date: Mon, 12 Jun 2000 08:18:00 -0000 Message-id: <200006121518.LAA09064@hiauly1.hia.nrc.ca> References: X-SW-Source: 2000-06/msg00343.html > The following patch to vax.h squashes a few warnings about &&s in ||, > and might slightly improve the code generated by the INDEX_TERM_P macro. Revised the patch to squelch signed/unsigned warnings from comparision. Dave -- J. David Anglin dave.anglin@nrc.ca National Research Council of Canada (613) 990-0752 (FAX: 952-6605) 2000-06-12 J. David Anglin * vax.h (INDEX_TERM_P): Define evaluation order of &&'s in || and cast to squelch signed/unsigned warnings. --- vax.h.orig Fri May 26 13:10:48 2000 +++ vax.h Mon Jun 12 11:10:46 2000 @@ -731,15 +731,15 @@ : (GET_CODE (PROD) == MULT \ && \ (xfoo0 = XEXP (PROD, 0), xfoo1 = XEXP (PROD, 1), \ - ((GET_CODE (xfoo0) == CONST_INT \ - && INTVAL (xfoo0) == GET_MODE_SIZE (MODE) \ - && GET_CODE (xfoo1) == REG \ - && REG_OK_FOR_INDEX_P (xfoo1)) \ - || \ - (GET_CODE (xfoo1) == CONST_INT \ - && INTVAL (xfoo1) == GET_MODE_SIZE (MODE) \ - && GET_CODE (xfoo0) == REG \ - && REG_OK_FOR_INDEX_P (xfoo0)))))) + ((((GET_CODE (xfoo0) == CONST_INT \ + && GET_CODE (xfoo1) == REG) \ + && INTVAL (xfoo0) == (int)GET_MODE_SIZE (MODE)) \ + && REG_OK_FOR_INDEX_P (xfoo1)) \ + || \ + (((GET_CODE (xfoo1) == CONST_INT \ + && GET_CODE (xfoo0) == REG) \ + && INTVAL (xfoo1) == (int)GET_MODE_SIZE (MODE)) \ + && REG_OK_FOR_INDEX_P (xfoo0)))))) /* Go to ADDR if X is the sum of a register and a valid index term for mode MODE. */