cppfiles.c (read_and_prescan): Cast the result of `xrealloc' to U_CHAR* when assignin...
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>
Sat, 6 Feb 1999 07:38:50 +0000 (07:38 +0000)
committerKaveh Ghazi <ghazi@gcc.gnu.org>
Sat, 6 Feb 1999 07:38:50 +0000 (07:38 +0000)
        * cppfiles.c (read_and_prescan): Cast the result of `xrealloc' to
        U_CHAR* when assigning to one.  Ensure the values of a ?: operator
        have the same type.
        * cppinit.c (initialize_char_syntax): Use K&R function definition.

From-SVN: r25054

gcc/ChangeLog
gcc/cppfiles.c
gcc/cppinit.c

index 2c8d22c7e2f9119cedb7882be45bceba7e9057f6..a6576cb085f83667676d298c7ab5be83fda64b22 100644 (file)
@@ -1,3 +1,11 @@
+Sat Feb  6 10:18:01 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+       * cppfiles.c (read_and_prescan): Cast the result of `xrealloc' to
+       U_CHAR* when assigning to one.  Ensure the values of a ?: operator
+       have the same type.
+
+       * cppinit.c (initialize_char_syntax): Use K&R function definition.
+
 Sat Feb  6 11:17:03 1999  Richard Earnshaw <rearnsha@arm.com>
 
        Support for ARM9
index 9ef74f1b8f9ff8548ebe3d547c7318d8d2400428..5092b916718c7063bfe50597b2f708fcd070f3ed 100644 (file)
@@ -860,7 +860,7 @@ read_and_prescan (pfile, fp, desc, len)
 
          delta_op = op - buf;
          delta_line_base = line_base - buf;
-         buf = xrealloc (buf, len);
+         buf = (U_CHAR *) xrealloc (buf, len);
          op = buf + delta_op;
          line_base = buf + delta_line_base;
        }
@@ -989,7 +989,7 @@ read_and_prescan (pfile, fp, desc, len)
          len += 2;
          if (offset + 2 > len)
            goto too_big;
-         buf = xrealloc (buf, len);
+         buf = (U_CHAR *) xrealloc (buf, len);
          op = buf + offset;
        }
       if (op[-1] == '\\')
@@ -997,7 +997,8 @@ read_and_prescan (pfile, fp, desc, len)
       *op++ = '\n';
     }
 
-  fp->buf = (len - offset < 20) ? buf : xrealloc (buf, op - buf);
+  fp->buf =
+    (U_CHAR *) ((len - offset < 20) ? (PTR) buf : xrealloc (buf, op - buf));
   return op - buf;
 
  too_big:
index da7030f5b1b959d38fc3b92e10ef3fbd1490e97c..32ebad998052909553ed8eee5b0d3e264064b1e3 100644 (file)
@@ -51,7 +51,8 @@ U_CHAR trigraph_table[256] = { 0 };
 
 /* Initialize syntactic classifications of characters. */
 void
-initialize_char_syntax (int dollar_in_ident)
+initialize_char_syntax (dollar_in_ident)
+     int dollar_in_ident;
 {
   is_idstart['a'] = 1; is_idstart['b'] = 1; is_idstart['c'] = 1;
   is_idstart['d'] = 1; is_idstart['e'] = 1; is_idstart['f'] = 1;