with a test program. Problem detected when trying to compile linux-2.4.37.9 with tcc.
Unified · Split
| @@ -796,8 +796,10 @@ redo_start: · 795 unmodified lines | ||
| 796 | 796 | in_warn_or_error = 1; |
| 797 | 797 | else if (tok == TOK_LINEFEED) |
| 798 | 798 | goto redo_start; |
| 799 | + else if (parse_flags & PARSE_FLAG_ASM_FILE) | |
| 800 | + p = parse_line_comment(p); | |
| 799 | 801 | } else if (parse_flags & PARSE_FLAG_ASM_FILE) |
| 800 | − p = parse_line_comment(p); | |
| 802 | + p = parse_line_comment(p); | |
| 801 | 803 | break; |
| 802 | 804 | _default: |
| 803 | 805 | default: |
| @@ -2743,6 +2745,8 @@ maybe_newline: · 1939 unmodified lines | ||
| 2743 | 2745 | p++; |
| 2744 | 2746 | break; |
| 2745 | 2747 | default: |
| 2748 | + if (parse_flags & PARSE_FLAG_ASM_FILE) | |
| 2749 | + goto parse_simple; | |
| 2746 | 2750 | tcc_error("unrecognized character \\x%02x", c); |
| 2747 | 2751 | break; |
| 2748 | 2752 | } |
| @@ -0,0 +1,6 @@ | ||
| 1 | +# `modelist' label. Each video mode record looks like: | |
| 2 | +#ifdef AAA | |
| 3 | +# modelist' label. Each video mode record looks like: | |
| 4 | +#endif | |
| 5 | +.text | |
| 6 | +endtext: | |
| @@ -0,0 +1,6 @@ | ||
| 1 | +# `modelist' label. Each video mode record looks like: | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | +.text | |
| 6 | +endtext: | |