aboutsummaryrefslogtreecommitdiffstats
path: root/code/tools/lcc
diff options
context:
space:
mode:
Diffstat (limited to 'code/tools/lcc')
-rw-r--r--code/tools/lcc/cpp/cpp.c7
-rw-r--r--code/tools/lcc/cpp/cpp.h2
-rw-r--r--code/tools/lcc/cpp/nlist.c1
3 files changed, 8 insertions, 2 deletions
diff --git a/code/tools/lcc/cpp/cpp.c b/code/tools/lcc/cpp/cpp.c
index 6739e4d..1fcffbc 100644
--- a/code/tools/lcc/cpp/cpp.c
+++ b/code/tools/lcc/cpp/cpp.c
@@ -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:
diff --git a/code/tools/lcc/cpp/cpp.h b/code/tools/lcc/cpp/cpp.h
index ae855c9..87871d9 100644
--- a/code/tools/lcc/cpp/cpp.h
+++ b/code/tools/lcc/cpp/cpp.h
@@ -24,7 +24,7 @@ enum toktype { END, UNCLASS, NAME, NUMBER, STRING, CCON, NL, WS, DSHARP,
DSHARP1, NAME1, DEFINED, UMINUS };
enum kwtype { KIF, KIFDEF, KIFNDEF, KELIF, KELSE, KENDIF, KINCLUDE, KDEFINE,
- KUNDEF, KLINE, KERROR, KPRAGMA, KDEFINED,
+ KUNDEF, KLINE, KWARNING, KERROR, KPRAGMA, KDEFINED,
KLINENO, KFILE, KDATE, KTIME, KSTDC, KEVAL };
#define ISDEFINED 01 /* has #defined value */
diff --git a/code/tools/lcc/cpp/nlist.c b/code/tools/lcc/cpp/nlist.c
index d76df86..d3a8357 100644
--- a/code/tools/lcc/cpp/nlist.c
+++ b/code/tools/lcc/cpp/nlist.c
@@ -29,6 +29,7 @@ struct kwtab {
{"define", KDEFINE, ISKW},
{"undef", KUNDEF, ISKW},
{"line", KLINE, ISKW},
+ {"warning", KWARNING, ISKW},
{"error", KERROR, ISKW},
{"pragma", KPRAGMA, ISKW},
{"eval", KEVAL, ISKW},