lbitbits.c (lbit_cshift): disambiguate expressions with parentheses.
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>
Tue, 4 Jun 2002 02:24:26 +0000 (02:24 +0000)
committerKaveh Ghazi <ghazi@gcc.gnu.org>
Tue, 4 Jun 2002 02:24:26 +0000 (02:24 +0000)
* 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

libf2c/ChangeLog
libf2c/libF77/lbitbits.c
libf2c/libF77/qbitbits.c
libf2c/libI77/inquire.c
libf2c/libI77/rdfmt.c
libf2c/libI77/rsne.c

index 9e3e2a70445591a432af5b823e5952c0b2714f78..7e705f1961c1cdba4905eedbb58953a9892d796e 100644 (file)
@@ -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.
index 805d85848e9040e88ec15e3fcbc8958466cc6b77..3b28ae97aba324800a5b1444b78ec566cd3169d9 100644 (file)
@@ -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))));
 }
index c2a87c24f303f842eafa87d7537c72f243ecb2b4..f72858e7a3397bbcb72469c96394a6763925d980 100644 (file)
@@ -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))));
 }
index 5b2df3e699cf518aac4bf4317ff7174c3304bf79..dae869cb4bfb0eda399124b7f02bf5da35f17123 100644 (file)
@@ -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;
index 5088f714f6fd0d8ca974ced3259190bbf2786209..8a8818aefb980e48b7eb58484bf578c14951f8ad 100644 (file)
@@ -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;
     }
index 4b521344dd48dff724f873cc0a1eaa0abdef0102..f0490dbaf8a4275cdbc198ac1f2a5e87f15ac8e9 100644 (file)
@@ -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))))