See at topic:dkl wrote:Does this code use bitfields? That's the only remaining issue regarding structure layout that I know of.
http://www.freebasic.net/forum/viewtopi ... =3&t=21772
I don't find any bug report!
See at topic:dkl wrote:Does this code use bitfields? That's the only remaining issue regarding structure layout that I know of.
One example in the built documentation no longer works with fbc 1.00.0 or former fbc 0.91.0 since 2014-05-04 (the second example of Base (Initializer) before the modification done now), and perhaps some user code:changelog.txt in § [changed] wrote:- The implicitly generated copy constructors and LET overloads will now have "BYREF AS CONST MyUdt" parameters (previously they didn't use CONST), to allow copying from CONST objects to work at least for the built-in data types or with nested UDTs. For backwards compatibility, if there is a user-defined "UDT.let(byref as UDT)" LET overload, FB will still add the non-const "UDT.constructor(byref as UDT)" copy-constructor. It's still the programmer's responsibility to write proper "byref as const UDT" versions of the copy-constructor or LET overload if the UDT needs deep-copying and CONST instances of the UDT are being used.
(Also generate BYREF AS CONST versions of implicit LET overload/copyctor)
Code: Select all
Type ComplexParent
As Integer i
Declare Constructor( ByVal As Integer )
End Type
Constructor ComplexParent( ByVal i As Integer )
this.i = i
End Constructor
Type Child extends ComplexParent
Declare Constructor( )
Declare Constructor( ByRef As Child )
End Type
Constructor Child( )
'' Base UDT constructor call
Base( 1 )
End Constructor
Constructor Child( ByRef rhs As Child )
'' Base UDT constructor call
Base( rhs.i )
End Constructor
Code: Select all
Type ComplexParent
As Integer i
Declare Constructor( ByVal As Integer )
End Type
Constructor ComplexParent( ByVal i As Integer )
this.i = i
End Constructor
Type Child extends ComplexParent
End Type
Code: Select all
Type ComplexParent
As Integer i
Declare Constructor( ByVal As Integer = 0 )
End Type
Constructor ComplexParent( ByVal i As Integer = 0 )
this.i = i
End Constructor
Type Child extends ComplexParent
End Type
Code: Select all
Type ComplexParent
As Integer i
Declare Constructor( ByVal As Integer = 0 )
End Type
Constructor ComplexParent( ByVal i As Integer = 0 )
this.i = i
End Constructor
Type Child extends ComplexParent
Declare Constructor( )
Declare Constructor( ByRef As Child )
End Type
Constructor Child( )
'' Base UDT constructor call
Base( 1 )
End Constructor
Constructor Child( ByRef rhs As Child )
'' Base UDT constructor call
Base( rhs.i )
End Constructor
Do you build a new fbc ARM version ?TJF wrote:...But when I try to compile the fb-doc code I get a similar error as we had with the ARM version...
... made one some weeks ago. dkl fixed the sources. It's easy now.D.J.Peters wrote:Do you build a new fbc ARM version ?
why do not share it for the community is in the linux section ?TJF wrote:... made one some weeks ago. dkl fixed the sources. It's easy now.
Any place is OK, IMHO. Just share your experience, so others can quickly start to help out.dkl wrote:How about we add some information to the FB documentation? I think data types are the main (only?) issue.
You can use the code form my above post. Here's the same code, but lines with undeclared types are commented outdkl wrote:By the way, could you send me your fb-doc code (or a reduced example) which triggers the -gen gcc issue? I haven't been able to reproduce it with fb-doc-0.2, but I'd like to debug and fix it.
Code: Select all
TYPE Highlighter
'* \brief The high-lighting categories
ENUM WordTypes
FB_CODE '*< Normal code, no high-lighting
FB_KEYW '*< A keyword
FB_KWTP '*< A keyword type
FB_KWFL '*< A flow keyword (currently not used)
FB_PREP '*< A preprocessor statement
FB_SYMB '*< A linked Symbol
END ENUM
AS STRING _
FbPath _ '*< The path to read FB code files from
, FbFiles _ '*< A list of all FB file names
, InPath _ '*< The path to read Doxygen files from
, DoxyFiles _'*< A list of all Doxygen file names
, HtmlPath _ '*< The path for html files
, HtmlSuff _ '*< The filename suffix for html files
, TexPath _ '*< The path for LaTeX files
, XmlPath _ '*< The path for XML files
, LastLine '*< The last line red from the input file
'AS RepData PTR Symbols '*< The list of linked symbols
'AS Parser PTR Pars '*< The parser to operate with
AS ZSTRING PTR _
FBDOC_MARK = @"<!-- Syntax-highlighting by fb-doc -->" _ '*< Text to mark the output
, KEYW_A = @"<span class=""keyword"">" _ '*< Code to start highlighting a keyword
, KWTP_A = @"<span class=""keywordtype"">" _ '*< Code to start highlighting a keywordtype
, KWFL_A = @"<span class=""keywordflow"">" _ '*< Code to start highlighting a flow keyword (not used yet)
, PREP_A = @"<span class=""preprocessor"">" _ '*< Code to start highlighting a preprocessor statement
, CMNT_A = @"<span class=""comment"">" _ '*< Code to start highlighting a comment
, SPAN_E = @"</span>" _ '*< Code to end highlighting
, QUOT_A = @"<span class=""stringliteral"">"" _ '*< Code to start highlighting a string literal
, QUOT_E = @""</span>" '*< Code to end highlighting a string literal
AS INTEGER _
Ifnr _ '*< The file number for input
, LineNo '*< The current line number
UNION
TYPE
AS INTEGER _
GenHtml : 1 _ '*< Flag for html output
, GenTex : 1 _ '*< Flag for LaTeX output
, GenXml : 1 '*< Flag for XML output
END TYPE
AS INTEGER GenAny '*< All output flags
END UNION
DECLARE CONSTRUCTOR()
'DECLARE CONSTRUCTOR(BYVAL AS Parser PTR)
DECLARE SUB doDoxy(BYREF AS STRING)
DECLARE SUB do_files()
DECLARE STATIC FUNCTION prepare_tex(BYVAL AS Highlighter PTR) AS STRING
DECLARE STATIC FUNCTION prepare_xml(BYVAL AS Highlighter PTR) AS STRING
DECLARE STATIC FUNCTION prepare_html(BYVAL AS Highlighter PTR) AS STRING
DECLARE SUB generate_all(BYVAL AS ZSTRING PTR, BYVAL AS INTEGER)
DECLARE FUNCTION generate_code(BYVAL AS ZSTRING PTR, BYVAL AS INTEGER, BYVAL AS INTEGER) AS STRING
DECLARE FUNCTION word_type(BYREF AS STRING) AS ZSTRING PTR
'* \brief the function called to end a line and start a new one
'eol AS FUNCTION(BYVAL AS RepData PTR, BYref AS INTEGER) AS STRING _
'= @html_eol()
'* \brief the function called to extract links from original files
prepare AS FUNCTION(BYVAL AS Highlighter PTR) AS STRING _
= @prepare_html()
'* \brief the function called for normal code to replace special characters
'special_chars AS FUNCTION(BYVAL AS UBYTE PTR, BYVAL AS INTEGER, BYVAL AS INTEGER) AS STRING _
'= @html_specials()
END TYPE
Code: Select all
...
UNION
TYPE
AS UBYTE _
GenHtml _ '*< Flag for html output
, GenTex _ '*< Flag for LaTeX output
, GenXml '*< Flag for XML output
END TYPE
AS INTEGER GenAny '*< All output flags
END UNION
...
Version 1.00.0 released:fxm wrote:Why not do this following for the new add-on?dkl wrote:The FB-win32-gcc-4.7.3 package was for FB 0.90, and I do not intend to update it. It's possible that it still works even with the gcc 4.9 libraries, I didn't test it though. Same goes for the external library builds - it's too much work for me.
Self build the [FB-win32-gcc-4.9.1] package from i686-4.9.1-release-win32-sjlj-rt_v3-rev0.7z :Code: Select all
[FB-win32-gcc-4.9.1] package: \bin \libexec \gcc \i686-w64-mingw32 \4.9.1 cc1.exe <- from: [i686-4.9.1-release-win32-sjlj-rt_v3-rev0] \mingw32\libexec\gcc\i686-w64-mingw32\4.9.1 \win32 gcc.exe <- from: [i686-4.9.1-release-win32-sjlj-rt_v3-rev0.7z] \mingw32\bin
Code: Select all
'fb < .91 -- OK
'> .91 ???
Screen 13
dim as string fill
fill="P 1,2"
dim as string s="BM 50,50" &"C2" &"R50 D30 L50 U30" &"BM +1,1" &("X" & varptr(fill))
draw s
sleep