From d0a12f5b14d21d92ee5b6bbe4f44723c6b24fbf1 Mon Sep 17 00:00:00 2001 From: Cary R Date: Thu, 23 Jul 2009 13:16:55 -0700 Subject: [PATCH] When skipping C-style comments in a skipped `ifdef include the '\n' When a C-style comment /* */ is being skipped because it is in a skipped `ifdef, `ifndef, etc. directive then we need to output a '\n' at any comment end of line. (cherry picked from commit e932c415876443816233383e22761cbb6b1511c1) --- ivlpp/lexor.lex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ivlpp/lexor.lex b/ivlpp/lexor.lex index e96ecf3e7..2a34f8c74 100644 --- a/ivlpp/lexor.lex +++ b/ivlpp/lexor.lex @@ -457,7 +457,7 @@ keywords (include|define|undef|ifdef|ifndef|else|elseif|endif) \n\r | \r\n | \n | -\r { istack->lineno += 1; } +\r { istack->lineno += 1; fputc('\n', yyout); } "*/" { BEGIN(comment_enter); } [^\r\n] { }