diff options
author | Kaveh R. Ghazi <ghazi@caip.rutgers.edu> | 2002-06-04 02:24:26 +0000 |
---|---|---|
committer | Kaveh Ghazi <ghazi@gcc.gnu.org> | 2002-06-04 02:24:26 +0000 |
commit | ac1db652a0f9c208904e5dc831ffee202a9929e0 (patch) | |
tree | 65eb683329d9e7e494421e05c8fc39677265efdf | |
parent | 467e9325d43e91e1a550ebd476ab9245142a70ca (diff) | |
download | gcc-ac1db652a0f9c208904e5dc831ffee202a9929e0.zip gcc-ac1db652a0f9c208904e5dc831ffee202a9929e0.tar.gz gcc-ac1db652a0f9c208904e5dc831ffee202a9929e0.tar.bz2 |
lbitbits.c (lbit_cshift): disambiguate expressions with parentheses.
* libF77/lbitbits.c (lbit_cshift): disambiguate expressions
with parentheses.
* libF77/qbitbits.c (qbit_cshift): Likewise.
* libI77/inquire.c (f_inqu): Likewise.
* libI77/rdfmt.c (rd_Z): Likewise.
* libI77/rsne.c (x_rsne): Likewise.
From-SVN: r54223
-rw-r--r-- | libf2c/ChangeLog | 9 | ||||
-rw-r--r-- | libf2c/libF77/lbitbits.c | 8 | ||||
-rw-r--r-- | libf2c/libF77/qbitbits.c | 8 | ||||
-rw-r--r-- | libf2c/libI77/inquire.c | 4 | ||||
-rw-r--r-- | libf2c/libI77/rdfmt.c | 4 | ||||
-rw-r--r-- | libf2c/libI77/rsne.c | 2 |
6 files changed, 22 insertions, 13 deletions
diff --git a/libf2c/ChangeLog b/libf2c/ChangeLog index 9e3e2a7..7e705f1 100644 --- a/libf2c/ChangeLog +++ b/libf2c/ChangeLog @@ -1,3 +1,12 @@ +Mon Jun 3 22:23:03 2002 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> + + * libF77/lbitbits.c (lbit_cshift): disambiguate expressions + with parentheses. + * libF77/qbitbits.c (qbit_cshift): Likewise. + * libI77/inquire.c (f_inqu): Likewise. + * libI77/rdfmt.c (rd_Z): Likewise. + * libI77/rsne.c (x_rsne): Likewise. + Mon Jun 3 22:21:23 2002 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * Makefile.in (s-libe77): Add WARN_CFLAGS. diff --git a/libf2c/libF77/lbitbits.c b/libf2c/libF77/lbitbits.c index 805d858..3b28ae9 100644 --- a/libf2c/libF77/lbitbits.c +++ b/libf2c/libF77/lbitbits.c @@ -36,11 +36,11 @@ lbit_cshift (integer a, integer b, integer len) if (b >= 0) { b %= LONGBITS; - return (integer) (x << b | x >> LONGBITS - b); + return (integer) (x << b | x >> (LONGBITS - b)); } b = -b; b %= LONGBITS; - return (integer) (x << LONGBITS - b | x >> b); + return (integer) (x << (LONGBITS - b) | x >> b); } y = z = (unsigned long) -1; y <<= len; @@ -50,9 +50,9 @@ lbit_cshift (integer a, integer b, integer len) if (b >= 0) { b %= len; - return (integer) (y | z & (x << b | x >> len - b)); + return (integer) (y | (z & (x << b | x >> (len - b)))); } b = -b; b %= len; - return (integer) (y | z & (x >> b | x << len - b)); + return (integer) (y | (z & (x >> b | x << (len - b)))); } diff --git a/libf2c/libF77/qbitbits.c b/libf2c/libF77/qbitbits.c index c2a87c2..f72858e 100644 --- a/libf2c/libF77/qbitbits.c +++ b/libf2c/libF77/qbitbits.c @@ -40,11 +40,11 @@ qbit_cshift (longint a, integer b, integer len) if (b >= 0) { b %= LONG8BITS; - return (longint) (x << b | x >> LONG8BITS - b); + return (longint) (x << b | x >> (LONG8BITS - b)); } b = -b; b %= LONG8BITS; - return (longint) (x << LONG8BITS - b | x >> b); + return (longint) (x << (LONG8BITS - b) | x >> b); } y = z = (unsigned long) -1; y <<= len; @@ -54,9 +54,9 @@ qbit_cshift (longint a, integer b, integer len) if (b >= 0) { b %= len; - return (longint) (y | z & (x << b | x >> len - b)); + return (longint) (y | (z & (x << b | x >> (len - b)))); } b = -b; b %= len; - return (longint) (y | z & (x >> b | x << len - b)); + return (longint) (y | (z & (x >> b | x << (len - b)))); } diff --git a/libf2c/libI77/inquire.c b/libf2c/libI77/inquire.c index 5b2df3e..dae869c 100644 --- a/libf2c/libI77/inquire.c +++ b/libf2c/libI77/inquire.c @@ -56,7 +56,7 @@ f_inqu (inlist * a) } if (a->inex != NULL) { - if (byfile && x != -1 || !byfile && p != NULL) + if ((byfile && x != -1) || (!byfile && p != NULL)) *a->inex = 1; else *a->inex = 0; @@ -72,7 +72,7 @@ f_inqu (inlist * a) *a->innum = p - f__units; if (a->innamed != NULL) { - if (byfile || p != NULL && p->ufnm != NULL) + if (byfile || (p != NULL && p->ufnm != NULL)) *a->innamed = 1; else *a->innamed = 0; diff --git a/libf2c/libI77/rdfmt.c b/libf2c/libI77/rdfmt.c index 5088f71..8a8818a 100644 --- a/libf2c/libI77/rdfmt.c +++ b/libf2c/libI77/rdfmt.c @@ -60,7 +60,7 @@ rd_Z (Uint * n, int w, ftnlen len) return errno = 115; w = (int) len; w1 = s - s0; - w2 = w1 + 1 >> 1; + w2 = (w1 + 1) >> 1; t = (char *) n; if (*(char *) &one) { @@ -85,7 +85,7 @@ rd_Z (Uint * n, int w, ftnlen len) } do { - *t = hex[*s0 & 0xff] - 1 << 4 | hex[s0[1] & 0xff] - 1; + *t = (hex[*s0 & 0xff] - 1) << 4 | (hex[s0[1] & 0xff] - 1); t += i; s0 += 2; } diff --git a/libf2c/libI77/rsne.c b/libf2c/libI77/rsne.c index 4b52134..f0490db 100644 --- a/libf2c/libI77/rsne.c +++ b/libf2c/libI77/rsne.c @@ -368,7 +368,7 @@ have_amp: case '&': return 0; default: - if (ch <= ' ' && ch >= 0 || ch == ',') + if ((ch <= ' ' && ch >= 0) || ch == ',') continue; Ungetc (ch, f__cf); if ((ch = getname (buf, sizeof (buf)))) |