if -exx is used
...FBIde0.4.6r4\FBIde0.4.6r4\FBIDETEMP.bas(4) warning 25(1): Overflow in constant conversion
...FBIde0.4.6r4\FBIde0.4.6r4\FBIDETEMP.bas(4) warning 25(1): Overflow in constant conversion
using the example given with -exx
Tested 32 gas/gcc
Tested 64 and gas64
#cmdline "-exx"
Dim err_command_line As UByte
err_command_line = __FB_ERR__
Select Case err_command_line
Case 0
Print "No Error Checking enabled on the Command Line!"
Case 1
Print "Some Error Checking enabled on the Command Line!"
Case 3
Print "QBasic style Error Checking enabled on the Command Line!"
Case 7
Print "Extreme Error Checking enabled on the Command Line!"
Case Else
Print "Some Unknown Error level has been set!"
End Select
sleep
Ubyte is too small for __FB_ERR__
__FB_ERR__ is 287
No cases are caught.
Thanks.
But the weird value corresponding to the "-e" compiler option remains and is illogical compared to "-ex" and "-exx" (because "-ex" implies "-e", and "-exx" implies "-ex" and so "-e").
fxm wrote: ↑May 12, 2022 5:25
Thanks.
But the weird value corresponding to the "-e" compiler option remains and is illogical compared to "-ex" and "'-exx" (because "-ex" implies "-e", and "-exx" implies "-ex" and so "-e").
I agree, that's the reason I wrote "Should it be ?".
fxm wrote: ↑May 12, 2022 6:28
SARG wrote: ↑Thu May 12, 2022 0:59
Edit : __FB_ERR__ contains also information about debugging/assertion. Using -g --> 511
???
Using -exx and -g. But I suppose that now you already understand.
fxm wrote: ↑May 12, 2022 6:28
In addition, this code induces a "'Compilation failed" with "gas64":
#cmdline "-g"
I tested -g directly in the command line and no problem.
Yes, the compiler crashes if used as a preprocessor directive. I'll fix that.
- __FB_ERR__ documentation page updated.
- Only remains the weird value ('513' while '1' is expected) for the '-e' option, illogical compared to '-ex' and '-exx' (because '-ex' implies '-e', and '-exx' implies '-ex' and so '-e')
fxm wrote: ↑May 12, 2022 8:41
- Only remains the weird value ('513' while '1' is expected) for the '-e' option, illogical compared to '-ex' and '-exx' (because '-ex' implies '-e', and '-exx' implies '-ex' and so '-e')
I don't know if it was really intended.
Easy to fix/change by just removing one line.
#cmdline "-exx"
Sub evalue( fb_err_value as integer =__fb_err__)
Dim As String s(...)={"no flag enabled","errorckeck","resumeerror","extraerrchk","arrayboundchk","nullptrchk", _
"assertions","debuginfo","debug","errlocation","unwindinfo"}
If fb_err_value=0 Then Print s(0):Return
for m as long=0 to 9
if (fb_err_value And 2^m)=2^m then Print "'";s(m+1);"'"+" flag enabled"
next
End Sub
evalue()
sleep
In the documentation example, I preferred to expand the list of all the tests in the code so as not to add difficulty to understanding the use of '__FB_ERR__'.
Crash fixed.
When #cmdline -g is processed the parsing continues to the end of the current file with this parameter but as initializations of dynamic arrays were not done -> crash.
As the parsing is completly redone a second time I have asked Jeff (on Discord) why the first parsing is not immediately stopped.