aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/pp.c b/pp.c
index 110ff66..a819cb0 100644
--- a/pp.c
+++ b/pp.c
@@ -352,7 +352,8 @@ line:
} else if (strcmp(name, "error") == 0) {
error(&tok.loc, "#error directive is not implemented");
} else if (strcmp(name, "pragma") == 0) {
- error(&tok.loc, "#pragma directive is not implemented");
+ while (tok.kind != TNEWLINE && tok.kind != TEOF)
+ next();
} else {
error(&tok.loc, "invalid preprocessor directive #%s", name);
}