aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/pre-process.c
diff options
authorwelinder@troll.com <welinder@troll.com>2004-09-02 12:30:28 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-07 21:03:02 -0700
commit8385b6378b563b3552fbb7f42a4bfc692d3e7cf1 (patch)
treef12eb16335007d1dafffc85a6973c8cc72c67e84 /pre-process.c
parent2508352d281ab9c4b1c9a77e37bbf795af6bae37 (diff)
downloadsparse-dev-8385b6378b563b3552fbb7f42a4bfc692d3e7cf1.tar.gz
Encountering #warning or #error at the wrong spot means that the file
is not constant. Not that it really matters, but still...
Diffstat (limited to 'pre-process.c')
-rw-r--r--pre-process.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/pre-process.c b/pre-process.c
index eb52e15e..696eba45 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;
}