aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/preprocess.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/preprocess.c b/src/preprocess.c
index ed9dd8b..56c775d 100644
--- a/src/preprocess.c
+++ b/src/preprocess.c
@@ -1118,8 +1118,11 @@ static void preprocess_warning_directive(Preprocessor* pp) {
fprintf(stderr, "%s:%d: %s", msg->loc.filename, msg->loc.line, msg->value.string);
}
-static void preprocess_pragma_directive(Preprocessor*) {
- unimplemented();
+static void preprocess_pragma_directive(Preprocessor* pp) {
+ // Ignore all #pragma directives for now.
+ skip_pp_token(pp, TokenKind_pp_directive_pragma);
+ seek_to_next_newline(pp);
+ skip_pp_token(pp, TokenKind_newline);
}
static void preprocess_nop_directive(Preprocessor* pp) {