Skip to content

Commit bf03add

Browse files
committed
v.help: document the new -force-bounds-checking option
1 parent 5c56909 commit bf03add

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

‎vlib/v/help/build/build.txt‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,13 @@ NB: the build flags are shared with the run command too:
112112
cases, it is preferable to not turn it off, than disable it, and have a program that may
113113
do out of bounds accesses.
114114

115+
-force-bounds-checking
116+
Programs compiled with this option, will *ALWAYS* do runtime checking of array access
117+
operations, even inside functions/methods, that were tagged with `@[direct_array_access]`.
118+
This allows for more convenient testing of modules that do use `@[direct_array_access]`,
119+
extensively (like `math.big`), without constantly edititing their source code to remove/add
120+
the tag. Note: this option overrides -no-bounds-checking .
121+
115122
-prof, -profile <file.txt>
116123
Compile the executable with all functions profiled.
117124
The profile results will be stored in `file.txt`.

0 commit comments

Comments
 (0)