added warning for nested comment
This commit is contained in:
parent
a3f1aaa41f
commit
031b9dfee2
1 changed files with 8 additions and 2 deletions
|
@ -378,7 +378,7 @@ char *op;
|
||||||
int *lineno;
|
int *lineno;
|
||||||
{
|
{
|
||||||
char *ob = &_obuf[OBUFSIZE];
|
char *ob = &_obuf[OBUFSIZE];
|
||||||
register int c;
|
register int c, oldc = '\0';
|
||||||
|
|
||||||
NoUnstack++;
|
NoUnstack++;
|
||||||
if (options['C']) {
|
if (options['C']) {
|
||||||
|
@ -410,8 +410,14 @@ int *lineno;
|
||||||
echo(c);
|
echo(c);
|
||||||
}
|
}
|
||||||
break; /* for(;;) */
|
break; /* for(;;) */
|
||||||
|
} else if (oldc == '/') {
|
||||||
|
warning("comment inside comment ?");
|
||||||
}
|
}
|
||||||
} else c = GetChar();
|
oldc = '*';
|
||||||
|
} else {
|
||||||
|
oldc = c;
|
||||||
|
c = GetChar();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
NoUnstack--;
|
NoUnstack--;
|
||||||
return op;
|
return op;
|
||||||
|
|
Loading…
Reference in a new issue