From 35512be1eeb4bb8d7e54242888a833f5d2c1d082 Mon Sep 17 00:00:00 2001 From: herman ten brugge Date: Thu, 12 Dec 2019 14:21:07 +0100 Subject: [PATCH] Fix typo with -ba option --- libtcc.c | 2 +- tcc.c | 2 +- tcc.h | 2 +- tccgen.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libtcc.c b/libtcc.c index 682f831e..0d58a30b 100644 --- a/libtcc.c +++ b/libtcc.c @@ -1803,7 +1803,7 @@ reparse: s->do_debug = 1; break; case TCC_OPTION_ba: - s->do_bounds_check_addres = 1; + s->do_bounds_check_address = 1; break; #endif case TCC_OPTION_g: diff --git a/tcc.c b/tcc.c index ac1aa59b..ab054bfc 100644 --- a/tcc.c +++ b/tcc.c @@ -59,7 +59,7 @@ static const char help[] = " -g generate runtime debug info\n" #ifdef CONFIG_TCC_BCHECK " -b compile with built-in memory and bounds checker (implies -g)\n" - " -ba Enable better addres checking with bounds checker\n" + " -ba Enable better address checking with bounds checker\n" #endif #ifdef CONFIG_TCC_BACKTRACE " -bt N show N callers in stack traces\n" diff --git a/tcc.h b/tcc.h index 2bccf215..127a19a9 100644 --- a/tcc.h +++ b/tcc.h @@ -720,7 +720,7 @@ struct TCCState { #ifdef CONFIG_TCC_BCHECK /* compile with built-in memory and bounds checker */ unsigned char do_bounds_check; - unsigned char do_bounds_check_addres; + unsigned char do_bounds_check_address; #endif #ifdef TCC_TARGET_ARM enum float_abi float_abi; /* float ABI of the generated code*/ diff --git a/tccgen.c b/tccgen.c index b6c35240..038a5c64 100644 --- a/tccgen.c +++ b/tccgen.c @@ -2509,7 +2509,7 @@ redo: */ /* if evaluating constant expression, no code should be generated, so no bound check */ - if (tcc_state->do_bounds_check && tcc_state->do_bounds_check_addres + if (tcc_state->do_bounds_check && tcc_state->do_bounds_check_address && !const_wanted && !nocode_wanted) { /* if bounded pointers, we generate a special code to test bounds */