I got this message when testing the 0.91 version provided by MOD :
"'test.bas:16:1: error: size of array '__$fb_structsizecheck' is negative". Only with -gen gcc.
I guess there is a problem with the calculated size of the structure..... Below the complete message, the bas and C codes.
OFF TOPIC
@dkl Is it possible that you upload somewhere a 64bit exe with data debugging (dwarf 2) based on one of my test code ? That will be very helpfull for studying debugging under 64bit version.
Code: Select all
'C:\TEMP\dev\freebasic\fbc -v -g -s console -gen gcc -Wc -gdwarf-2 -R -RR "test.bas"
'FreeBASIC Compiler - Version 0.91.0 (11-10-2013) for win32
'Copyright (C) 2004-2013 The FreeBASIC development team.
'standalone
'target: win32, 486, 32bit
'compiling: test.bas -o test.c (main module)
'compiling C: C:\TEMP\dev\freebasic\bin\win32\gcc.exe -m32 -march=i486 -S -nostdlib -nostdinc -Wall -Wno-unused-label -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable -Wno-main -Werror-implicit-function-declaration -O0 -fno-strict-aliasing -frounding-math -fno-math-errno -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -g -masm=intel "test.c" -o "test.asm" -gdwarf-2
'test.bas:16:1: error: size of array '__$fb_structsizecheck' is negative
'compiling C failed: 'C:\TEMP\dev\freebasic\bin\win32\gcc.exe' terminated with exit code 1
Code: Select all
type tbitfield
flag_0 : 1 as byte
flag_1 : 1 as integer
flag_2 : 1 as integer
flag_3 : 1 as integer
flag_4 : 1 as integer
flag_5 : 1 as integer
flag_6 : 1 as integer
flag_7 : 1 as integer
flag_8 : 1 as integer
flag_9 : 1 as integer
inter as integer
flag_A : 3 as byte
end Type
Dim vbf As tbitfield
vbf.flag_1=1:vbf.flag_9=1:vbf.inter=12345:vbf.flag_A=5
Code: Select all
struct $9TBITFIELD {
int8 FLAG_0;
int32 FLAG_8;
int32 INTER;
int8 FLAG_A;
};
#define __FB_STATIC_ASSERT( expr ) extern int __$fb_structsizecheck[(expr) ? 1 : -1]
#line 16 "test.bas"
__FB_STATIC_ASSERT( sizeof( struct $9TBITFIELD ) == 12 );