Search found 3248 matches
- Mar 29, 2024 18:36
- Forum: Sources, Examples, Tips and Tricks
- Topic: Rounding numbers
- Replies: 47
- Views: 4592
Re: Rounding numbers
@coderJeff I tried hhr suggestion and it seems that he is right, however, I don't know if there are cases where the suggested change would cause a problem. the format function is a complex beast and it seems that it's not finished, I know that it fails the tests with gcc-13.2 and up See the note in...
- Mar 29, 2024 16:05
- Forum: Community Discussion
- Topic: Freebasic 1.20.0 Development
- Replies: 228
- Views: 20615
Re: Freebasic 1.20.0 Development
For fbc version 1.20.0 only: - Can you correct the cases '2.1 pass' and '2.2 pass' at least ? (the '0' of the terminal character of zstring does not play its role of end) - Could you correct other 'NON OK' cases ('return' cases) ? - Note: Only the cases '1.1' and '1.2' are compatible with the use o...
- Mar 23, 2024 18:06
- Forum: Documentation
- Topic: SmartPointer_UDTname_ segmentation violation
- Replies: 10
- Views: 372
Re: SmartPointer_UDTname_ segmentation violation
Otherwise I had already seen another configuration which presents the same behavior: Your example is better for debugging. Thank you. I believe the logic is here: ast-node-arg.bas#L869 1) If we are passing to a byval parameter, then check if there is a constructor that would work (assumption at thi...
- Mar 23, 2024 15:56
- Forum: Documentation
- Topic: SmartPointer_UDTname_ segmentation violation
- Replies: 10
- Views: 372
Re: SmartPointer_UDTname_ segmentation violation
I will try to isolate/simplify this abnormal behavior, but it will not be immediate because the code is quite complex. Here is the shortest I found so far. Try fbc-1.10+ with 'SHOW_CHANGE = true|false'. When SHOW_CHANGE=true, fbc-1.10+ assigns the result of CAST() as ROOT ptr to a temporary variabl...
- Mar 23, 2024 14:19
- Forum: General
- Topic: -gen clang
- Replies: 56
- Views: 2215
Re: -gen clang
Thank you srvaldez & deltarho
- Mar 23, 2024 14:00
- Forum: Community Discussion
- Topic: Freebasic 1.20.0 Development
- Replies: 228
- Views: 20615
Re: Freebasic 1.20.0 Development
(to be removed in fbc version 1.20.0 ?) Seems like something could be improved here and need to investigate what is going on in the rtlib: - rtrim( string ) - rtrim( string, filter ) - rtrim( string, any filter ) The test-suite has some tests for [L|R]TRIM, however does not specifically test behavi...
- Mar 22, 2024 12:38
- Forum: Community Discussion
- Topic: Freebasic 1.20.0 Development
- Replies: 228
- Views: 20615
Re: Freebasic 1.20.0 Development
BUG #3 with new STRING*N LSET and RSET overflow the fix-len string field by always writing a null ubyte just after the last character of the fix-len string. I assume LSET and RSET have not been updated for the new STRING*N . Yes, not updated. I forget about these statements. For interest, some thin...
- Mar 15, 2024 14:01
- Forum: Community Discussion
- Topic: Freebasic 1.20.0 Development
- Replies: 228
- Views: 20615
Re: Freebasic 1.20.0 Development
It would remain to be decided whether the case 's2' declared in a UDT always generates constructor code (regardless of other member data), like the case 's3' . I would like to try keep the optimization for now even though it currently gives a more complicated rule. Ideally, the underlying implement...
- Mar 15, 2024 12:40
- Forum: Community Discussion
- Topic: Freebasic 1.20.0 Development
- Replies: 228
- Views: 20615
Re: Freebasic 1.20.0 Development
Perhaps a generalization due to the final padding with null characters on the right side of the old STRING*N (fbc version 1.10.0): (to be removed in fbc version 1.20.0 ?) Seems like something could be improved here and need to investigate what is going on in the rtlib: - rtrim( string ) - rtrim( st...
- Mar 12, 2024 0:42
- Forum: Community Discussion
- Topic: Freebasic 1.20.0 Development
- Replies: 228
- Views: 20615
Re: Freebasic 1.20.0 Development
Does anyone know the reason for this ? https://github.com/freebasic/fbc/blob/da8f14569e2786e11b3e66371f39ecf306da3663/src/rtlib/str_hskip.c#L23 /* fixed-len's are filled with null's as in PB, strip them too */ while( (--len >= 0) && (((int)*p == c) || ((int)*p == 0) ) ) --p; I think this co...
- Mar 12, 2024 0:31
- Forum: Linux
- Topic: FreeBASIC broken following OS upgrade; generates problematic .asm files...?
- Replies: 21
- Views: 1946
Re: FreeBASIC broken following OS upgrade; generates problematic .asm files...?
sed ... I believe all the other uses for "lib" are for naming output files, e.g. "lib" + "SOMENAME" + ".a", etc. I can see how would seem to work ok when producing an executable only. so definitively gcc 13 changed something. Yes, I think default is a newer s...
- Mar 10, 2024 15:38
- Forum: Linux
- Topic: FreeBASIC broken following OS upgrade; generates problematic .asm files...?
- Replies: 21
- Views: 1946
Re: FreeBASIC broken following OS upgrade; generates problematic .asm files...?
in fact I have to changed the hard coded path of the library directory The 'sed' expression is aggressive. It's going to replace "lib" -> "lib64" even in places where it should not be replaced. I think I see now (maybe): - The bootstrap package is partially compiled sources (ess...
- Mar 10, 2024 15:12
- Forum: Community Discussion
- Topic: Freebasic 1.20.0 Development
- Replies: 228
- Views: 20615
Re: Freebasic 1.20.0 Development
On this occasion, I just noticed that the following code did not trigger the following error message from the compiler: Dim As String * 20 array() Redim As String * 10 array(0) '' no error ! This seems familiar - maybe something to do with passing array arguments? but I can't quite place it. Perhap...
- Mar 09, 2024 21:50
- Forum: Linux
- Topic: FreeBASIC broken following OS upgrade; generates problematic .asm files...?
- Replies: 21
- Views: 1946
Re: FreeBASIC broken following OS upgrade; generates problematic .asm files...?
Hmm, the build process looks pretty good.
Was there a version of gcc & binutils that worked in the past?
I'm not sure what to suggest next.
Was there a version of gcc & binutils that worked in the past?
I'm not sure what to suggest next.
- Mar 09, 2024 21:18
- Forum: Community Discussion
- Topic: Freebasic 1.20.0 Development
- Replies: 228
- Views: 20615
Re: Freebasic 1.20.0 Development
But if we ensure that our starting buffer is large enough to handle the assignment, here's the expected changes for VARIABLES if string*n and zstring*n and wstring*n passed to byref as string is allowed to be modified: When the starting buffer is not large enough to handle such a assignment (passin...