From 16cbca281fe5d22cd3e6f548cae59d19c31d30ac Mon Sep 17 00:00:00 2001 From: seyko Date: Thu, 14 Apr 2016 21:46:46 +0300 Subject: fix preprocessing *.S with ` ' chars in #comments with a test program. Problem detected when trying to compile linux-2.4.37.9 with tcc. --- tccpp.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tccpp.c') diff --git a/tccpp.c b/tccpp.c index aa0f1ae..cb220ab 100644 --- a/tccpp.c +++ b/tccpp.c @@ -796,8 +796,10 @@ redo_start: in_warn_or_error = 1; else if (tok == TOK_LINEFEED) goto redo_start; + else if (parse_flags & PARSE_FLAG_ASM_FILE) + p = parse_line_comment(p); } else if (parse_flags & PARSE_FLAG_ASM_FILE) - p = parse_line_comment(p); + p = parse_line_comment(p); break; _default: default: @@ -2743,6 +2745,8 @@ maybe_newline: p++; break; default: + if (parse_flags & PARSE_FLAG_ASM_FILE) + goto parse_simple; tcc_error("unrecognized character \\x%02x", c); break; } -- cgit v1.3.1