Avoid a bug in the C-optimizer of 4.1 BSD.

This commit is contained in:
ceriel 1986-11-07 17:54:30 +00:00
parent 7fd4e395da
commit 87af36724b

View file

@ -117,13 +117,13 @@ scanner() {
int reserved = 0; /* reserved word? */ int reserved = 0; /* reserved word? */
char *max = &ltext[LTEXTSZ - 1]; char *max = &ltext[LTEXTSZ - 1];
if (ch = savedtok.t_tokno) { if (savedtok.t_tokno) {
/* A token has been inserted. /* A token has been inserted.
* Now deliver the last lextoken again * Now deliver the last lextoken again
*/ */
lextoken = savedtok; lextoken = savedtok;
savedtok.t_tokno = 0; savedtok.t_tokno = 0;
return ch; return lextoken.t_tokno;
} }
for (;;) { for (;;) {
ch = input(); ch = input();