From 97b6d5b6769f7112b2d28648991e6ee9b57b4833 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Sun, 13 Jul 2008 15:05:53 -0700 Subject: preproc.c: make %warning actually issue a warning... The calculation of "severity" was buggered up, with the result that %warning actually issued an error. --- preproc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'preproc.c') diff --git a/preproc.c b/preproc.c index c59c2f9..0455268 100644 --- a/preproc.c +++ b/preproc.c @@ -2276,8 +2276,9 @@ static int do_directive(Token * tline) case PP_ERROR: case PP_WARNING: { - int severity = PP_ERROR ? ERR_NONFATAL|ERR_NO_SEVERITY : - ERR_WARNING|ERR_NO_SEVERITY; + int severity = (i == PP_ERROR) + ? ERR_NONFATAL|ERR_NO_SEVERITY + : ERR_WARNING|ERR_NO_SEVERITY; tline->next = expand_smacro(tline->next); tline = tline->next; -- cgit v1.2.3