diff options
author | welinder@troll.com <welinder@troll.com> | 2004-09-02 12:30:28 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-07 21:03:02 -0700 |
commit | 8385b6378b563b3552fbb7f42a4bfc692d3e7cf1 (patch) | |
tree | f12eb16335007d1dafffc85a6973c8cc72c67e84 | |
parent | Fix #warning for lines that end up with precisely 1024 characters. (diff) | |
download | sparse-8385b6378b563b3552fbb7f42a4bfc692d3e7cf1.tar.gz sparse-8385b6378b563b3552fbb7f42a4bfc692d3e7cf1.tar.bz2 sparse-8385b6378b563b3552fbb7f42a4bfc692d3e7cf1.zip |
Encountering #warning or #error at the wrong spot means that the file
is not constant. Not that it really matters, but still...
-rw-r--r-- | pre-process.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/pre-process.c b/pre-process.c index eb52e15..696eba4 100644 --- a/pre-process.c +++ b/pre-process.c @@ -1260,6 +1260,8 @@ static int handle_warning(struct stream *stream, struct token **line, struct tok { if (false_nesting) return 1; + if (stream->constant == CONSTANT_FILE_MAYBE) + MARK_STREAM_NONCONST(token->pos); warn(token->pos, "%s", show_token_sequence(token->next)); return 1; } @@ -1268,6 +1270,8 @@ static int handle_error(struct stream *stream, struct token **line, struct token { if (false_nesting) return 1; + if (stream->constant == CONSTANT_FILE_MAYBE) + MARK_STREAM_NONCONST(token->pos); warn(token->pos, "%s", show_token_sequence(token->next)); return 1; } |