2001-10-26 Richard Kenner <kenner@gnat.com>
+ * gmem.c (__gnat_gmem_read_next): Properly check for EOF
+
+2001-10-26 Richard Kenner <kenner@gnat.com>
+
* decl.c (validate_size): Modify message for bad size to avoid
implication that compiler is modifying the size.
fclose (gmemfile);
return 0;
}
-
+
return 1;
}
{
void *addr;
int size;
- char c;
+ int j;
- if ((c = fgetc (gmemfile)) == EOF)
+ j = fgetc (gmemfile);
+ if (j == EOF)
{
fclose (gmemfile);
sprintf (buf, "Program exited.");
}
else
{
- switch (c)
+ switch (j)
{
case 'A' :
fread (&addr, sizeof (char *), 1, gmemfile);