added warning for nested comment

This commit is contained in:
eck 1990-04-10 10:52:52 +00:00
parent a3f1aaa41f
commit 031b9dfee2

View file

@ -378,7 +378,7 @@ char *op;
int *lineno;
{
char *ob = &_obuf[OBUFSIZE];
register int c;
register int c, oldc = '\0';
NoUnstack++;
if (options['C']) {
@ -410,8 +410,14 @@ int *lineno;
echo(c);
}
break; /* for(;;) */
} else if (oldc == '/') {
warning("comment inside comment ?");
}
oldc = '*';
} else {
oldc = c;
c = GetChar();
}
} else c = GetChar();
}
NoUnstack--;
return op;