I have a system that handles all the includes. All has worked well. I have several hundred functions in 20+ library sets. This way, only what is used is linked; all executables are much smaller. With all these functions pre-compiled (some are not tiny like these two) - a large set of executables will still compile very fast.
This is Linux only. I had stepped away for more than a year from working with these, but I have paid attention to what is going on here. Not that many changes.
Now: new OS load (Debian) - updated gcc, FB, etc.
The problem:gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516
FreeBASIC Compiler - Version 1.06.0 (02-17-2019), built for linux-x86_64 (64bit)
Copyright (C) 2004-2019 The FreeBASIC development team.
Code: Select all
declare sub rk_possave
declare sub rk_posrestore
sub rk_spinnerdone
' clear rk_spinner
rk_possave
locate 1,2,0
print " ";
rk_posrestore
end sub ' rk_spinnerdone
sub rk_spinner
' action flag - first line visual action cue
static as integer spinner_flag
static as double spinner_tpause
if spinner_tpause = 0 then spinner_tpause = timer
if timer - spinner_tpause < 0.18 then ' period to wait before twitch
exit sub
else
spinner_tpause = timer
end if
dim as string pstr(1 to 4)
pstr(1) = chr(92)
pstr(4) = chr(45)
pstr(3) = chr(47)
pstr(2) = chr(124)
rk_possave
locate 1,2,0 ' tiaw is at 1,1 - USUALLY only one char
spinner_flag += 1
if spinner_flag > 4 then spinner_flag = 1
print pstr(spinner_flag);
rk_posrestore
end sub ' rk_spinner
command line:
fbc -gen gcc -O 2 -lib -exx rk_spinner.bas
returns:
My results:rk_spinner.c: In function ‘RK_SPINNER’:
rk_spinner.c:101:26: warning: array subscript is below array bounds [-Warray-bounds]
*(FBSTRING**)&tmp$7$1 = (FBSTRING*)((uint8*)PSTR$1 + -24ll);
with, without -exx ONLY -- no problem
(any below, with or without -exx is the same result)
with -gen gcc ONLY -- no problem
with -gen gcc -O 0 or 1 -- no problem
with -gen gcc -O 2 or 3 -- above error message
Anyone have a hint or suggestion?
david
I have not gone through all the other libs and functions to see if any others have a similar problem. I have gone through about 60 or so and they were not a problem. I do expect to see more though.