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; } diff --git a/tests/pp/13.S b/tests/pp/13.S new file mode 100644 index 0000000..bf0b525 --- /dev/null +++ b/tests/pp/13.S @@ -0,0 +1,6 @@ +# `modelist' label. Each video mode record looks like: +#ifdef AAA +# modelist' label. Each video mode record looks like: +#endif +.text +endtext: diff --git a/tests/pp/13.expect b/tests/pp/13.expect new file mode 100644 index 0000000..3532dd7 --- /dev/null +++ b/tests/pp/13.expect @@ -0,0 +1,6 @@ +# `modelist' label. Each video mode record looks like: + + + +.text +endtext: