Fix typo with -ba option

This commit is contained in:
herman ten brugge 2019-12-12 14:21:07 +01:00
parent 75145ddc1a
commit 35512be1ee
4 changed files with 4 additions and 4 deletions

View File

@ -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:

2
tcc.c
View File

@ -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"

2
tcc.h
View File

@ -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*/

View File

@ -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 */