forked from freebasic/fbc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
changelog.txt
2911 lines (2721 loc) · 258 KB
/
changelog.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
Version 1.08.0
[changed]
- array descriptor contains new 'flags' field. Careful, breaks binary compatibility plus chicken-egg problem to build fbc.
- fbc '-version' reports build date in yyyy-mm-dd format (aka build date iso)
- updated SQLite headers for binding to SQLite 3.30.0 (2019-10-04)
- updated BASS headers for binding to BASS 2.4.14
- updated PostgreSQL headers for binding to PostgreSQL 12.0
- updated curl headers for binding to curl 7.66.0
- warning level for all warnings is increased by 1. Default warning level is 1. Previously, default warning level was 0 and some warnings had level of -1.
- reverted changes due sf.net #893: invalid suffixes due to '-lang fb'
- reverted changes due sf.net #832: Fix bug allowing QB style suffixes on all keywords, regardless of -lang
- suffixes in '-lang fb' reverted to fbc-1.05.0 behaviours
- sf.net #908: check visibility for overloaded operators FOR, NEXT, and STEP
- sf.net #909, #832, #866 reverted error on suffix in lang fb dialect
- sf.net #832: warn on suffixes for all built-in keywords.
- 'Suffix ignored' warning in -lang fb instead of errors
- macros with parameters can now be invoked without using parentheses around the arguments using '#macro name ? (arg)' definition syntax
- rtlib: internal fb_MemCopyClear() argument types changed to expect unsigned lengths (UINTEGER => size_t)
- rtlib: internal changes to API: fb_ArrayErase(), fb_ArrayClear(), fb_ArrayClearObj()
- rtlib: internal removal of unused / legacy functions: fb_ArrayRedim(), fb_ArrayRedimPresv()
- rtlib: internal removal of unused / legacy functions: fb_ArraySetDesc(), temporay descriptor functions and structs
[added]
- extern "rtlib": respects the parent namespace, uses default fb calling convention and C style name mangling
- array descriptor 'flags' field to track fixed length, fixed dimension, dimTb() size.
- __FB_BUILD_DATE_ISO__ intrinsic define to return fbc build date in 'yyyy-mm-dd' format
- __FB_BUILD_SHA1__ intrinsic define to return the compiler's source code commit sha-1, (if known)
- '-print sha-1' to print the compiler's source code commit sha-1, (if known)
- makefile: 'FBSHA1=1' makefile configuration option to determine the current repo commit sha-1 from git
- makefile: 'FBSHA1=some-sha-1' makefile configuration option to explicit set the repo commit sha-1
- makefile: '-d FBSHA1="some-sha-1"' compiler option to set the value of '__FB_BUILD_SHA1__' when building fbc
- rtlib: inc/file.bi:FileFlush() function, usable for file, PIPE, CONS, and ERR streams opened for BINARY, RANDOM, OUTPUT, APPEND.
- rtlib: inc/file.bi;FileSetEof() function, to adjust size of open file
- sf.net feature request #293: allow len/sizeof/typeof for UDT members without expression
- gfxlib: added Direct2D driver, preferred driver on newer systems. DirectX driver is still fallback for older systems (adeyblue)
- fbc: add builtin function fb_MemMove() alias "memmove"
- fbc: add builtin function fb_MemCopy() alias "memcpy" (was previously removed in an older version of fbc)
- ./inc/fbc-int/memory.bi - fbc API for low level memory operations allocate, callocate, reallocate, deallocate, clear, memcopy, memmove, copyclear
- '-w suffix' or '-w pedantic' command line option enabled 'Suffix ignored' warning for built-in in string functions
- __FB_UNIQUEID_PUSH__(), __FB_UNIQUEID__(), __FB_UNIQUEID_POP__(), __FB_ARG_LEFTOF__(), __FB_ARG_RIGHTOF__(), __FB_JOIN__() builtin macros
- __FB_ARG_COUNT__() builtin macro
- __FB_QUOTE__(), __FB_UNQUOTE__(), __FB_EVAL__() builtin macros
- rtlib: REDIM [PRESERVE] will generate run time error if attempting to resize static (fixed length) arrays.
- gas64 emitter for x86_64 (SARG), added '-gen gas64' command line option to select
[fixed]
- makefile: under MSYS2 (and friends), TARGET_ARCH is now identified from shell's default target architecture instead of shell's host architecture
- sf.net #904; gcc backend: pass '-Wno-format' to prevent format string errors in gcc 9.x (enabled by default with -Wall)
- sf.net #910: cast(string, variable) can cause fbc to segfault (infinite recursion), due to misplaced const & non-const casting
- sf.net #898: fbc win gfxlib DirectX driver failed to initialize on 64-bit, due to incorrect construction of DIDATAFORMAT for keyboard device (macko17)
- rtlib: potential buffer overflow in sys_getshortpath.c (macko17)
- sf.net #404: len/sizeof type parsing eats namespace prefix (namespace prefix is now preserved)
- sf.net #718: len/sizeof type parsing disambiguates between type and variable having same name
- github #205: fix rtlib realloc memory leaks in 'redim preserve' and 'fb_hGetLocaleInfo' (adeyblue)
- github #205: fix rtlib realloc memory leaks and malloc null ptrs in utf_conv.bi CharToUTF, 'WCharToUTF, UTFToChar, UTFToWChar, and related functions
- github #205: fix rtlib potential malloc null ptr access in dev file read/write methods
- default new, new[] operator (allocate) after #undef allocate caused compiler crash
- default delete, delete[] operator (deallocate) after #undef deallocate caused compiler crash
- windows GDI gfxlib driver now displays double scanline screen modes correctly (screen 2 & 8), rather than half screen (adeyblue)
- sf.net #921: gfxlib: horizontal line drawing on 8-bit image was using wrong bpp
- oGLfbGFX: opengl driver was leaking thread handle under 'screencontrol fb.SET_GL_2D_MODE, fb.OGL_2D_AUTO_SYNC'
- oGLfbGFX: prevent opengl mode and scale from changing until next mode is set
- sf.net #908: visibility / access rights of overload For/Next/Step operators not taken into account by for...next statement
- sf.net #906: #error on line 2 not reported if immediately following #error on line 1
- rtlib: ERASE - check for static (fixed length) plain, string, and object arrays passed to ERASE; clear only if array is static, and free memory if dynamic
- rtlib: allow reading/writing data larger than 2GB with GET # / PUT # [WIP]
- sf.net #882: error on REDIM udt.field(expr) if default constructor has no access
- github #246: rtlib leaks thread local data, fixed by adding TLS destructors (adeyblue)
- sf.net #918: pcopy (console) bug when copying large console buffers, windows only (adeyblue)
- github #216: function getMouse() seems broken on Win10 when using the Console Mode (screen 0), fixed by turn off the QuickEdit console mode during GetMouse (adeyblue)
Version 1.07.0
[changed]
- SADD/STRPTR(wstring) returns WSTRING PTR
- '-v' be verbose command line option affects '-help' output
- fbc aarch64 target by default maps to '-march=armv8-a' when passing options to gcc/LLVM (czsgaba)
[added]
- CVA_LIST type, CVA_START(), CVA_COPY() CVA_END(), CVA_ARG() macros will map to gcc's __builtin_va_list and __builtin_va_* macros in gcc backend
- github #133: fbc makefile supports bootstrap-minimal target to build a bootstrap fbc with only the minimal features necessary to build another fbc. (William Breathitt Gray)
- github #141: introduced '-strip'/'-nostrip' options to control symbol stripping of output files (William Breathitt Gray)
- github #141: fbc will default to stripping symbols if '-d ENABLE_STRIPALL' is passed in FBCFLAGS (William Breathitt Gray)
- github #141: makefile option 'ENABLE_STRIPALL=1' introduced to pass '-d ENABLE_STRIPALL' via FBCFLAGS (William Breathitt Gray)
- makefile: 'ENABLE_STRIPALL=1' passes '-d ENABLE_STRIPALL' via FBCFLAGS on all targets
- makefile: 'ENABLE_STRIPALL=0' disables passing '-d ENABLE_STRIPALL' via FBCFLAGS on all targets
- makefile: '-d ENABLE_STRIPALL' passed by default for dos/win32 targets when 'ENABLE_STRIPALL=0' not explicitly given
- 'TYPE udt EXTENDS Z|WSTRING' allowed to specify that UDT is a kind of Z|WSTRING
- LTRIM/RTRIM/TRIM will accept UDT as Z|WSTRING
- LCASE/UCASE will accept UDT as Z|WSTRING
- Cxxx() conversion functions will accept UDT as Z|WSTRING
- INSTR/INSTRREV will accept UDT as Z|WSTRING
- MID function will accept UDT as Z|WSTRING
- SADD/STRPTR will accept UDT as Z|WSTRING to return Z|WSTRING ptr
- LSET/RSET statements will accept UDT as Z|WSTRING
- MID statement will accept UDT as Z|WSTRING
- ASC function will accept UDT as Z|WSTRING
- STR/WSTR function will accept UDT as Z|WSTRING to return a Z|WSTRING
- SELECT statement will accept UDT as Z|WSTRING to return a Z|WSTRING
- SWAP statement will accept UDT as Z|WSTRING
- IIF function will accept UDT as Z|WSTRING
- PRINT/LPRINT/WRITE will accept UDT as Z|WSTRING
- '-earray' command line option to enable array bounds checking
- '-enullptr' command line option to enable null pointer checking
- '-eassert' command line option to enable assert() and assertwarn() checking
- '-edebug' command line option to enable __FB_DEBUG__
- '-edebuginfo' command line option to enable debug symbols
- '-elocation' command line option to enable reporting error location
- ./inc/fbc-int/array.bi - fbc internal API for array descriptor
[fixed]
- sf.net #881: C backend: support for varadic function parameters in gcc using __builtin_va_list type and related macros
- push/pop correct GL_PROJECTION matrix and GL_MODELVIEW matrix when setting up graphics screen (gothon)
- fix char & wchar concatentation. For char double byte characters (such as Chinese characters), the "wstr = char & wchar" would become "wstr = char & chrw(0) & wchar" (SkyFish)
- github #131: Fix fbc makefile bootstrap recipe race condition (William Breathitt Gray)
- sf.net #794: literal tabs in string literals miscompiled if followed by 0-9 numeric chars
- sf.net #897: length of literal wstring is miscalculated at compile time. Compile time evaluation of len(!"\u1234") was using the internal escaped string length instead of the actual codepoint length
- github #137: Final -Wl flag takes precedence over previous. fbc now passes down all options from all -Wa, -Wc, and -Wl flags (William Breathitt Gray)
- github #138: rtlib: freebsd: Fix deprecated use of VM_METER to use VM_TOTAL (William Breathitt Gray)
- sf.net #899: TRIM( wstring ) causes crash if string is single space
- sf.net #900: LTRIM( wstring, filter ) and TRIM( wstring, filter ) truncate result if filter is zero length string
- github #116: Fix optimizations in [L/R]TrimAny rtlib functions (SkyFish)
- github #145: WSTRING concat and assign buffer (&=) overrun
- sf.net #893: 'Suffixes are only valid in -lang' error message showing incorrect -lang options allowed
- fbc uses '-march=armv8-a' instead of invalid option '-march=aarch64' when passing options to gcc/LLVM (czsgaba)
- rtlib: sys/io.h incorrectly included on systems that do not provide it. It is used only for x86, x86_64 and is unnecessary for all other linux targets (armhf ,arm64, mips ....)
- SELECT CASE AS CONST checks for ranges that would produce unreasonably large jump tables (greater than 8192 entries)
- sf.net #907: global overloaded operator procs need "_Z" mangling prefix
Version 1.06.0
[changed]
- Name mangling of Integer/Long parameters was reversed on 32bit to match 64bit, so the same FB and C++ code will be compatible on both 32bit and 64bit. Integer is mangled as C++ long (except on Win64), Long is mangled as C++ int.
- Adjusted warning text for "mixed bool/nonbool operands" warning
- test-suite uses libfbcunit for unit testing framework
- SELECT CASE AS CONST respects data type and will show overflow warnings on out-of-range constants
- boolean: don't allow NEG unary op '-' on boolean data types
- All fb RTL functions are checked for CONSTness, CONST qualifiers added to fb rtlib built-in prototypes (sf.net #727)
- WSTRING can be a return type, but only for prototypes (DECLARE) and function pointers, this allows getting PROCPTR() of all fb built-in run time functions
- multiline comments are parsed in -lang fblite|qb|deprecated as in -lang fb for consistency
[added]
- Name mangling of Long parameters on Win64 are mangled to C++ int by default and to C++ long with a modifier in the form 'as [u]long alias "long"'. The data type size is still 32bit but allows calling external C++ library expecting a C++ long.
- -noobjinfo option to disable the writing/reading of compile-time library and other linking options from/to .o and .a files. This also disables the use of fbextra.x (the supplemental linker script) for discarding the .fbctinf sections, which is useful when using the gold linker that doesn't support this kind of linker script.
- Linux console Inkey() now recognizes F11 and F12
- 2D render through OpenGL on Windows and Linux via screencontrol (angros47)
- Windows API binding updated to additionally support _WIN32_WINNT &h0501, &h0600, &h0601
- Under X11, ScreenControl GET_WINDOW_HANDLE places the Display ptr in param2
- Updated bindings: SDL2 2.0.6, SDL2_image 2.0.1, SDL2_mixer 2.0.1, SDL2_net 2.0.1, SDL2_ttf 2.0.14
- allow overload operator SQR()
- allow [static] shared byref variables to be initialized with byref variable
- warning '-w constness' to enable 'CONST qualifier discarded' warning on command line
- #pragma constness to enable/disable 'CONST qualifier discarded' warning in source code
[fixed]
- win/d3dx9.bi no longer has a hard-coded #inclib "d3dx9d". d3dx9d.dll is apparently not a generally valid choice. In practice programs have to be linked against d3dx9_33.dll or d3dx9_39.dll, etc.
- #816: The ASM backend contained a bad assert() which could be triggered in debug builds of the compiler, when generating code for certain array accesses
- C backend: undefined behaviour (inherited from C) in case of signed integer overflow
- C backend: undefined behaviour (inherited from C) in case of SHL/SHR operations with a shift amount >= the bitsize of the shifted operand in bits (if the shift amount wasn't a compile-time constant)
- utf_conv.bi: When given a NULL destination buffer, no-op conversions (UTF16 => UTF16 or UTF32 => UTF32) didn't allocate a new buffer, but just returned the source buffer, violating the contract used for proper conversions (which allocate a new buffer if a NULL destination is passed).
- utf_conv.bi: In UTF8 => UTF16/32 and UTF32 => UTF16 conversions, strings longer than 8 chars could be truncated
- #797: False-positive warnings when mixing booleans with comparisons in logic operations
- TRE binding: Didn't compile with TRE_USE_SYSTEM_REGEX_H
- LLVM backend: Emit the new (LLVM 3.7+) load-syntax
- When compiling .rc files with windres instead of GoRC (happens with non-standalone fbc), the current directory is now an include search directory, to match the GoRC behaviour.
- #659: Keep the stack 16-byte aligned on linux-x86 and darwin-x86 to comply with ABI; fixes crashes when external libraries use SSE
- On Windows, FB console input treated multiple repeated keypresses that were merged into one event by the system as a single keypress
- Accesses to 64bit bitfields could be miscompiled or trigger a compiler crash
- #732: Virtual destructors couldn't be called on const objects
- #790: Windows API and X11 bindings: Fixed some macros where macro parameters conflicted with other identifiers or FB keywords used in the macro body
- boolean initializer values for global or static variables were not emitted properly
- Compiler crash after reporting error about REDIM on a fixed-size array field
- #827: Using the GNU gold linker (instead of ld.bfd) resulted in broken binaries due to fbextra.x, which fbc uses with ld.bfd to discard the objinfo .fbctinf sections, but is not supported by gold. Now when gold is detected, fbextra.x won't be used anymore, in order to get working binaries.
- exec() on Linux & co was broken with regards to spaces in the executable path. Spaces were converted to "\ " and then to "/ ", resulting in a different path than given.
- ASM backend: Fixed a compiler crash or potentially bad code generation in complex floating point expressions (which had enough operands to use up the x86 FPU stack, and trigger spilling of st() registers to stack)
- C backend: Pointer arithmetic on the address of variables with any pointer type gave wrong results due to bad code generation in -gen gcc for this case.
- LLVM backend: Self-BOP emitting, byref var/param accesses
- #837: Compiler hang (or assertion triggered, if enabled) for Select Case As Const with Case -1
- ASM backend: Invalid code generated for Select Case As Const jump table index when 64bit fbc cross-compiles to 32bit
- #836: The MyUdt() syntax for creating temporary objects allowed creating objects of Abstract types (with unimplemented Abstract methods)
- WString conversions from UTF32 to UTF16 produced incorrect high surrogate values (affected conversion from UTF32 to Windows WString, and from Linux WString to UTF16)
- Conversion from UTF32 to Windows WString behaved differently from other UTF32 to UTF16 conversions in FB with regards to truncating surrogate pairs when the destination buffer is full
- #839: Wstring constants could be allocated with the wrong size when cross-compiling, leading to compiler errors and/or incorrect code generation
- WCHR would produce garbage if evaluated with constant values above &h3ffff (any value up to &hffffffffU is allowed)
- WCHR would give the wrong result if given large number of arguments which were large constants
- #846: Fix compiler crash on global variable initializer with type<T>(...) expression where T isn't a UDT
- #847: Windows API binding: Fixed winnt.bi SECURITY_*_AUTHORITY initializers
- #851: '#LINE line filename' only changed the source filename in error messages, not in debug info
- #857: PAINT used in a VIEWport and without delimitation border induces segmentation violation when ending code
- #832: Fix bug allowing QB style suffixes on all keywords, regardless of -lang
- #841: The unary negation operator gave different result signedness when used on constant instead of non-constant expression. Now the result is always signed.
- Incorrect C++ mangling for BYREF parameters using built-in types
- #844: Fix bug in -gen gcc due to duplicated type (struct) names in the main module and global namespace
- #875: Fix bug where boolean variable to single/double conversion gives wrong sign on -gen gas -fpu x87 & sse
- #872: Fix broken boolean bitfield runtime assignments from unsigned values
- #876: ThreadCall does not support subroutine with [U]Long type parameter
- #877: fix SLEEP behaviour in linux console and wait for key presses, and do not affect input buffer. Match linux SLEEP to behaviour on Windows.
- Fixed inline asm procedure name mangling bug (missing underscore prefix) with -gen gcc -asm intel on dos/win32
- #878: Fix fbc-64bit hangs on 'Case True' + 'Case False' inside 'Select Case As const'
- Fix SELECT CASE AS CONST to allow both signed & unsigned case range values
- #822, #814, #842: Compiler crash when initializing static/shared reference (DIM SHARED/STATIC BYREF) with non-constant initializer (e.g. another reference, or dynamic array element)
- ASM backend: Fix bad code generated for comparisons such as IF @globalvar = 0 THEN
- #884: FORMATing dates can deadlock under Unix
- #890: Fix Bad @N stdcall suffix for non-trivial byval type parameters with -gen gcc
- #642, #886: CASTs involving CONST qualifiers solved out too early allowing invalid statements to be compiled
- #801: *@(expr) solved to (expr) did not cleanly remove null ptr checks allowing invalid datatype assignment with -exx. *PTRCHK(@expr) solves to (expr).
- #880: Overload binary operators now support covariant arguments, overloaded procedure resolution changed especially with respect to CONST and non-CONST parameters
- Fix for debugging lines in include files but not in procedures. Filename debugging information added for module level statements in included files.
- #699: fix new[0] causing infinite loop when calling constructor/destructor list
- #883: when mapping 32 & 64 bit functions for PALETTE [GET] USING, check the data type pointed to and choose one of LONG PTR, LONGINT PTR, INTEGER PTR
- #866: fbc was throwing lexer errors in comments stating with $. Comments are lexed for directives; allow suffixes in comments
- #858: C backend: fix internal structure size mismatch due to wrong padding when nesting packed structures
- C backend: fix array descriptor mangling to avoid naming conflicts where array data types differ only by const
- #823: Function overload resolution for [const] array() and passing non-const array argument to const array parameter
- Github #113: When a WINDOW was active, the top/right edges (bottom/right for WINDOW SCREEN) were transformed out of the viewport.
Version 1.05.0
[changed]
[added]
[fixed]
- 0.90.0 regression: Self-op optimizations stopped handling some cases and should now work again, for example: optimizing A=A+1 => A+=1 where A is a Long, should give nice ASM code with -gen gas again
- When Dim'ing an Extern variable, the Byref attribute was not checked - neither required nor disallowed - now the Dim must match the Extern with regards to Byref too.
- Type<Foo>(...) expressions couldn't be used at the begin of a statement (because the Type keyword was treated as begin of a Type declaration)
- FileAttr() was still broken for 64bit - the result value was truncated to 32bit
- 1.04.0 regression: Under -gen gcc -asm att, support for gcc-style inline asm was broken
- ld was warning about unsupported linker options on OS X
- BYREF fixed-length strings (e.g. BYREF myParameter AS ZSTRING * 10) now trigger a compiler error since they are unsupported
- #print typeof() output now differentiates between ZSTRING and ZSTRING * N (ZSTRING without size is produced by dereferencing a ZSTRING PTR, or BYREF AS ZSTRING)
- Context-specific keywords, e.g. graphics PUT modes, must now be given as keywords (e.g. PSET), string literals (e.g. "PSET") are no longer accepted.
- Wstring-to-Zstring conversions didn't use the system's Unicode <-> codepage conversion function, and only converted ASCII characters. Now it will try to convert the Unicode chars to codepage chars.
- Compiler crash during error recovery when there was an error when parsing the argument expression for a BYREF AS ANY parameter
- 1.04.0 regression: Get# for WStrings was incorrectly changed to convert the loaded bytes to wstring characters, like Input# would do. Now it's changed back to just loading the raw bytes into the wstring, which is also how Get# works for other datatypes.
- 1.04.0 regression: Due to the Get# wstring breakage, the compiler failed to read source files encoded in UTF16LE with BOM on Windows, and UTF32LE with BOM on Linux.
- Eof() could incorrectly return TRUE too early on Windows, when reading a big text file with LF line endings, OPENed FOR INPUT (text mode)
- Line's styled/pattern drawing support was broken on non-x86 systems
Version 1.04.0
[changed]
- FileAttr() now returns an Integer instead of a Long, and now supports returning OS handles on 64bit
- #750: The gfxlib is now cleaned-up by END (which also happens automatically at the end of the implicit main function), instead of the FB runtime's global destructor. This should fix the "hang on exit on Windows 10" issues. The reason is that the gfxlib clean-up needs to wait for the background thread to exit, which cannot safely be done in a global destructor on Windows, due to the loader lock. This means it is definitely not safe anymore to use FB graphics commands during global variable destructors or module-level destructors.
- Windows API binding: The BOOLEAN typedef has been renamed to WINBOOLEAN due to the addition of built-in Boolean type to FB. You can #undef Boolean before #including windows.bi to get the Windows API BOOLEAN typedef again.
- Many bindings now declare CTRUE (1) instead of TRUE (1), to avoid conflicting with the new built-in True (-1) keyword. You can #undef True before #including them to get their old TRUE (1) again.
- On 64bit, but not -lang qb, integer number literals > 32bit now default to being Integers instead of LongInts, since 64bit Integers are the default type on 64bit. This only makes a difference for overload resolution and typeof(). No changes on 32bit or -lang qb.
- #738: Operator overloading: The overload resolution is now a bit more permissive with regards to CONSTness; for example non-const UDT objects can be passed to Byref As Const UDT parameters, regardless of the other argument/parameter (if it's a binary operator). Previously this was disallowed (though only sometimes, due to a separate issue).
- #756: Val() no longer recognizes 0x or 0X prefixes for hexadecimal values. &h or &H should be used instead. Previously it was only "supported" accidentally, and could produce wrong values (all d's turned into e's in the string before the conversion).
[added]
- BOOLEAN data type (compatible to GCC C++). Logic operations involving boolean operands also return a boolean.
- TRUE/FALSE built-in constants (programs may still declare them manually, but a warning will be shown)
- CBOOL()
- Boolean support for PRINT, INPUT, DATA, WRITE etc. Booleans are represented as "true"/"false" strings (case-insensitive).
- DIM|VAR BYREF id AS datatype, for creating local references to other objects, similar to BYREF parameters
- exepath() now works on FreeBSD, NetBSD, Darwin and Solaris
- The FB gfxlib can now be built on OS X using XQuartz by passing ENABLE_XQUARTZ=1 to make
- Redundant float constant declarations are now also allowed
- Updated Mesa OpenGL binding to 10.6.4
- Updated Windows API binding to MinGW-w64 4.0.4
- Updated IUP binding to 3.15
- Updated CD binding to 5.8.2
- Updated FreeType binding to 2.6
- Updated Lua binding to 5.3.1
- Updated LLVM/clang bindings to 3.6.2
- Updated some CRT/glibc bindings to glibc 2.22
- Updated curl binding to 7.44.0
- Updated libffi binding to 3.2.1
- Updated libpng bindings to 1.5.23 and 1.6.18
- Updated libzip binding to 1.0.1
- New binding for libxcb 1.11
- crt/limits.bi now declares FLT_MIN and DBL_MIN
- Updated cgi-util binding to 2.2.1, with 64bit support
- New binding for Chipmunk 7.0.1, with 64bit support
- New binding for cryptlib (cl343_beta), with 64bit support
- New binding for DevIL 1.7.8, with 64bit support
- New disphelper binding
- New binding for Expat 2.1.0, with 64bit support
- New binding for FLite 2.0.0, with 64bit support
- New binding for FreeImage 3.17.0, with 64bit support
- New binding for GD 2.1.1, with 64bit support
- New binding for GDBM 1.11, with 64bit support
- New binding for GDSL 1.8, with 64bit support
- New binding for gif_lib 4.2.3 and 5.1.1, with 64bit support
- New binding for GMP 6.0.0, with 64bit support
- New binding for GRX 2.4.9, with 64bit support
- New binding for GSL 1.16, with 64bit support
- New binding for IM 3.9.1, with 64bit support
- Updated glib binding to 2.44.1
- Updated GTK+ binding to 2.24.28 and 3.16.6
- Updated ATK binding to 2.16.0
- New binding for jpeglib 6b, 7, 8, 9a, with 64bit support
- New binding for json-c 0.12, with 64bit support
- New binding for libxml2 2.9.2 and libxslt 1.1.28, with 64bit support
- New binding for liblzma from xz 5.2.1, with 64bit support
- New binding for LZO 2.09, with 64bit support
- New binding for MediaInfo 0.7.77, with 64bit support
- New binding for libmodplug 0.8.8.5, with 64bit support
- New binding for libmpg123 1.22.4, with 64bit support
- New binding for Mini-XML 2.9, with 64bit support
- New bindings for SQLite 2.8.17 and 3.8.11.1, with 64bit support
- New bindings for PCRE 8.37 and PCRE2 10.20, with 64bit support
- New binding for PostgreSQL 9.4.4, with 64bit support
- New binding for libogg 1.3.2, with 64bit support
- New binding for libvorbis 1.3.5, with 64bit support
- New binding for Newton 3.13, with 64bit support
- New binding for ODE 0.13.1, with 64bit support
- New binding for PortAudio (pa_stable_v19_20140130), with 64bit support
- New binding for libsndfile 1.0.25, with 64bit support
- New binding for libuuid (e2fsprogs-libs-1.42.13), with 64bit support
- New binding for libxmp 4.3.9, with 64bit support
- New binding for ZeroMQ 4.1.3, with 64bit support
- New binding for libVLC 2.2.1, with 64bit support
- Select Case As Const maximum allowed Cases (jump table slots) increased from 4097 to 8192
[fixed]
- False-positive "ambigious sizeof" warnings if the identifier could refer only to a type or procedure (in that case it should already be fairly clear that the type will be chosen, not the procedure, because sizeof() can't be applied to procedures at all), or if an expression such as "array(0)" is given to sizeof() (i.e. something that starts with an identifier but is followed by further tokens that clarify that it's not refering to a type)
- Adjusted "ambigious sizeof" warning message for the case when it could refer to a forward reference or a variable
- 1.03.0 regression: Compiler crash during error recovery in case a CONST declaration was a duplicate definition
- 1.02.0 regression: zlib.bi couldn't be #included behind crt.bi due to the declarations for SEEK_SET & co
- Typedefs allowed the data type or forward reference identifier to be omitted (e.g. "type T as")
- Typedefs allowed forward references named after keywords, even though no such type alias or UDT can be declared (only quirk keywords are allowed as type names, not "core" keywords though)
- #747: SPC(n) only allowed skipping into the next line, and truncated bigger values of n. Now it can skip multiple lines if n is big enough.
- IUP binding: added various missing #inclibs
- #782: C backend: inline ASM keywords were turned into references to previously declared FB variables/procedures/labels, if those were named after ASM keywords. Inline ASM keywords will now be left untouched (using the same heuristic, a list of ASM keywords, as used by the ASM backend).
- __FB_ASM__ wasn't #defined for x86_64 even though the -asm option can be used on x86_64 too
- C backend: UDTs using Field=N were emitted incorrectly (causing gcc errors), if they contained a field of type of another UDT that didn't use Field=N.
- False-positive "ambigious sizeof" warnings if the identifier could refer to a type or variable of that type (in this case the size is obviously the same, and it doesn't matter which one is used)
- C backend: Procedure pointers having a circular dependency on themselves could result in duplicate typedefs being emitted, causing gcc errors with older gcc versions.
- rtlib & gfxlib compilation was broken on NetBSD, Darwin and Solaris (header & include-path issues)
- On Darwin, linking with rtlib failed due to __fb_errmsg being discarded
- Correctly implemented fb_hGetExeName for FreeBSD, NetBSD, Darwin and Solaris (needed by gfxlib2)
- The FB makefile can now detect the OS when building on Solaris
- fbc will now pass the proper parameters to "as" on OS X
- 1.02.0 regression: NULL was declared with pointer type in updated bindings (Windows API, SDL, etc.), and is now just an integer constant again, so it can be passed to things like WPARAM/LPARAM without triggering a compiler warning.
- Open Com on Windows didn't invoke GetCommState() properly, meaning it could "randomly" fail. Also, the port was not always opened for exclusive access, even though MSDN says that is the only possibility.
- 1.03.0 regression: OpenAL binding: The ALboolean and ALCboolean typedefs were incorrectly expanded and translated as zstring in some places
- format(now(), "ttttt") now works as expected under unix-like systems
- -profile now works on win64; the compiler generated calls to "mcount" which doesn't exist on win64; it's named "_mcount" instead. (with MinGW-w64's libgmon at least)
- 1.02.0 regression: CHAR/WCHAR typedefs (and others) in the Windows API bindings were translated as zstring/wstring; they're now translated as byte/wchar_t again (and accordingly in some cases where fields/parameters use them as type and clearly don't want a zero-terminated string), to allow them to refer to a single char again.
- 1.01.0 regression: CGUI binding: InitCgui*() macros were all broken, not just InitCgui() (that was fixed before)
- GdiPlus binding: Fixed GdipMeasureCharacterRanges() declaration (wrong parameter type)
- RETURN in BYREF-result functions could erronously try to construct a result object, if the result UDT had constructor overloads taking a pointer
- LLVM backend: Accesses to fixed-length strings now use the proper types
- LLVM backend: Structs using FIELD=1 are now emitted as packed structs
- Many bindings and especially the Windows API binding now use more proper Const/Type/Extern/Sub/Function declarations instead of #defines, allowing many identifiers (such as "LoadImage" which is also a Windows API function) to be used for custom functions in namespaces, even if the file #includes windows.bi or others.
- 1.02.0 regression: Windows API binding: COM interfaces in win/shlobj.bi were missing vtable entries
- #761: crt/string.bi and win/shlwapi.bi can now be used together - they use #undefs to override each-other (e.g. strcpy() vs StrCpy()), whichever is #included last wins.
- Windows API binding: The NM_* constants from win/commctrl.bi are now adjusted to work on 64bit.
- X11 binding: X11's boolean typedef was errornously translated as string type in some places - it is now preserved, named "XBoolean", and translated as byte as intended.
- GTK+ 2 binding: GtkCurve structure was translated incorrectly (i.e. wrong sizeof())
- 1.02.0 regression: Windows API binding: The LPRGLPVOID typedef and related ones were omitted from win/dplay.bi due to a translation bug
- Windows API binding: win/GdiPlus.bi now uses the Gdiplus namespace and #inclib on 64bit too.
- The @N stdcall suffix was calculated incorrectly (i.e. it was incompatible with gcc and MSVC) for procedures with Byval non-trivial UDT or Byval String parameters.
- Static member variables using the parent UDT as their data type could be allocated incorrectly (not enough memory reserved, possible even zero memory), if they were declared above some or all fields (related to bug #649)
- C backend: References to procedures and labels are now emitted as-is, instead of using gcc's inline asm place-holders with memory reference constraints (the latter only makes sense for variables, not functions/labels)
- C backend: Inline ASM using labels (i.e. jumps) should now work, using gcc's "asm goto()" syntax
- C backend: The register clobber lists produced for inline ASM are now adjusted to the target - now x86_64 and ARM is supported (though ARM/AArch64 support is probably incomplete), no longer x86 only.
- GET# didn't work with wstrings
- Integer-only operations like AND, OR, \ and MOD converted non-integer operands to Integer, even if the other was a LongInt or UInteger. Now the conversion will use an integer type matching the integer operand (if any), to avoid truncating floating point values, and give more expected results.
- ASM backend: Cross-compiling could give different results than native compilation with regards to the choice of whether to place string literals into .data or const (e.g. .rodata) sections
- Compiling a Select Case As Const block containing a Case with a huge range of values such as <case 0 to 4294967295u> won't cause the compiler to "hang" anymore
- Select Case As Const: <CASE a TO b> now triggers a compile-time error if a > b, instead of silently doing nothing
- #784: C backend: String literals in inline ASM (containing double quotes, backslashes, etc.) were emitted into the .c code without escaping
- #777: -lang qb: Suffixed identifiers on the left-hand side of assignments were resolved by prefering global variables instead of local ones. Now local ones take priority, as in other places (e.g. expressions) and as in QB.
- #783: C backend: Run-time float-to-uint64 conversions truncated the value to int64
- #745 part 1: PRINT comma-padding could wrap into the next line too early (if the padding would move the caret beyond column width-FB_TAB_WIDTH). This happened in both console and graphics modes.
- #745 part 2: FB runtime cached the console/graphics window width but didn't update it when it got resized, this should now be fixed at least for the graphics window and Linux console window.
- #743: 1.00.0 regression: len() used on UDT with overloaded cast() operators returned the result type and value of one of these cast operators, instead of the sizeof()
- #738: Operator overloading: The overload resolution gave different results for b+a compared to a+b, if one argument/parameter differed only in CONSTness, and the other didn't.
- #746: -lang qb's Open "Pipe:<shell command>" wasn't working. Only Open "Pipe:" was accepted (but that's useless); anything else was treated as normal Open file command.
- #414: ASM backend: Bad code generated for comparisons such as IF @globalvar = @stackvar THEN ...
- C backend: Extern Import variables were not emitted and accessed correctly
Version 1.03.0
[changed]
- -print now only prints the information, and then stops the compiler
- non-standalone builds: -target <gcctarget> no longer searches libs in lib/freebasic/<gcctarget>, but rather in the normal lib/freebasic/<fbtarget> directory. I.e. the directory layout for native or cross compiling is the same, making packaging and distribution easier.
[added]
- IUP binding updated to 3.13
- #742: fbc can now use lib64/freebasic/... instead of lib/freebasic/ if built with ENABLE_LIB64=1
- -print fblibdir option
- All the recently updated bindings now have copyright/license information
- New libbzip2 binding (64bit-capable)
- New libcaca binding (64bit-capable), libcaca-0.99.beta19
- New BASS 2.4 & BASSMOD 2.0 bindings (64bit-capable)
- New OpenAL (openal-soft-1.16.0) and freealut (1.1.0) bindings (64bit-capable)
- New ASpell 0.60.6.1 binding (64bit-capable)
- New libbfd binding (64bit-capable), supporting all binutils versions from 2.16 to 2.25
- New CanvasDraw 5.8.1 binding (64bit-capable)
- Updated CGUI binding to 2.0.4 (from CGUI project's CVS)
- Redundant constant declarations (CONST A = 1 : CONST A = 1) are now allowed, just like redundant #defines
- logic operation optimization: x <> 0 => x if x is a comparison operation already, and <comparison> = 0 => <inverted-comparison>, and NOT <comparison> => <inverted-comparison>
- ASM backend: slightly better code generation: Integer operand register will be re-used as Long result registers now (and vice-versa), which is ok since this is 32bit-only
- len/sizeof/typeof will now warn if the given identifier is ambigious (i.e. if it could refer to both a type or a procedure/variable symbol), because currently the type will be preferred, which is typically unexpected, at least for len() on strings.
- crt/longdouble.bi: ARM support
- LLVM backend: global variable initializers
- LLVM backend: fixed-size array variables/fields
[fixed]
- Windows API binding: win/ntddndis.bi and win/olectlid.bi headers were missing their content (and thus, the dependencies of ntddndis were missing too)
- LLVM backend: local vars were emitted twice
- LLVM backend: the signature emitted for calls will now use the same param dtypes as in the declaration, as required by LLVM
- LLVM backend: self-BOPs, and the self negation UOP, weren't working
- LLVM backend: field accesses, pointer derefs, global var accesses, with or without offsets, were mostly broken
- LLVM backend: procedure pointers weren't implemented properly
- 1.00.0 regression: compiler crash on assignments with a dereferenced constant on the left side
- 1.00.0 regression: C backend: bad code for pointer array parameter accesses (resulting in gcc error reports)
- Better error recovery after byref function result assignment type mismatch errors
- 1.01.0/1.02.0 regression: Various bindings: some macros using sizeof() were badly translated (doing sizeof((T)), which doesn't compile, instead of sizeof(T))
- Various bindings: macros whose body is a scope block with just one statement are now translated as single-line statements, so that they can be used with single-line IF blocks
- 1.01.0 regression: CGUI binding: InitCgui() macro was broken
- 1.01.0 regression: GLib binding: G_N_ELEMENTS() macro was broken
- Windows API binding: added #inclib "msimg32" to wingdi.bi, for using functions like GradientFill()
- C backend: Bitfields in nested anonymous Types/Unions should no longer cause __fb_struct_size errors - fbc now uses the same work-around for them as for Types with bitfields at the toplevel, i.e. such Types are emitted as byte arrays, because fbc's/gcc's bitfield layout rules differ.
- 1.02.0 regression: Windows API binding: The select() function from winsock headers is now renamed to select_() again, as before
- 1.02.0 regression: Windows API binding: opensocket/selectsocket aliases for the socket_/select_ functions were missing
- 1.02.0 regression: Windows API binding: can be used with MinGW.org again, for the most part, although some individual functions still won't work as they use MinGW-w64-specific helper functions
- Various bindings: Some trivial "inline" functions are now turned into macros; fixed some cases of missing information about renamed symbols (e.g. in SDL2 binding)
- Some built-in functions with wstring parameters (e.g. Val(), Left(), Right()) accepted integers and pointers in place of the wstring (e.g. Val(0)). This triggers an error now.
- #772: Types with the same name but in different namespaces compared as equal in #if typeof(...) = typeof(...) checks and #print typeof(...) output, because the namespace prefix was not included in textual typeof()'s result string.
- For dynamic array parameters with specified number of dimensions (e.g. <(any) as integer> instead of <() as integer>), the number of dimensions in accesses and REDIMs is now checked at compile-time, like dynamic array variables
- 1.00.0 regression: Arrays declared with unknown dimensions ("()") could no longer be accessed with inconsistent dimension counts. This is now allowed again. If precise dimension count checking is wanted, the array should be declared using the "myArray(any, any, ...)" syntax.
- 1.02.0 regression: GL/glext.bi on Windows no longer automatically #included GL/gl.bi
Version 1.02.1
[changed]
[added]
- Package name + version to all the new/updated bindings
- Windows API binding: strsafe.bi and windowsx.bi; COBJMACROS declarations (COM helper macros)
- Windows API binding updated to mingw-w64 4.0.1
- 1.01.0 regression: Allegro 4 binding didn't have #inclibs for Win32 static linking or Linux X11 libs
[fixed]
- 1.02.0 regression: win/winuser.bi: Renamed INPUT typedef to INPUT_ to avoid conflicts with the quirk keyword (due to bug #730)
- 1.02.0 regression: OpenGL binding: glGetString() and some others use ZString Ptr instead of GLubyte Ptr again
- 1.02.0 regression: Windows API binding: REFIID and some other REF* types were missing; wsprintf/wvsprintf declarations were missing; ole2.bi couldn't be included directly/alone anymore.
- bindings: Various previously untranslated (or wrongly translated) #defines in SDL2, X11, crt/pthread, Windows API
- Windows API binding: DirectX headers missed some declarations and some didn't compile, win/commdlg.bi couldn't be #included behind windows.bi without WIN_INCLUDEALL because of missing #includes; re-added the undocumented ENUMWINDOWSPROC type; shlwapi.bi #includes shlobj.bi again (for backwards compatibility), some #defines were missing (e.g. lstrcpy/lstrcat).
- crt/string.bi, crt/mem.bi: Added CONSTs to function declarations
- #767: Illegal byref result assignments will now cause a proper error message, not just a warning
- Using the -asm att|intel option for non-x86[_64] targets now triggers an error
- C backend: -masm=... will now only be passed to gcc for x86[_64] targets
- Screen didn't return an error code if it failed
- Bad code generated for temporary variable destruction in static variable initialization: temporary strings or UDTs with destructors could be destroyed before even being initialized
- "BASE.field" accesses in expressions (not at the start of a line) allowed any token behind "BASE" instead of the ".", for example "BASE : field", or even EOL.
Version 1.02.0
[changed]
- Redims with explicit type will now redim existing dynamic array fields, if one of the same name exists, instead of creating a new local array. This makes Redims with explicit type match the behaviour of typeless Redims and Redims for global arrays.
- Relaxed type checking for procedure pointers and virtual method overrides: Procedures with different signatures can now be treated equal if the signatures are compatible. For example: assignments between a function pointer returning an Integer and one returning a Long won't cause a "suspicious pointer assignment" warning on 32bit anymore.
- -asm intel is now the default for all targets/backends (i.e. the C backend no longer defaults to -asm att). This should make switching between backends less trouble-some, especially with regards to inline ASM.
- The temporary .asm/.c files generated by fbc no longer contain time/date strings. This avoids unnecessary noise (the time/date is essentially always different) when comparing .asm/.c files (e.g. to detect changes in fbc's code generation).
[added]
- __FB_ASM__ intrinsic #define on x86, defined to "intel" or "att" (corresponding to the -asm command line option -- useful for -gen gcc/llvm only)
- fbc -showincludes option (shows #include tree) for debugging of #includes
- Address-of followed by pointer-arithmetic on variables (expressions such as @x+N) will now be turned into offsetted variable accesses, resulting in better generated code
- The results of type-casted function calls can now be ignored, even if it's a non-trivial cast
- Covariant parameters and function results (feature request #289)
- Type aliases for forward-reference type aliases (e.g. "type A as A_ : type B as A" -- previously it was only allowed to alias the forward reference directly: "type A as A_ : type B as A_")
- #761: crt/mem.bi for mem*() functions, separated from crt/string.bi, to allow them to be used together with windows.bi without running into conflicts between crt/string.bi and win/shlwapi.bi
- crt/iconv.bi for using glibc's iconv on GNU/Linux
- crt/regex.bi for using glibc's regex support on GNU/Linux
- crt/pthread.bi for using glibc's pthread support on GNU/Linux
- allegro5 binding: Win32-specific #inclibs supporting the lib naming convention used by Allegro5's Win32 builds
- Bindings (new/updated, including 64bit support):
FastCGI 2.4.1-SNAP-0311112127
Windows API, based on MinGW-w64's headers; DDK not updated yet; for GdiPlus only the flat C API is updated, not the C++ part.
libpng 1.2.53, 1.4.16, 1.5.21, 1.6.16
X11, based on current X.org packages
SDL1: SDL 1.2.15, SDL_image 1.2.12, SDL_mixer 1.2.12, SDL_net 1.2.8, SDL_ttf 2.0.11, SDL_gfx 2.0.13
SDL2: SDL2 2.0.3, SDL2_image 2.0.0, SDL2_mixer 2.0.0, SDL2_net 2.0.0, SDL2_ttf 2.0.12, SDL2_gfx 1.0.1
GNU libiconv 1.14
fontconfig 2.11.1
Allegro 5.0.11
TRE 0.8.0 as tre/tre.bi and tre/regex.bi. For backwards-compatibility, the "plain" regex.bi still exists, but now just redirects to tre/regex.bi.
OpenGL, based on Mesa-3D 10.5.1 (GL/mesa/*) and MinGW-w64 3.3.0 (GL/windows/*). GL/gl.bi & co use the Windows OpenGL binding on Win32/Win64, and the Mesa binding elsewhere.
GLUT 3.7
GLFW 2.7.9 (GL/glfw.bi), 3.1.1 (GLFW/glfw3.bi)
freeglut 3.0.0
Cairo 1.14.2
FreeType 2.5.5
GLib 2.42.2
Pango 1.36.8
ATK 2.14.0
gdk-pixbuf 2.30.8
GTK+ 2.24.27, 3.14.10
GtkGLExt 1.2.0
- The FB makefile now supports "make bootstrap-dist" and "make bootstrap" commands. The former allows packaging the FB sources together with precompiled fbc sources, and the latter allows building FB using those precompiled fbc sources, which is useful on systems that don't have a working fbc yet.
[fixed]
- Potential bad code generation for dynamic array field copying
- C backend: Naked functions could end up in the .data section instead of .text
- Returning a dereferenced constant (such as <cptr(UDT ptr, 0)->field>) caused a compiler crash
- 1.00.0 regression: Bad code generation for dynamic array descriptor initialization (and potentially other cases)
- 1.00.0 regression: . member access was allowed on [] pointer indexing expressions even if the type was not an UDT, but a UDT ptr
- Some unsafe pointer assignments between ANY PTRs and non-ANY PTRs with different PTR indirection levels didn't trigger a "suspicious pointer assignment" warning (e.g. ANY PTR PTR = BYTE PTR)
- On 64bit, all number literals with '&' suffix (LONG type) triggered a "too big" warning, even if their value was not really too big.
- #765: insufficient precision on FLT_MAX / DBL_MAX constants in crt/limits.bi
- gfxlib could crash on exit, if Screen[Res] was used in a global/module constructor
- #768: View [Screen] did not clip the given viewport coordinates to the screen properly, if x1/y1 were negative
- 0.90.0 regression: Potential compiler crash with -fpu sse -fpmode fast if the program used sin/cos and contained certain global float constants (such as pi/2)
- 1.00.0 regression: Potential dead-lock in thread-safe runtime library when using file or console I/O functions from multiple threads
- binding: allegro5: Fixed compilation on win32/win64
- Compiler directory layout: The non-standalone (Linux-style) DOS build now uses include/freebas/ and lib/freebas/ if running on DOS, instead of when compiling for DOS. This allows cross-compiling from Linux (or others) to DOS to work again: If on Linux, fbc -target dos will now use the normal include/freebasic/ and lib/freebasic/ directories of the Linux compiler, instead of requiring the 8.3-compatible directories.
- Extern variables were allowed to have mismatching fixed-length string lengths in declaration and definition
- 0.90.0 regression: In -lang qb, using __offsetof() caused a compiler error
- -lang qb's __offsetof() won't truncate the offset to 16 bit anymore
- Unix rtlib: division-by-zero crash on console I/O commands such as Input, if the terminal size couldn't be queried
- Unix rtlib: memory leak in X11 keyboard input handling initialization
- rtlib/gfxlib2: memory leaks of internal thread-specific data (gfxlib's TLS data when using the thread-safe (mt) FB runtime, and all TLS data of the main thread when using the normal (non-mt) FB runtime)
- rtlib: When using Open Scrn, there could be a dangling pointer bug in the internal screen file handle
Version 1.01.0
[changed]
- On Linux/*BSD, the FB runtime will now delay using VT100 terminal escape sequences to query terminal window size and cursor position until the first use of a console I/O command (previously it was immediately done at startup, always, even if the FB program didn't use any of FB's console I/O commands)
- WITH ... END WITH blocks now have an implicit scope, like SELECT, DO ... LOOP, etc. Variables declared inside will no longer be visible outside.
- Identifier length limit increased from 64 to 128 (due to Windows API headers which contain at least one identifier with 68 chars)
[added]
- On Linux/*BSD, the FB runtime will now respect the __fb_enable_vt100_escapes global variable (also see examples/console/disable-vt100-escapes.bas). FB programs can set it to 0 (FALSE) in order to manually disable the use of hard-coded VT100-specific escape sequences by FB's console I/O commands. This can help getting FB programs to run on older terminals which don't accept these escape sequences. However, it may also cause FB's console I/O commands and functions to behave differently. For example, if the use of the escape sequence for querying cursor position is disabled, then the FB runtime will assume that the cursor starts out at position 1,1 even if that is not actually true.
- WITH compounds now also accept type<UDT>(...) and UDT(...) expressions
- Constant 0 integers can now be assigned to pointers no matter what integer type it is. Previously it didn't work with [U]LongInts on 32bit and [U]Longs on 64bit.
- Constant 0 pointers can now be assigned to any integer type. Previously this was only allowed with integer types matching the pointer size (32bit or 64bit).
- #757: It's now possible to do UDT().field instead of (UDT()).field (field accesses on anonymous UDTs with constructors)
- On 64bit, bitfields can now use the [U]LongInt type
- Bindings (new/updated, including 64bit support):
Allegro 4.4.2 (allegro.bi)
algif 1.3 (allegro/algif.bi)
alpng 1.3 (allegro/alpng.bi)
Allegro 5.0.10 (allegro5/allegro.bi, plus the addons such as allegro5/allegro_font.bi)
CGUI 2.0.3
CUnit 2.1-3
fmod.bi for the old FMOD 3.75
IUP 3.11.2
libclang 3.5.0
libcurl 7.39.0
libffi 3.1
libjit a8293e141b79c28734a3633a81a43f92f29fc2d7
libpng 1.2.51, 1.4.13, 1.5.19, 1.6.14 (#define __LIBPNG_VERSION to 12/14/15/16 to select version, default = 16)
libzip 0.11.2
LLVM-C 3.5.0
Lua 5.2.3
ncurses 5.9
PDCurses 3.4
zlib 1.2.8
crt/sys/types.bi now provides off_t on Windows, like MinGW.org and MinGW-w64
[fixed]
- 1.00.0 regression: DRAW x/y pen position was reset during X<address> subcommands, instead of being preserved and passed to/from the subcommands
- 1.00.0 regression: C backend: Bad code generated when taking the address of __FB_ARGV__, resulting in a gcc error.
- Linux/*BSD: FB programs run in the background (CTRL+Z + bg) could hang on exit due to the FB runtime triggering a SIGTTOU
- -gen gcc: Single-precision constants were being emitted with precision less than 24 bits
- 1.00.0 regression: When compiling on DOS, \ backslashes were passed to the linker as \\ causing it to fail opening the passed files
- An fixed-size array variable declared behind a dynamic array variable in the same statement (for example <DIM AS INTEGER a(), b(0 to 1)>) was accidentally made dynamic too
- 1.00.0 regression: "REDIM Foo.array()" created a new local array called "array" (ignoring the "Foo." namespace prefix) if Foo.array was an existing variable and not a declared-but-not-yet-defined EXTERN (or static member variable). This will trigger an error again now. In FB 0.90.1 the error was "duplicate definition". Now it will be "declaration outside the original namespace or class", to match the behaviour for non-array variables.
- Type-less (and dimension-less) REDIM was allowed to define EXTERN dynamic arrays, even though DIM is not allowed to be type-less for defining EXTERN variables
- 1.00.0 regression: Compiler crash after showing an error when defining a non-array EXTERN using an array declaration
- 1.00.0 regression: lhsint &= rhsint self-assignments, where the lhsint expression included a function call, didn't result in a "type mismatch" error anymore, even though the string result of the & concatenation operation couldn't be assigned back to the lhsint.
- Self-assignments will now be parsed correctly when the lhs is a call to a function with byref result and one argument, for example: f(0) += 1
- Partial fix for #740 (unsafe FB runtime signal handling code): Fixed a potential dead lock and unnecessary terminal size query in the Unix rtlib.
- 0.90.0 + 1.00.0 regressions: SELECT CASE [AS CONST], FOR, and WITH were broken if the given expression(s) contained temporary variables, for example a function call with dynamic string parameters where the passed arguments were string literals. The temporary strings or UDT objects were destructed too early, before even being initialized, causing undefined behaviour. Temporary dynamic strings were affected by the problem since FB 1.00.0. Temporary UDT objects were affected by the problem since FB 0.90.0.
- #522 (part 1): WITH destroyed temp vars before entering the block. Now they will be kept alive until END WITH (or any EXIT/RETURN/GOTO out of the WITH block).
- #522 (part 2): WITH produced bad code on Win32 when used on function call returning a small UDT (i.e. where the UDT is returned in registers)
- Win32 gfxlib2 did not process thread messages, causing problems with response to system hotkeys and potentially more
- Hiword() on 64bit didn't filter out the upper dword when given a 64bit value
- The compiler incorrectly added leading underscores to ASM symbols on Win64 and 64bit Cygwin. Leading underscores are only used by Win32, not by Win64 though.
- #744: False-positive "recursive define" error messages in some situations with multiple/consecutive/nested (but non-recursive) macro expansions in the same line
- #478: DRAW "Mx,y" was offsetting subpixel precision by 0.5, leading to rounding errors e.g. in "Pp,b"
- DRAW now draws U/E/R/F/D/G/L/H using line-drawing routines rather than pixel-by-pixel, resulting in steadier lines and much better speed
- DRAW was not unsetting the B/N qualifiers after 0-length directional commands, e.g. "R0", resulting in them being applied to the following command, e.g. DRAW "B U0D0L0R0 R10" would not draw "R10"
- Bad code was generated when initializing integer variables with a wstring-indexing expressions
- #723: LINE clipping now doesn't affect which (unclipped) pixels are plotted, eliminating rounding differences and correctly preserving the position of the style bits
- BLOAD now gives an error if it encounters a BMP file with an unknown header size
- BLOAD was misreading bitfields in BMP files with undocumented BITMAPV3HEADER format (56-byte headers)
- PRINT now disallows commas/newlines after SPC/TAB, instead of silently ignoring them
- 0.90.0 regression: Compiler crash during error recovery for expressions like 'type<UDT>().field' where initializer values are missing
- When passing a constant zero of some integer to an overloaded procedure, overloads with integer parameters will now be preferred over overloads with pointers (literal 0 can still be passed to pointer parameters in this case though, by casting it to the pointer type)
- Literal zeroes with [U]Byte or [U]Short type (or the 16bit Integer in -lang qb) can now be passed to pointer parameters of overloaded procedures (now it's possible to call Bsave() with 0 source buffer in -lang qb again -- it also was affected by this bug since FB 0.90)
- #760: RETURN and FUNCTION= couldn't be used together in byref functions returning an UDT with constructor. This check is now only applied to functions returning byval.
- #755: If no result is set in byref functions, the compiler will now show an error instead of a warning (because a byref function defaults to returning a null reference, most likely causing a crash at runtime)
- Better error message for function result assignments outside of the function (#754), and for illegal use of Exit Sub|Function|...
- #748: Static member variables in UDTs inside procedures or scope blocks were allowed without error message (but didn't and cannot fully work in this situation, like methods). The compiler will now show an error in this case.
Version 1.00.0 (former 0.91.0):
[changed]
- Platform naming conventions have changed for Linux/BSD due to 64bit/ARM support. dos/win32/xbox stay the same, win64 is added, and we use the <os>-<cpufamily> format for other systems (Linux/*BSD/Cygwin): linux-x86, linux-x86_64, linux-arm, etc. This affects the compiler's -target option, installation directory layout, release packages, compiler -v output, etc. but not any FB code.
- The normal (non-standalone) compiler now uses target-specific sub-directories in lib/freebasic/ again, for example lib/freebasic/linux-x86/, to allow libs for other targets to be installed into the same directory, for example lib/freebasic/linux-x86_64/, instead of having to use a separate directory like lib/freebasic-linux-x86_64/. Same goes for the FB makefile: the *.o files go into target-specific subdirs in src/{compiler,rtlib,gfxlib2}/obj/, to avoid trashing the source dirs with tons of separate obj-<target>/ subdirs.
- More predictable overload resolution for primitive types, preferring: the same dataclass >> a type that's at least as large >> the closest in size >> the same signedness >> the same kind >> the [U]INTEGER type
- Bin/Oct/Hex(x, digits) functions now prepend zeroes, even if it's more than the data type size, if needed to fill the result string up to the requested amount of digits
- Number literal suffixes are now followed more strictly. For example, a number with L suffix will now always be a 32bit LONG (previously it could be 32bit or 64bit, signed or unsigned, depending on the value), and the % integer suffix will always produce the FB dialect mode's default INTEGER type (INTEGER, or SHORT in -lang qb), but never a [U]LONGINT anymore.
- CONST isn't allowed/needed on constructors/destructors anymore, the non-CONST versions now work even with CONST objects. (A CONST constructor couldn't initialize the object, so it's not useful. And after a destructor runs, the object is "dead", so it doesn't matter whether the destructor modified it or not.)
- DOS rtlib no longer uses setlocale(), as FB-dos doesn't support Unicode anyways, and thus the setlocale() reference here only served to unnecessarily increase .exe size.
- #if expressions allow quirk function names to be used as literals again, so for example <#IF TYPEOF(x) = STRING> works again, instead of complaining about missing arguments in a call to the String() function.
- For dynamic arrays where the dimension count is known at the point of the declaration, fbc will now allocate array descriptors with room for only the amount of required dimensions. Descriptors with room for all of FB_MAXARRAYDIMS will only be used for dynamic arrays declared with '()' (unknown dimension count) now.
- The C++-compatible name mangling for procedures with BYDESC parameters has been adjusted to match the implementation of BYDESC parameters, and to support the new '(any[, ...])' syntax.
- #699: The default global New/New[]/Delete/Delete[] operators now simply use allocate()/deallocate() internally, instead of the functions from GCC's libsupc++. This avoids platform-dependant behaviour of the GCC functions (exception throwing, aborting) in case of allocation failure (instead, NULL will be returned as with allocate()).
- FB no longer uses libsupc++ (from GCC's libstdc++) by default
- 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.
- Function pointer types that differ only in function result CONSTness will now be seen as different, as in C++. Function pointer types that differ only in BYVAL parameter CONSTness will now be seen as being the same, as in C++.
- Some internal data structures and fields ($fb_RTTI, $fb_Object, $base, $vptr) have been renamed from $foo to foo$ to prevent gdb/STABS debugging data confusion, because a leading $ has special meaning there.
- user32 is now linked in by default when compiling for Windows (and Cygwin) as it's sometimes needed by MinGW-w64's libmingwex
[added]
- 64bit support (currently x86_64 and aarch64, based on -gen gcc): INTEGER/POINTER = 64bit, LONG = 32bit DWORD. Compiler #define: __FB_64BIT__
- -arch 32|64 options to support easy switching between 32bit and 64bit, by selecting a default arch that supports 32/64 bits respectively.
- ARM support (currently armv6|armv7-a|aarch64) based on -gen gcc. Compiler #define: __FB_ARM__
- To support non-x86 Unix shared libraries, there will now be PIC (position-independent code) versions of the FB libs for such systems: fbrt0pic.o, libfbpic.a, etc. The compiler will automatically use them when making a non-x86 Unix shared library.
- -pic option for generating position-independent code for non-x86 Unix shared libraries (automatically enabled by -dll, but must be given manually when compiling code via -c or -lib, if it will later be linked into a shared library)
- fbc -v now prints out the target system and architecture
- BYVAL AS STRING is now working properly: it now has BYVAL semantics and no longer behaves like BYREF AS ZSTRING. Modifications made by the callee are not visible to the caller, as for other BYVAL parameters. (BYVAL AS STRING is implemented by copying the string argument into a temporary STRING, whose descriptor is then passed BYREF to the procedure)
- New syntax for declaring dynamic arrays with certain amount of dimensions (but no initial bounds): DIM array(ANY) AS INTEGER (1 dimension), DIM array(ANY, ANY) AS INTEGER (2 dimensions), etc. This allows for better compile-time checking of dynamic array parameters, and also allows the compiler to allocate smaller array descriptors which is especially useful for dynamic array fields.
- Dynamic array fields are now supported in UDTs (for example: array(ANY) AS INTEGER). Similar rules as for dynamic string fields apply: Just the array descriptor is included in the UDT, not the actual array data. The UDT will become a class, and is given an implicit constructor and destructor to initialize the array descriptor, or free the data it contains. This code will also automatically be added to user-defined constructors/destructors.
- REDIM now also accepts expressions to access dynamic arrays, instead of just plain identifiers, which is needed to redim dynamic array fields, or dynamic arrays that are static member variables. For example: REDIM (this.array)(0 to 1)
- Improved multiplication/division/modulus to bitwise shift/and optimizations to handle operations with 64bit and unsigned right hand operand better
- Updated header for libzip 0.11.1
- Indexing/member dereferencing operators ([], ->) can now be applied to VARPTR/PROCPTR/STRPTR/SADD() expressions (for example: print strptr(s)[1]), instead of requiring the address expression to be wrapped in parentheses first.
- FLT_MAX and DBL_MAX to crt/limits.bi
- operator [] overloading support, for example: type MyStringClass : declare operator []( index as integer ) byref as integer : ...
- warning message when mixing signed and unsigned operands in comparisons or integer divide/MOD/SHR operations, where the signedness could change the result
- crt/long.bi, which provides the CLONG and CULONG type aliases that always match C's long and unsigned long data types (for use when making FB bindings for C libraries that use C's long data type, because 64bit FB doesn't have a built-in type that matches 64bit C's long on all platforms)
- crt/longdouble.bi, which provides a CLONGDOUBLE type that (at least in size) matches C's long double type, for use by bindings.
- Adjusted CRT headers for 64bit support
- Updated CUnit 2.1-2 headers, with 64bit support
- #macro can now also be used to #define macros without a '()' macro parameter list
- #438: Checking of parameter initializer expressions: When a parameter has a different initializer in the procedure prototype and in the procedure body, a warning will be shown now. Previously, the compiler silently ignored the initializer from the body and always used the one from the prototype.
- Taking the address of an anonymous object created by constructor call is now allowed by the compiler: @UdtWithCtor( <ctor-params...> ) It already worked for anonymous objects of UDTs without constructor: @type<UdtWithoutCtor>( ... )
- crt/linux/syslog.bi header
- GFX statements now accept UDTs as target/source images, if the UDT has cast() AS ANY PTR (or other PTR types) operator overloads
- jpeglib example now works with both fb and fblite dialects
- Any function result may now be ignored at the call site (simply by not using the function result in any expression or assignment). Previously this was only allowed for functions returning integer types or pointers.
- Thread-safe version of the FB graphics library (libfbgfxmt), used automatically if FB's threading functions are used or fbc's -mt command line option is given, just like the thread-safe version of the FB runtime library (libfbmt).
- NEW/DELETE and NEW[]/DELETE[] can now be used with the dynamic STRING data type
- ThreadDetach() function in fbthread.bi: alternative to ThreadWait() that cleans up the thread handle but does not wait for the thread to finish.
- IsRedirected() function in fbio.bi, that can be used to check whether stdin or stdout is redirected to a file or not
- Dynamic array descriptors will now always be generated with the FBARRAY.data and FBARRAY.ptr pointer fields specialized for the array's original data type, improving the -g debug info
- Len() can now be overloaded as an operator for user-defined types
- Suspicious pointer assignment warnings will now be shown for constant declarations too
- CONST can now be used to declare UDT/string/procedure pointer constants, for example: CONST p AS MyUdt PTR = 0
[fixed]
- dlltool syntax error when building a DLL without any EXPORTs
- ImageDestroy() won't crash anymore if given a NULL pointer
- The compiler didn't check ALIAS names (if given in both DECLARE prototype and procedure body) for equality
- Compiler crash after showing error for "dim shared E as E" where E is an Enum declared inside an Extern block
- Compiler crash on Explicit Enum declared inside Extern block
- #if typeof() and #print typeof() will now take the full procedure pointer type including parameters, calling convention (if non-default), etc. into account, instead of just treating everything as "FUNCTION PTR".
- #669: Compiler crash instead of error message for Static member variables declared inside anonymous UDTs
- #675: SHARED variable initializers referencing a non-SHARED STATIC from the implicit main() scope triggered an internal compiler error (dangling pointer), instead of resulting in an error message.
- Various implicitly generated variables (such as FOR/WITH/SELECT CASE temp vars) won't appear in -g stabs output anymore
- #597: Illegal ASM generated for +,-,*,/ floating point operations when the right hand-side operand was a byte or ubyte variable enclosed in a cast to double or single
- #677: Casts changing only signedness on the rhs of a +,-,*,/ floating point operation could be ignored
- Using #undef (or Option NoKeyWord) on symbols which are already in use somewhere won't cause internal compiler errors anymore: The compiler will now simply forget the symbol's identifier, so it cannot be used from input code anymore, instead of fully deleting the symbol and possibly corrupting the compiler's internal data structures.
- #671: Arguments weren't always converted to the parameters' data type, causing gcc pointer mismatch warnings under -gen gcc
- #670: Functions returning a Byref result weren't allowed to return references to elements from array parameters
- Mid() statement didn't allow some string expressions as destination, such as <Mid( *StrPtr( s ), ... ) = ...>
- The UINT_MAX from crt/limits.bi was an INTEGER instead of UINTEGER
- #defines with invalid or missing identifiers were ignored instead of causing a compiler error
- #686: Statements with lots of identifier/keyword tokens (such as procedure pointer variable declarations with 10 parameters) could cause unexpected compiler behaviour, e.g. compiler errors even though the code was good.
- The compiler allowed integer arguments to be passed to BYREF AS Z/WSTRING parameters, treating them as pointers
- #603: Optional parameters for which no arguments were given could break overload resolution. Now, overload resolution will only search for matching overloads based on the given arguments.
- Overload resolution if no arguments were given will no longer prefer a parameter-less overload over one with only optional parameters. This is now an ambigious call error, as in C++, for consistency with overload resolution with one argument given between two overloads, both with the same first parameter, and one having a second optional parameter.
- #689: Bad code generated for GET #, , array(), , bytesread (bytesread variable not passed on to fb_FileGetArrayIOB(): the last argument was completely missing)
- The compiler allowed fixed-length z/w/string variables to be initialized with integers, leading to bad code generation or runtime crashes. Now only strings should be allowed.
- #691: 0.24 regression: The compiler didn't prevent linking .so's against themselves, causing an ld error
- 0.90.0 regression: When dragging a window on Win32 with the OpenGL gfxlib2 driver, it was resized to minimum size
- #663: For virtual methods, base.method() called the overriding method, instead of the base's own method
- The Is operator (RTTI) treated UDTs with the same identifier but from different namespaces as being equal
- RTTI/Vtables inside namespaces used GCC-incompatible name mangling
- #616: Assignments between pointers and floats are now disallowed, matching the behaviour for assignments between pointers and other incompatible data types
- fbc -g generated wrong stabs definitions for UDTs whose size had to be rounded up (tail padding), preventing gdb from properly showing the content of arrays of such UDTs
- #651: Multiple cases of bad ASM code generation for expressions involving LONGINTs, observable mostly when compiled under -exx due to the additional register spilling due to calls to pointer/bound checking functions (affected -gen gas only)
- inc/win/*.bi headers: PC* and LPC* typedefs were not marked as const ptrs
- -gen gas asm error when the rhs operand to SHL/SHR is a constant value greater than 255
- C backend: Won't generate #line 0 at the top of procedures under -g anymore
- C backend: Will now generate #lines for procedure headers under -g (improved debugging support under -gen gcc)
- #703: Compiler crash after recovering from "ElseIf behind Else" error
- The Win32 gfxlib2 will now use a (more) unique name for the window class it registers to create the graphics window, to prevent issues when using multiple gfxlib2 instances in parallel in the same process.
- Non-standalone fbc builds failed with a "not found" error when having to execute compiler tools repeatedly (i.e. when compiling multiple modules instead of just one), if the tools weren't present in the same directory tree as fbc, such that fbc had to rely on the PATH environment to find them, on systems where exec() won't search the PATH (i.e. DOS/Win32)
- crt/ctype.bi: The isascii() and toascii() CRT function declarations used wrong name mangling, and on Win32 the wrong calling convention too
- crt/bits/pthreadtypes.bi: Various type aliases (including pthread_t) and UDT fields were wrong (used a 64bit integer type instead of a 32bit type like the original C header, assuming a 32bit system)
- crt/win32/process.bi: spawnvpe()'s and _spawnvpe()'s last parameter type was wrong
- #434: win/winbase.bi's RtlFillMemory() declaration was wrong (it was just an alias for memset(), but actually it should be memset() with swapped fill/length parameters)
- crt/stddef.bi: Now uses signed 32bit wchar_t for Linux, to match glibc, instead of unsigned 32bit
- crt/stdint.bi: WCHAR_MIN/WCHAR_MAX/WINT_MIN/WINT_MAX declarations were incomplete
- Debugging help: For dynamic arrays, the compiler will now always name the array descriptor symbol after the original array name
- datetime.bi: DateDiff() was declared to return a 32bit integer while the rtlib actually returns a 64bit integer
- SELECT CASE AS CONST was ignoring the upper 32 bits of 64bit integer expressions in 32bit mode
- ICE (dangling pointer) with type initializer expressions, which is known to at least cause a compiler hang during error recovery
- #705: REDIM in a procedure marked with STATIC did not create a STATIC dynamic array (on heap, preserved to next call), but only a local dynamic array (on stack)
- STATIC declarations couldn't use variables for array bounds, but only compile-time constants
- STATIC declarations ignored OPTION DYNAMIC
- zlib example tried to modify a string literal, which would cause it to crash on Linux or with -gen gcc
- The compiler could sometimes ignore casts in address-of expressions, for example "@cuint( *integerptr )" returned an INTEGER PTR instead of a UINTEGER PTR
- #699: "New Integer[-1]" or similar uses of New[] with negative size, that will wrap around to a massively huge value because the size is treated as unsigned, caused the ASM backend to try to emit GiBs of MOV instructions (one for each 4 bytes...), seemingly causing the compiler to hang.
- #696: Bad code generated for temporary variable destruction (such as temporary strings from String IIf()) used as argument to built-in statements such as Open or Draw String when -e/ex/exx error checking was enabled
- On Linux/*BSD, shell(), exec(), run(), chain(), dylibload(), dylibunload() weren't thread-safe (due to Unix rtlib's console I/O handling)
- C backend: Nested anonymous structures could be emitted incorrectly, potentially causing them to be too small, which could easily result in buffer overflows on stack due to local variables of that struct type being smaller than expected
- filecopy() (for DOS/Linux/*BSD) can now handle large files (> 2 GiB)
- Using -asm att together with the ASM backend (-gen gas) now results in an error, because it only supports -asm intel
- Uninitialized variable accessed in format()
- =Any initializer on fields didn't cause an implicit constructor to be added as for other field initializers
- UByte/UShort versions of Bin/Hex/WBin/WHex( n, digits ) functions were missing
- Miscompilation of runtime library function calls for ImageCreate(), Mki() and ThreadCall, in modules except the first when compiling multiple modules in one invocation of fbc, if -lang qb was given on the fbc command line (not as #lang "qb" in the source).
- C backend: String literal emitting now also escapes characters that would otherwise form trigraphs
- big_int binding: Some function declarations were missing parameters; also added some missing functions
- 0.90.1 regression: PMAP was returning bad values for func values of 0 or 1.
- #701: fbc didn't escape \ as \\ in @files (response files) sometimes used when invoking ld
- Win32 fbc will now avoid hitting Win32 command line length limits when invoking ld with a long command line, by using "ld @file" (response files)
- #713: gfxlib2 crashed when closing and re-opening an X11 OpenGL graphics screen
- ThreadCall on Win32 couldn't be used with procedures declared inside Extern "Windows-MS" blocks
- CIRCLE did sometimes not fully update the screen immediately, causing the last scan line of the circle to remain invisible until the screen was updated some other way
- crt/linux/fnctl.bi: Broken declaration of open_ ALIAS "open"() (0.90.0 regression)
- Using Unicode characters in comments and compiling with -g could lead to junk bytes being emitted into the generated .asm/.c files
- #710: Operator Placement New[] ("new(address) DataType[N]") will no longer store a cookie containing the number of vector elements (N) in front of the allocated buffer, as done by normal New[]. The cookie is an implementation detail that the coder can't be expected to know, especially because it only applies to New[] when used with data type that has a destructor, so the buffer given to Placement New[] will likely be too small. Besides that, the cookie is only useful to Delete[], which however can only be used with New[], but not Placement New[] (no way to be sure that the given buffer even can be Delete[]'d).
- Bad code generated when using type<string>(...) in a string concatenation or as argument to a BYREF AS ANY parameter
- -fpu sse: Bad code generated for negation on Single function result returned through FPU stack
- -fpu sse: Bad code generated when calling sgn() on Single function result returned through FPU stack
- -fpu sse: Bad code generated when calling sqr() on Double function result returned through FPU stack
- -fpu sse and -vec 1|2: Various cases of bad code generation resulting in operand size mismatch errors
- fbc crashed after showing the error message when using -vec 1|2 without -fpu sse
- ASM backend: Sgn(LongInt) returned wrong values
- C backend: Extern "Windows-MS" is now supported, including DLL exports (stdcall procedures without @N suffix)
- #709: format() adds erroneous thousands delimiter, was affecting all number strings that were multiple of 3.
- #715: GFX statements (Get, Put, Line, Circle, ...) are now more strict about their target/source image parameters. Arrays are still accepted as in QB, but besides that, the argument must be some pointer expression now, that is expected to point to an FB.IMAGE buffer of the proper size. Previously non-pointer expressions were accepted but could cause bad code to be generated or could be silently miscompiled.
- #665: DRAW statement now accepts the same target image expressions as the rest of GFX statements (not just simple pointer variables or 'a.b' field accesses anymore)
- #687: DRAW statement now remembers the subpixel position between commands.
- #717: REDIM [PRESERVE] did not clear array elements with destructor but no constructor
- x->*field syntax wasn't working if operator -> was overloaded
- x[a][b] syntax wasn't working if operator [] was overloaded
- x[a].field syntax wasn't working if operator [] was overloaded
- Win32 ScreenInfo() reimplemented to report screen size more accurately (the old version returned incorrect values on Windows 8.1). Also, it will now report the size of the screen assigned to the program, rather than always the primary monitor.
- #assert inside #if 0 blocks caused a syntax error
- PP typeof()'s argument was not being macro-expanded properly (e.g. the x in <#if typeof(x) = ...>)
- Macro expansion right behind a PP typeof() wasn't working (e.g. the foo in <#if typeof(x) foo>)
- Crash (division by zero) when PRINTing onto tiny graphics screens (e.g. screenres 1, 1)
- pdflib.bi was missing #inclib "gdi32"
- Methods with CONST function results are no longer allowed to override virtual methods with non-CONST function results, and vice-versa (the return type must be the exact same, as for function pointers)
- CONST-member methods are no longer allowed to override non-CONST-member virtual methods, and vice-versa
- The compiler no longer crashes (SIGFPE) on constant expressions containing signed integer division overflows, e.g. -2147483648 \ -1, which triggers SIGFPE when calculated on x86. The compiler now inserts 0 (-2147483648 \ -1 = 2147483648 which doesn't fit into a 32bit signed integer, and in theory overflows to 0) and shows a warning. Note: FB programs doing such divisions at run-time (e.g. <dim a as integer = -2147483648, b as integer = -1 : print a \ b>) may still run into SIGFPE crashes; this change just affects the compiler itself, not the generated code.
- When calling a byref function through a function pointer, the result may now be ignored, just like with normal function calls, or when calling normal functions through function pointers.
- STRPTR() on a CONST STRING (DIM s AS CONST STRING) did not preserve CONSTness and allowed modifying the string
- win/objbase.bi: Wrong IsEqualGUID() declaration, producing wrong result value (subsequently, all aliases such as IsEqualIID() were wrong too)
- Fields were allowed to have type suffixes when declared using the "AS DataType a, b, c" syntax instead of "a AS DataType"
- When DIM'ing an EXTERN array, the DIM statement was allowed to have different lbound than the EXTERN
- Compiler crash during error recovery if a dynamic array declaration/REDIM contained '...' ellipsis upper bounds
- EOF() didn't work properly with files bigger than 4 GB
- #643: Typeless REDIM was accidentially being allowed, if the array's identifier matched that of a field visible through the implicit THIS reference, by re-using the field's data type, but still creating a new array. This will now trigger a compiler error just like other typeless REDIMs without a pre-existing array.
- Duplicate EXTERNs for dynamic arrays are now allowed, just like duplicate EXTERNs for normal or fixed-size array variables, which already were allowed before.
- EXTERN variables could be allocated via a static array variable declaration, this will now trigger an error.
- #648: Local (scoped) variable declarations (including REDIM) caused EXTERNs to be allocated, instead of shadowing them
- Local dynamic arrays can now be shadowed in nested scopes without compiler error
- More precise compile-time checks of dynamic array dimension counts
- -lang fblite/qb: EXTERN arrays are no longer allowed to have subcripts if OPTION DYNAMIC was in effect, because EXTERN dynamic arrays cannot have initial subscripts, just like COMMON arrays.
- #720: Some pointer assignments weren't working due to bogus CONSTness checking
- #582: Wrong code generated for bitfield self-BOPs or SWAPs sometimes under -exx or if the bitfield expression contained function calls (side-effects)
- When specifying an .o file name without extension but '.' in its path (for example: -o ../foo), fbc created temporary files by stripping everything from the .o path until that '.' and then appending the new extension, which often resulted in bad/unexpected file names (for example: ..foo.asm).
- Calling getkey() in one thread won't cause other threads' rtlib function calls to block until getkey() returns anymore
- #726: CONSTRUCTOR|DESTRUCTOR (module-level initialization/cleanup) was allowed to be specified on sub prototypes (although, it was ignored), method bodies (silently miscompiled due to the missing THIS argument), and PRIVATE/PROTECTED static member procedures. Now these cases are disallowed.
- #576: Array elements could be passed to array parameters in place of the array itself: <myfunction( myarray(index) )>. However, the array index was simply ignored. The array must be passed without index now: <myfunction( myarray() )>
- #722: Member operators NEW/DELETE/NEW[]/DELETE[] could be declared CONST/VIRTUAL/ABSTRACT despite being implicitly STATIC. This is now disallowed.
- C backend: main() will now be emitted with clang-compatible signature
- C/LLVM backends: Procedures using forward references in their signatures could be emitted with ANY PTRs in place of the forward references, while prototypes/calls could end up using the signature with resolved forward references, causing the generated C/LLVM code to have type conflicts.
- #719: Compiler crash when passing an upcasted class/UDT function result to a Byref parameter
- #698: sizeof() now allows string expressions (note: it returns sizeof(string), not the string length - len() should be used for that)
- #685: SETMOUSE had differing behaviour between platforms when x and y were not both present and within the window
- When RETURN'ing classes without copy-constructor from a function, or passing classes without copy-constructor to a Byval parameter, their Let operator overload was called, even though this is an object initialization, and not an assignment. (the object wasn't even initialized before the Let overload was called)
- Overload resolution didn't allow up-casting arguments when passing to a CONST parameter (e.g. BYREF AS CONST). This also prevented copy constructors with BYREF AS CONST parameter from being called, when the source object had to be up-casted.
- Copy-constructing or assigning an object from a CONST object didn't work with the implicitly generated copy-constructor or LET overload because they only had BYREF AS MyClass parameters which can't accept CONST objects (instead of calling the copy-constructor or LET overload, a shallow copy was done, which for example caused trouble if the UDT contained dynamic strings requiring a deep copy)
- C backend: A gcc warning was triggered when initializing a global variable with an @addressof expression, taking the address of another global.
- #614: When copying (copy-constructing or assigning) objects of classes extending OBJECT, the lhs' vptr could be overwritten incorrectly, causing the object to have a wrong run-time type.
- 0.90.0 regression: -g could produce bad stabs info when #includes were used (after closing an #include block, the wrong directive was used to return to the main file), preventing gdb from determining variable types sometimes
- -g will now produce correct stabs info for dynamic array descriptors
- 0.90.0 regression: Sometimes incorrect C++ mangling of procedures in nested namespaces
- 0.24.0 regression: SWAP called temporary variable destructors too early, even before calling constructors
- Temporary strings used during procedure calls could be freed too early (directly after the call, instead of being kept alive until the end of the statement), potentially leaving references to them (used with-in the same statement) dangling.
- #545: Overload resolution will now properly handle arguments with CONST qualifiers in their data type
- ASM backend -g debug info for dynamic array descriptors: The data type of the DATA & PTR pointer fields was wrong (they were emitted with an extra level of pointer indirection that shouldn't have been there). The DATA pointer field will also now have the array's original data type, while the PTR field is an ANY PTR (since it's the dynamic array's memory block, not necessarily the array data). The dimTB field will now be emitted as the array that it is (instead of as a sequence of manually generated fields).
- Any function pointers were allowed to be assigned to function pointers with varargs, as long as the signature outside the varargs part matched. On x86 this is technically ok for an assignment with types like "sub cdecl( byval as integer ) = sub cdecl( byval as integer, ... )", because the lhs can be called just like the rhs without passing any varargs. But this isn't allowed in C, and isn't necessarily safe on non-x86 platforms. Besides it also allowed BYREF or array (bydesc) parameters in place of the varargs, which breaks even on x86 (e.g. "sub cdecl( byval as integer, byref as integer ) = sub cdecl( byval as integer, ... )")
- Pointer assignments between pointers to different unsolved forward references will now trigger "suspicious" warnings because these forward references may be resolved to different types later. This matches the C++ mangling behaviour which also treats different unsolved forward references as different types.
- Destructors of UDTs with ABSTRACT/VIRTUAL methods will now reset the object's RTTI such that it matches the type whose destructor is running. This prevents virtual calls from a base class destructor into a derived class which has already been destructed, as in C++.
- The compiler refused to generate an implicit default-constructor and copy-constructor for UDTs derived from a simple plain-old-data base UDT (that itself didn't have any constructors)
- Bin/Oct/Hex() didn't accept pointers to CONST types
- Override signature compatibility checking was broken for methods using the Pascal calling convention
- C backend: Structures containing bitfields were sometimes not emitted correctly (wrong sizeof()), so for now they will be emitted as simple byte arrays. This is bad for -g debug info of course, but that can be fixed in the future when FB's bitfields have been made compatible to GCC's, and the C backend can emit them as-is, without having to worry about layout differences.
- #733: The -> operator couldn't be applied to parenthesized UDT expressions even if overloaded for that UDT
- On Win32, wrong code could be generated when returning complex structures from functions: Under -gen gas, they could be incorrectly returned in registers (if small enough), if they became complex only thanks to the addition of implicit members. Besides being ABI-incompatible to GCC/MSVC, this could also lead to missing destructor calls.
- C backend: stdcall functions returning non-trivial UDTs had the wrong @N stdcall suffix (the hidden result pointer parameter was calculated into it, but shouldn't be)
- 0.90.0 regression: Some cases of binary operations involving unsigned operands and constants could cause the compiler to show "implicit conversion" warnings due to internal transformations, for example: dim as uinteger a, b : print a - (b - 1)
- Bad code generated for temporary variable destruction in local array initializers: temporary strings or UDTs with destructors could be destroyed before first used
- #728: Buggy overload resolution for Byval As Const parameters
- LSET / RSET were aborting when the rhs was an empty var-len string
- #739: ASM backend: The compiler allocated unused stack space for dynamic arrays (besides the array descriptor), based on the array element data type size. This was not only a waste of memory, but could also lead to stack overflow crashes if the array element data type was very big.
- #736: Format() overflow when significand (after scaling to 19 digits) is 2^63 or greater
- Format() overflow on very small numbers, trying to scale them by excessively large powers of 10
- 0.24.0 regression: cgi-util.bi was missing
- Format() was adding an extra digit before the decimal point in scientific notation when rounding up to the next power of 10
Version 0.90.1:
[fixed]
- Potential internal errors in Unix rtlib during SIGWINCH signal handling, due to calls to non-async-signal-safe functions
- Any input on stdin could break the Unix rtlib's escape sequence communication with the terminal, e.g. typing very fast at an Input prompt
- #679: WINDOW width/height were losing precision on very small Single values
- Taking the address of a PEEK, [] indexing, or * dereferencing expression could ignore the PEEK/indexing/derefenced data type (e.g. "@peek( integer, myptr )" returned myptr's type instead of an INTEGER PTR, and "@string[index]" returned a ZSTRING PTR instead of an UBYTE PTR). This could also break WITH when used on a PEEK expression.
- C backend: Passing @proc (taking address of procedures) expressions to BYREF parameters caused bad C code to be generated
- Pointer arithmetic on procedure pointers is now disallowed. It is not meaningful, because procedures do not have a fixed size and are not arranged like array elements.
- 0.90.0 regression: A bug in array index parsing could cause the compiler to crash due to arrays being used without index, instead of showing an error message
- 0.90.0 regression: ON GOTO was broken due to the compiler generating bad jump tables for it
- 0.90.0 regression: Some Win32 API libs were missing (e.g. libstrmiids.dll.a)
Version 0.90.0 (former 0.25.0):
[changed]
- -c, -r and -pp options will now complement each-other when used together, instead of partially overwriting each-other and thus causing weird behaviour
- getkey()/inkey() under Linux X11 graphics mode will now return the FB extended keycode for DELETE (&h53FF or &hFF &h53) instead of ASCII DEL (&h7F), for consistency with console-mode and other platforms
- ScreenEvent() won't return extended keycodes anymore in the EVENT.ascii field under the Linux X11 graphics driver
- Removed compile-time errors for float division by constant zero; it will result in INF again, for consistency with the evaluation at run-time
- Overflows when converting constants to SINGLE/DOUBLE won't cause "math overflow" errors anymore
- Overflows in constant conversions to SINGLE will now trigger "overflow in constant conversion" warnings, like conversions to integer types do
- Constant conversions to DOUBLE are not checked for overflows anymore, since DOUBLE can hold all SINGLE/INTEGER/LONGINT values (although, with varying precision)
- Doing "udtvar.constructor( ... )" or "udtvar.destructor( )" won't automatically add a constructor/destructor anymore, but instead show an error
- The C backend now emits expressions in-line instead of using #defines, and also avoids many unnecessary casts, producing much nicer C code
- fbc now uses a custom COFF/ELF32 reader instead of libbfd for the objinfo feature
- fbc will now also read out compile-time information from libs passed as libfoo.a instead of -l foo or #inclib "foo"
- Linux fbc will now prefer linking with libtinfo over libncurses, if available (depending on the distro, ncurses may be present as one libncurses, or with separate libtinfo; but either way FB only needs the libtinfo part)
- ASM backend: Floating point constants are now emitted in form of their raw byte representation, for better precision than when using STR() to emit them as rounded floating point number literals
- crt/stdio.bi now declares rename() instead of rename_()
- Property methods using an explicit ALIAS now respect that alias and do not append __get__ or __set__ anymore
- #637: Assert[Warn]() messages go to stderr now, rather than to the FB screen (because that might be about to be closed)
- LBound/UBound( array, 0 ) now returns 1 and the dimension count, it is no longer the same as LBound/UBound( array, 1 )
- #if/#elseif expressions now recognize declared identifiers (for example a constant FOO will be expanded to its value, instead of being treated as a "FOO" string)
- Unary/binary operations won't return enums anymore; any enum operands will be converted to integer before the operation. (with math operations, the result can be any integer value, and the operand enum won't necessarily include a constant corresponding to that value. And also, if the operands are from different enums, the compiler wouldn't know which one to use as the result type)
- Unary/binary operations will now convert smaller operands to INTEGERs before the operation (note: thus, UBYTE becomes INTEGER now instead of UINTEGER, and also SHORT/USHORT operations will return an INTEGER now)
- -pp will now preserve #inclib, #libpath, #lang, $ meta commands, msbitfields #pragmas, and #undef (except on macros which, unlike other symbols, won't be preserved anyways), in order to allow the output file to be compiled just like the original
- -o in combination with -pp will now set the output file name for the preprocessed version of the associated input module
- SCREENRES is now a normal function instead of a quirk statement
- BSAVE now (by default) saves 32-bit .bmp files in 32-bit screen modes instead of 24-bit files
[added]
- VIRTUAL and ABSTRACT methods (including virtual destructors) in UDTs extending OBJECT, which can be overridden by methods in derived UDTs, provided the same method name and signature is used
- OVERRIDE attribute (method must override a virtual) on method declarations (compile-time check)
- STATIC member variables in UDTs
- BYREF function results: function f( ) byref as integer
- '=>' can now be used for assignments, in place of '=', same as for initializers. This can be used to solve syntax ambiguities with '=', which sometimes may be interpreted as equality comparison operator while the programmer intended to do an assignment.
- LLVM backend (-gen llvm) that emits textual LLVM IR code and uses llc to compile it into ASM
- Updated headers for caca 0.99.beta18 (caca.bi = new API, caca0.bi = old API)
- Updated header for libzip 0.11
- Updated header for DevIL 1.7.8
- Fixed & updated header for PDCurses 3.4
- Updated GD graphics library header for the 2.1.0 development version
- Updated header for giflib 4.2.1 and 5.0.4 (version may be selected by defining __GIFLIB_VER__ to 4 or 5)
- Updated header for jpeglib 6.2, 7.0, 8.4 and 9.0 (version may be selected by defining __JPEGLIB_VER__ to one of 6,7,8,9)
- Updated header for libpng 1.5.14
- Updated header for Lua 5.2.2
- Updated header for IUP 3.7
- Updated headers for GTK+: GDK & GTK 3.4.4, glib 2.32.4, Cairo 1.12.2, Pango 1.30.1, ATK 2.4.0, Gdk-Pixbuf 2.26.1
- Updated header for libintl 0.18
- Updated header for ODE 0.11.1
- Updated header for SQLite 3.7.13
- Header for libxmp 4.0.4 (module audio decoder)
- Headers for CD 5.6 (Canvas Draw, 2D graphics) and IM 3.8 (image file handling) libraries
- Updated crt/linux/fcntl.bi header
- fbc -asm att|intel option (affects -gen gcc only)
- fbc -rr and -RR options for preserving the final .asm file (useful with -gen gcc where -r/-R preserve the .c file; same as -r/-R under -gen gas)
- fbc -print host|target option, to support shell scripts querying fbc for information that is useful to build systems etc.
- fbc -print x option (named after the fbc -x option), to display the output binary/library file name, as far as it's known based on other input, i.e. -dll, -lib, -m, and input files. For example, on Win32/DOS "fbc -m foo -print x" will give "foo.exe", while "fbc -print x" alone will only print ".exe" (this can be used to query the executable file extension)
- SELECT CASE won't use a temporary variable anymore if the given expression is just a plain variable access already
- SC_CLEAR constant for FB scancode &h4C (numpad 5, a.k.a. clear key) in fbgfx.bi
- SC_ALTGR constant (&h64) in fbgfx.bi, corresponding to the rtlib
- Constant overflow warnings for array boundaries, array/pointer/string indexing, CONST declarations, fixed-length string * N declarations, CASE expressions of a SELECT CASE AS CONST
- Huge variable on stack warning
- NAKED support for the C backend, using GCC inline asm
- ALIAS "" or LIB "" will now result in a compiler error
- fbc now recognizes --version and [-]-help command line options
- IIF now accepts strings and UDTs (yetifoot/dkl)
- win/initguid.bi win32 header
- -exx NULL pointer checks for procedure pointer calls
- CVD(longint), CVS(integer), CVL(single), CVLONGINT(double), for reinterpreting directly between floating-point and integer representations without using strings
- In procedure prototypes, identifiers of array parameters (as in "array() as type") can now be omitted (as in "() as type"), as for non-array parameters
- LBound/UBound() on fixed-size arrays with constant dimension argument (or none at all) will now be compile-time constants
- IIF now allows different types to be mixed, for example iif( condition, mybyte, myinteger ), the result type is the bigger type
- #if/#elseif now accept all kinds of constant expressions that would be accepted in other places (e.g. in PRINT or in constant declarations)
- preprocessor #assert statement
- INTEGER<n> / UINTEGER<n> / C[U]INT<n>, where n is 8/16/32/64, for allowing to choose integer types of a specific size
- CVI<n> / MKI<n>, where n is 16/32/64, to allow bit conversions of a specific size
- type<UDT>( ).field is now possible, as an alternative to (type<UDT>( )).field
- bpp parameter on BSAVE, to request a BMP bit depth
- TYPEOF() can now also be used directly on SUB|FUNCTION(...) function pointer types
- Mode parameter for Lcase()/Ucase() functions, that can be set to 1 to enable ASCII-only mode (e.g. LCASE("foo", 1)), which will be evaluated as compile-time constant if possible
- Improved multiplication/division/modulus to bitwise shift/and optimizations to handle operations with 64bit and unsigned right hand operand better
[fixed]
- libzip headers: zip_stat struct was unnecessarily named zip_stat_, breaking the libzip example
- QuickLZ 1.5.0 header & example
- "fbc libfoo.a" showed usage notes, instead of compiling like "fbc -l foo"
- GOTO jumping over the implicit wstring variable initialization of a SELECT CASE wstring into one of its CASE blocks will now show an error instead of only a warning
- GOTO jumping over the implicit variable initialization of a SELECT CASE (on anything except strings) into one of its CASE blocks will no longer show a false-positive "branch crossing ..." warning
- 'SELECT CASE str1 + str2' was broken and behaved like 'SELECT CASE str2'
- Inconsistent warning message on implicit number to ptr conversions
- Rename case-insensitive naming clashes in IUP3 header defines
- Compiler crash on UDT/enum comparisons (0.24 inheritance regression)
- win/dsound.bi - LPDSENUMCALLBACKW was missing the closing 'W' (thanks to VANYA for find/fix)
- #2131139: "SELECT CASE wstring" allowed integer expressions in "CASE"
- #3549349: The namespace prefix of constants on the left hand-side of assignments was being ignored by the parser, allowing the constant's identifier to match other symbols
- .o files are now linked in the exact order indicated by given .bas modules, .o files, .a files, or -a options on the fbc command line
- getkey() under X11 graphics mode on Linux didn't return proper extended key codes like in console-mode
- getkey() under DOS console-mode didn't encode extended key codes as a 2-byte code using &hFF, causing them to collide with normal key codes
- GooCanvas examples were #including gtk/goocanvas.bi instead of goocanvas.bi
- SQLite 3 header didn't compile due to missing forward declarations and a missing #include "crt/stdarg.bi"
- Potential X11 gfxlib2 driver crash on window maximization despite GFX_NO_SWITCH
- gfxlib2 X11 driver didn't recognize the numpad keys with numlock off
- Linux multikey() will now recognize the CLEAR key (both under linux and xterm terminals)
- gfxlib2 X11 driver returned &h4A instead of SC_MINUS (&h0C) for the "subtract" key on the numpad with numlock off, now it matches win32; the other "add/divide/multiply" keys are remapped this way aswell.
- On Win32 or DOS, __PATH__ could return the current working directory of the compiler instead of the source file's parent directory
- .stabs output could omit the source file's path, preventing gdb from finding the correct file
- Win32 cond*() functions won't crash anymore when given NULL arguments; Unix condwait() won't crash anymore when given NULL instead of a valid mutex pointer
- internal error in ThreadCall parser, potentially causing compiler crashes or miscompilation
- Warnings could still be shown even after the "Too many errors, exiting" message
- ASM backend: Unsigned integer multiplications did not preserve EDX in some cases due to buggy MUL code generation; now the simpler IMUL is used instead
- ASM/C backend: DOUBLEs being cast to SINGLE will now be truncated to SINGLE, as if an assignment to a SINGLE variable was made
- Multiple run-time library symbols have been removed from the global FB namespace: __main, mcount, _monstartup, rename, __divdi3, __udivdi3, __moddi3, __umoddi3, __fixunsdfdi
- Fixed-size arrays/UDTs > 2 GiB will now result in a compile-time error, instead of causing internal integer overflows
- SSE emitter: float2int conversions using movss/movlpd could generate illegal ASM
- ASM backend: A faulty optimization could cause array accesses to be mis-compiled
- More consistent optimization of (foo + constant1) * constant2 (using distribution)
- GOTO jumping over variable declarations of UDTs with non-default constructors only was not an error like in case of UDTs with default constructors
- EXIT FUNCTION in combination with RETURN with complex function result UDT was accepted, leaving the result UDT unconstructed
- Complex function result UDTs were not constructed if neither FUNCTION= nor RETURN were used
- No error was shown when complex function result UDTs were left unconstructed when using FUNCTION= because the UDT had no default constructor
- #3554189: "SWAP parent, child" was allowed (where child is an UDT derived from the parent UDT) even though "child = parent" assignments are not allowed
- #3544952: Static arrays of forward-referenced derived UDT pointers failed to compile
- #3538470: Expressions such as "(Type<MyUDT>( )).myfield" could crash the compiler or be miscompiled
- C backend: Local variables could shadow other variables from parent scopes or the toplevel namespace, or even in the same scope but above its DIM statement
- C backend: Bitfields were emitted as plain fields, making such structures unnecessarily big
- #3571432: LIB "" crashed the compiler
- ASM backend: -NaN float constants were emitted as +NaN
- C backend: Local UDT declarations were emitted in the scope they were first used, not where they were declared
- C backend: DATA statement declarations could be emitted in the wrong order, causing gcc errors
- C backend: Static variables with destructors were emitted as locals despite needing to be visible to destructor wrapper functions
- The C backend does no longer allow/disallow different cast()s than the ASM backend
- C backend: +/- INF/NaN float constants didn't work
- C backend: Using threadcreate() could cause duplicate function pointer typedefs errors
- EXPORT will now be ignored when compiling for non-win32 targets
- C backend: Dereferences on constants casted to pointer types (e.g. "*cptr(byte ptr, 0)") were not emitted correctly
- C backend: frac() returned x - int(x) instead of x - fix(x) (different for negative values)
- Expressions like "@*cast(integer ptr, 123)", i.e. taking the address of a dereferenced type-casted constant, were rejected or caused parsing inconsistencies
- FOR loops with ANY PTR counter used a zero step size or zero step size multiplier, instead of 1 as for BYTE PTR, generating an infinite loop
- FOR loops with FWDREF PTR counters were allowed, despite the incomplete type, causing zero step size to be used (as above)
- UDT methods (or other non-field members) declared in between bitfields interrupted bitfield packing
- C backend: FIELD = N with N > 1 didn't decrease field alignment in the C output
- "RANDOMIZE , 1" was not always using a random seed
- C backend: UDTs and functions with same names caused gcc errors
- BASS import library was using @N suffixes, even though bass.bi doesn't use them anymore
- ASM backend: Some operations could trash registers without preserving them, if there were no free registers available
- An irrelevant "missing parameter-less constructor" error could be shown when destructing an array of objects
- #626: Visibility checks for calls of NEW/DELETE operator overloads were missing
- #609: UDT initializers didn't work properly with derived UDTs
- Unions could cause bad UDT initializer behaviour in some cases
- For stdcall functions returning UDTs on stack, the hidden pointer parameter will no longer be calculated into the @N stdcall suffix, following GCC and MSVC.
- For functions returning UDTs on stack on Linux/DOS/*BSD targets, the callee now always pops the hidden pointer parameter, even when the function is cdecl, to follow the GCC ABI.
- On Linux and DOS targets, functions will not return UDTs in registers anymore, but always on stack, following the GCC ABI.
- ASM backend used dword reads to push bytes/words from memory, potentially causing buffer overruns
- ScreenInfo() crash under X11 gfxlib2 driver when RandR extension is unavailable
- DELETE and DELETE[] were allowed to be used on forward references
- C++ mangling of IMPORTed namespaced global variables (win32) was different from MinGW
- Casting floating-point to unsigned longint now works as expected for values over 2^63
- The wrong error message was shown for methods declared inside anonymous TYPE declarations
- Operators declared inside namespaces can now be implemented outside of the namespace, provided the namespace prefix is used, just like with normal procedures
- Constructors, destructors and properties can now be implemented outside of the namespace their parent UDT was originally declared in, provided the namespace prefix is used
- C backend: Nested anonymous structures/unions were not emitted, only their fields
- On Win32, functions returning structures containing only one CONST SINGLE or one CONST DOUBLE field returned them in EAX or EAX:EDX instead of ST(0)
- Let() = udtvar assignments and ThreadCall disallowed Union types already, but not yet Types with nested anonymous unions
- codepage-specific zstring to Unicode wstring conversions are now working, by default using the locale set when an FB program is started
- FOR now retains the signedness of the step value, so that negative steps may be used on unsigned counters of any size
- Visibility checks for copy constructor calls for BYVAL arguments were missing
- #591: READing further strings/wstrings after already having READ the last DATA statement caused a crash
- Intermediate .asm/.c files will now use the native EOL char, not always CRLF
- The C backend now supports objinfo, just like the ASM backend