Skip to content

Commit db0b834

Browse files
committed
fbdoc: wiki snapshot 2019-07-13
1 parent e5f4728 commit db0b834

14 files changed

+182
-15
lines changed

doc/manual/cache/CatPgCompOpt.wakka

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,22 @@ Command line compiler options for the fbc compiler:
2323
- Create a DLL, including the import library
2424
{{fbdoc item="keyword" value="CompilerOpte|-e"}}
2525
- Add error checking
26+
{{fbdoc item="keyword" value="CompilerOptearray|-earray"}}
27+
- Enable array bounds checking
28+
{{fbdoc item="keyword" value="CompilerOpteassert|-eassert"}}
29+
- Enable assert() and assertwarn() checking
30+
{{fbdoc item="keyword" value="CompilerOptedebug|-edebug"}}
31+
- Enable ##[[KeyPgDdfbdebug|__FB_DEBUG__]]##
32+
{{fbdoc item="keyword" value="CompilerOptedebuginfo|-edebuginfo"}}
33+
- Add debug information
34+
{{fbdoc item="keyword" value="CompilerOptelocation|-elocation"}}
35+
- Enable full error location reporting
36+
{{fbdoc item="keyword" value="CompilerOptenullptr|-enullptr"}}
37+
- Enable null-pointer checking
2638
{{fbdoc item="keyword" value="CompilerOptex|-ex"}}
2739
- Add error checking with RESUME support
2840
{{fbdoc item="keyword" value="CompilerOptexx|-exx"}}
29-
- Same as -ex, plus array bounds and non-null-pointer checking
41+
- Same as -ex, plus array bounds, null-pointer, and error location reporting
3042
{{fbdoc item="keyword" value="CompilerOptexport|-export"}}
3143
- Export symbols for dynamic linkage
3244
{{fbdoc item="keyword" value="CompilerOptforcelang|-forcelang <name>"}}
@@ -36,7 +48,7 @@ Command line compiler options for the fbc compiler:
3648
{{fbdoc item="keyword" value="CompilerOptfpu|-fpu < type >"}}
3749
- Set the floating point arithmetics unit (default: FPU)
3850
{{fbdoc item="keyword" value="CompilerOptg|-g"}}
39-
- Add debug info
51+
- Add debug info, enable""##__FB_DEBUG__##"", and enable asserts
4052
{{fbdoc item="keyword" value="CompilerOptgen|-gen < backend >"}}
4153
- Sets the compiler backend (default is 'gas')
4254
{{fbdoc item="keyword" value="CompilerOpti|-i < name >"}}

doc/manual/cache/CompilerCmdLine.wakka

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ Using the **fbc** command-line.
7272
=={{fbdoc item="keyword" value="CompilerOptex|-ex"}}==
7373
Add error checking with RESUME support
7474
=={{fbdoc item="keyword" value="CompilerOptexx|-exx"}}==
75-
Same as ##-ex##, plus array bounds and non-null-pointer checking
75+
Same as ##-ex##, plus array bounds, null-pointer, and error location reporting
7676
=={{fbdoc item="keyword" value="CompilerOptWa|-Wa < opt >"}}==
7777
Pass options to GAS (separated by commas)
7878
=={{fbdoc item="keyword" value="CompilerOptWc|-Wc < opt >"}}==
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{{fbdoc item="title" value="Compiler Option: -earray"}}----
2+
Enable array bounds checking
3+
4+
{{fbdoc item="syntax"}}##
5+
**-earray**
6+
##
7+
{{fbdoc item="desc"}}
8+
Add array bounds error checking in generated run-time code. A run-time error is generated if an array index attempts to access an array element that is outside the bounds of the array.
9+
10+
##**-earray**## is automatically implied by the ##[[CompilerOptexx|-exx]]## option.
11+
12+
##[[KeyPgDdfberr|__FB_ERR__]]## can be used to determine in user source code if the ##**-earray**## option was specified or implied on the command line.
13+
14+
{{fbdoc item="see"}}
15+
- ##[[KeyPgDdfberr|__FB_ERR__]]##
16+
- [[CompilerOptexx|Compiler Option: -exx]]
17+
- [[ProPgErrorHandling|Error Handling]]
18+
- [[CompilerCmdLine|Using the Command Line]]
19+
20+
{{fbdoc item="back" value="CatPgCompOpt|Compiler Options"}}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{{fbdoc item="title" value="Compiler Option: -eassert"}}----
2+
Enable ##assert()## and ##assertwarn()## checking
3+
4+
{{fbdoc item="syntax"}}##
5+
**-eassert**
6+
##
7+
{{fbdoc item="desc"}}
8+
The ##-eassert## compiler option enables ##[[KeyPgAssert|Assert]]## and ##[[KeyPgAssertwarn|AssertWarn]]## code generation.
9+
10+
##**-eassert**## is automatically implied by the ##[[CompilerOptg|-g]]## option.
11+
12+
##[[KeyPgDdfberr|__FB_ERR__]]## can be used to determine in user source code if the ##**-eassert**## option was specified or implied on the command line.
13+
14+
{{fbdoc item="see"}}
15+
- ##[[KeyPgDdfberr|__FB_ERR__]]##
16+
- ##[[KeyPgAssert|Assert]]##
17+
- ##[[KeyPgAssertwarn|AssertWarn]]##
18+
- [[CompilerOptg|Compiler Option: -g]]
19+
- [[DebuggerRunning|Debugging]]
20+
- [[CompilerCmdLine|Using the Command Line]]
21+
22+
{{fbdoc item="back" value="CatPgCompOpt|Compiler Options"}}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{{fbdoc item="title" value="Compiler Option: -edebug"}}----
2+
Enable ##""__FB_DEBUG__""##
3+
4+
{{fbdoc item="syntax"}}##
5+
**-edebug**
6+
##
7+
{{fbdoc item="desc"}}
8+
The ##**-edebug**## compiler option defines the intrinsic macro ##[[KeyPgDdfbdebug|__FB_DEBUG__]]## to enable user debug code.
9+
10+
The intrinsic macro ##[[KeyPgDdfbdebug|__FB_DEBUG__]]## is set to non-zero (-1) if the option was specified, and set to zero (0) otherwise.
11+
12+
##**-edebug**## is automatically implied by the ##[[CompilerOptg|-g]]## option.
13+
14+
##[[KeyPgDdfberr|__FB_ERR__]]## can be used to determine in user source code if the ##**-edebug**## option was specified or implied on the command line.
15+
16+
{{fbdoc item="see"}}
17+
- ##[[KeyPgDdfbdebug|__FB_DEBUG__]]##
18+
- ##[[KeyPgDdfberr|__FB_ERR__]]##
19+
- [[CompilerOpteassert|Compiler Option: -eassert]]
20+
- [[CompilerOptedebuginfo|Compiler Option: -debuginfo]]
21+
- [[CompilerOptg|Compiler Option: -g]]
22+
- [[DebuggerRunning|Debugging]]
23+
- [[CompilerCmdLine|Using the Command Line]]
24+
25+
{{fbdoc item="back" value="CatPgCompOpt|Compiler Options"}}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{{fbdoc item="title" value="Compiler Option: -edebuginfo"}}----
2+
Add debug information
3+
4+
{{fbdoc item="syntax"}}##
5+
**-edebuginfo**
6+
##
7+
{{fbdoc item="desc"}}
8+
The ##**-edebuginfo**## compiler inserts debugging symbols into output files, to use with GDB-compatible debuggers.
9+
10+
##**-edebuginfo**## is automatically implied by the ##[[CompilerOptg|-g]]## option.
11+
12+
##[[KeyPgDdfberr|__FB_ERR__]]## can be used to determine in user source code if the ##**-edebugingo**## option was specified or implied on the command line.
13+
14+
{{fbdoc item="see"}}
15+
- ##[[KeyPgDdfberr|__FB_ERR__]]##
16+
- [[CompilerOptg|Compiler Option: -g]]
17+
- [[DebuggerRunning|Debugging]]
18+
- [[CompilerCmdLine|Using the Command Line]]
19+
20+
{{fbdoc item="back" value="CatPgCompOpt|Compiler Options"}}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{{fbdoc item="title" value="Compiler Option: -elocation"}}----
2+
Enable full error location reporting
3+
4+
{{fbdoc item="syntax"}}##
5+
**-elocation**
6+
##
7+
{{fbdoc item="desc"}}
8+
The ##**-elocation**## compiler option enables full location reporting in run-time code generation.
9+
10+
##**-elocation**## is automatically implied by the ##[[CompilerOptexx|-exx]]## option.
11+
12+
##[[KeyPgDdfberr|__FB_ERR__]]## can be used to determine in user source code if the ##**-elocation**## option was specified or implied on the command line.
13+
14+
//Note: the intent of this option is for a future fbc feature to optimize out some of the error tracking code associated with error location reporting. When implemented, only ##-exx## or ##-elocation## will enable the full error location reporting and will be optimized away otherwise.//
15+
16+
{{fbdoc item="see"}}
17+
- ##[[KeyPgDdfberr|__FB_ERR__]]##
18+
- [[CompilerOptexx|Compiler Option: -exx]]
19+
- [[ProPgErrorHandling|Error Handling]]
20+
- [[CompilerCmdLine|Using the Command Line]]
21+
22+
{{fbdoc item="back" value="CatPgCompOpt|Compiler Options"}}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{{fbdoc item="title" value="Compiler Option: -enullptr"}}----
2+
Enable null-pointer checking
3+
4+
{{fbdoc item="syntax"}}##
5+
**-enullptr**
6+
##
7+
{{fbdoc item="desc"}}
8+
The ##-enullptr## compiler option enables null-pointer error checking in run-time code generation. A run-time error is generated if an attempt is made to dereference a null-pointer to a value, or call a null function pointer.
9+
10+
##**-enullptr**## is automatically implied by the ##[[CompilerOptexx|-exx]]## option.
11+
12+
##[[KeyPgDdfberr|__FB_ERR__]]## can be used to determine in user source code if the ##**-enullptr**## option was specified or implied on the command line.
13+
14+
{{fbdoc item="see"}}
15+
- ##[[KeyPgDdfberr|__FB_ERR__]]##
16+
- [[CompilerOptexx|Compiler Option: -exx]]
17+
- [[ProPgErrorHandling|Error Handling]]
18+
- [[CompilerCmdLine|Using the Command Line]]
19+
20+
{{fbdoc item="back" value="CatPgCompOpt|Compiler Options"}}

doc/manual/cache/CompilerOptexx.wakka

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,16 @@ Add error checking with ##[[KeyPgResume|Resume]]## support and array bounds and
55
**-exx**
66
##
77
{{fbdoc item="desc"}}
8-
The ##-exx## compiler option adds error checking with ##[[KeyPgResume|Resume]]## support, plus array bounds and non-null-pointer checking (including the procedure pointers).
8+
The ##**-exx**## compiler option adds error checking with ##[[KeyPgResume|Resume]]## support, plus array bounds and null-pointer checking (including the procedure pointers).
9+
10+
Use of the ##**-exx**## option automatically implies ##-e##, ##-exx##, ##-earray##, ##-elocation##, and ##-enullptr##, error checking and code generation options.
911

1012
{{fbdoc item="see"}}
1113
- ##[[KeyPgDdfberr|__FB_ERR__]]##
1214
- [[CompilerOpte|Compiler Option: -e]]
15+
- [[CompilerOptearray|Compiler Option: -earray]]
16+
- [[CompilerOptelocation|Compiler Option: -elocation]]
17+
- [[CompilerOptenullptr|Compiler Option: -enullptr]]
1318
- [[CompilerOptex|Compiler Option: -ex]]
1419
- [[ProPgErrorHandling|Error Handling]]
1520
- [[CompilerCmdLine|Using the Command Line]]

doc/manual/cache/CompilerOptg.wakka

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,28 @@
11
{{fbdoc item="title" value="Compiler Option: -g"}}----
2-
Add debug information
2+
Add debug information, define ##""__FB_DEBUG__""##, and enable asserts
33

44
{{fbdoc item="syntax"}}##
55
**-g**
66
##
77
{{fbdoc item="desc"}}
8-
The ##-g## compiler option inserts debugging symbols into output files, to use with GDB-compatible debuggers.
8+
The ##**-g**## compiler option inserts debugging symbols into output files, to use with GDB-compatible debuggers.
99

1010
The intrinsic macro ##[[KeyPgDdfbdebug|__FB_DEBUG__]]## is set to non-zero (-1) if the option was specified, and set to zero (0) otherwise.
11+
12+
##[[KeyPgAssert|Assert]]## and ##[[KeyPgAssertwarn|AssertWarn]]## macros are enabled.
13+
14+
Use of ##**-g**## automatically implies ##[[CompilerOptedebug|-edebug]]##, ##[[CompilerOptedebuginfo|-edebuginfo]]##, and ##[[CompilerOpteassert|-eassert]]##, command line options.
15+
16+
##[[KeyPgDdfberr|__FB_ERR__]]## can be used to determine in user source code if the ##**-g**## option was specified or implied on the command line.
1117

1218
{{fbdoc item="see"}}
1319
- ##[[KeyPgDdfbdebug|__FB_DEBUG__]]##
20+
- ##[[KeyPgDdfberr|__FB_ERR__]]##
21+
- ##[[KeyPgAssert|Assert]]##
22+
- ##[[KeyPgAssertwarn|AssertWarn]]##
23+
- [[CompilerOpteassert|Compiler Option: -eassert]]
24+
- [[CompilerOptedebug|Compiler Option: -debug]]
25+
- [[CompilerOptedebuginfo|Compiler Option: -debuginfo]]
1426
- [[DebuggerRunning|Debugging]]
1527
- [[CompilerCmdLine|Using the Command Line]]
1628

0 commit comments

Comments
 (0)