problem with cc compiler
James P. Willey
willey at arrakis.nevada.edu
Mon Jul 24 08:18:25 AEST 1989
I don't have the original error producing code anymore, but I tried to
reproduce the error. Unfortunately, [or maybe fortunately] I was unable to
reproduce the error. [I have since been moved to a new machine.] It was run
on either 4.2 BSD or 4.3 BSD UNIX. The code was something like this:
#include <stdio.h>
#include <ctype.h>
int c,f;
main()
{
f = read();
}
int read()
{
int index = 0;
while (c == '\t' || c == ' ')
c = getchar();
while (isdigit(c)) {
index = index * 10 + c - '0';
c = getchar();
}
return(index);
}
The error came in filbuf at 0x116 [from memory, so I'm not quite sure
where in filbuf]. No matter where in the code getchar() was called from,
the same error occurred. I wish I had saved the original code, but at the
time I didn't see any reason to save code from hell :-)
Thanks for the help!!!
More information about the Comp.lang.c
mailing list