From 8037a1ce39730f729b75907d0fa5691412c82e46 Mon Sep 17 00:00:00 2001 From: seyko Date: Fri, 10 Apr 2015 16:40:30 +0300 Subject: [PATCH] fix a preprocessor for .S A test program (tcc -E test.S): # .. or else we have a high. This is a test.S --- tccpp.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tccpp.c b/tccpp.c index 4d12be1..1d41d6b 100644 --- a/tccpp.c +++ b/tccpp.c @@ -2393,8 +2393,12 @@ maybe_newline: goto parse_num; } else if (c == '.') { PEEKC(c, p); - if (c != '.') - expect("'.'"); + if (c != '.') { + if ((parse_flags & PARSE_FLAG_ASM_COMMENTS) == 0) + expect("'.'"); + tok = '.'; + break; + } PEEKC(c, p); tok = TOK_DOTS; } else {