aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tccpp.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/tccpp.c b/tccpp.c
index 718401d..024f9de 100644
--- a/tccpp.c
+++ b/tccpp.c
@@ -3711,6 +3711,12 @@ ST_FUNC int tcc_preprocess(TCCState *s1)
;
define_start = define_stack;
+ /* Credits to Fabrice Bellard's initial revision to demonstrate its
+ capability to compile and run itself, provided all numbers are
+ given as decimals. tcc -E -P10 will do. */
+ if (s1->Pflag == 1 + 10)
+ parse_flags |= PARSE_FLAG_TOK_NUM, s1->Pflag = 1;
+
#ifdef PP_BENCH
/* for PP benchmarks */
do next(); while (tok != TOK_EOF); return 0;