public
/
ack.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a3f1aaa
)
added warning for nested comment
author
eck
<none@none>
Tue, 10 Apr 1990 10:52:52 +0000
(10:52 +0000)
committer
eck
<none@none>
Tue, 10 Apr 1990 10:52:52 +0000
(10:52 +0000)
lang/cem/cpp.ansi/preprocess.c
patch
|
blob
|
history
diff --git
a/lang/cem/cpp.ansi/preprocess.c
b/lang/cem/cpp.ansi/preprocess.c
index
1a31034
..
025af03
100644
(file)
--- a/
lang/cem/cpp.ansi/preprocess.c
+++ b/
lang/cem/cpp.ansi/preprocess.c
@@
-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 ?");
}
- } else c = GetChar();
+ oldc = '*';
+ } else {
+ oldc = c;
+ c = GetChar();
+ }
}
NoUnstack--;
return op;