summaryrefslogtreecommitdiff
path: root/src/tools/lcc/cpp/cpp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/lcc/cpp/cpp.c')
-rw-r--r--src/tools/lcc/cpp/cpp.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/tools/lcc/cpp/cpp.c b/src/tools/lcc/cpp/cpp.c
index 6739e4d..5c0cfd7 100644
--- a/src/tools/lcc/cpp/cpp.c
+++ b/src/tools/lcc/cpp/cpp.c
@@ -9,7 +9,7 @@ char rcsid[] = "cpp.c - faked rcsid";
#define OUTS 16384
char outbuf[OUTS];
-char *outp = outbuf;
+char *outbufp = outbuf;
Source *cursource;
int nerrs;
struct token nltoken = { NL, 0, 0, 0, 1, (uchar*)"\n" };
@@ -51,7 +51,7 @@ process(Tokenrow *trp)
for (;;) {
if (trp->tp >= trp->lp) {
trp->tp = trp->lp = trp->bp;
- outp = outbuf;
+ outbufp = outbuf;
anymacros |= gettokens(trp, 1);
trp->tp = trp->bp;
}
@@ -204,9 +204,14 @@ control(Tokenrow *trp)
error(WARNING, "Syntax error in #endif");
break;
+ case KWARNING:
+ trp->tp = tp+1;
+ error(WARNING, "#warning directive: %r", trp);
+ break;
+
case KERROR:
trp->tp = tp+1;
- error(WARNING, "#error directive: %r", trp);
+ error(ERROR, "#error directive: %r", trp);
break;
case KLINE:
@@ -245,7 +250,6 @@ control(Tokenrow *trp)
break;
}
setempty(trp);
- return;
}
void *