Skip to content

Commit 91d94e6

Browse files
committed
fbc: fix regression for __FB_GUI__ intrinsic define
- __FB_GUI__ definition was clobbered by basic-macros dc46f69 - add test to tests/pp/intrinsic.bas to check for __FB_GUI__ definition
1 parent ac3f6ca commit 91d94e6

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

changelog.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ Version 1.08.0
149149
- github #217: C backend, fix gcc array out of bounds warning when compiled with -O2 or higher optimizations and accessing non-zero lower bound fixed length string arrays
150150
- C backend: inline asm - don't add rsp/esp to the clobber list, it's deprecated in newer gcc versions and silently ignored in older versions
151151
- github #309: token pasting operator '##' allows pasting of single '_' characters
152+
- fbc: re-add __FB_GUI__ intrinsic define - the change was clobbered for a time during fbc 1.08.0 development after basic-macros were added
152153

153154

154155
Version 1.07.0

src/compiler/symb-define.bas

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -769,7 +769,8 @@ dim shared defTb(0 to ...) as SYMBDEF => _
769769
(@"__FB_BACKEND__" , NULL , FB_DEFINE_FLAGS_STR, @hDefBackend_cb ), _
770770
(@"__FB_FPU__" , NULL , FB_DEFINE_FLAGS_STR, @hDefFpu_cb ), _
771771
(@"__FB_FPMODE__" , NULL , FB_DEFINE_FLAGS_STR, @hDefFpmode_cb ), _
772-
(@"__FB_GCC__" , NULL , 0 , @hDefGcc_cb ) _
772+
(@"__FB_GCC__" , NULL , 0 , @hDefGcc_cb ), _
773+
(@"__FB_GUI__" , NULL , 0 , @hDefGui_cb ) _
773774
}
774775

775776
type SYMBMACRO

tests/pp/intrinsic.bas

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,10 @@
102102
#error __TIME__ not defined
103103
#endif
104104

105+
#ifndef __FB_GUI__
106+
#error __FB_GUI__ not defined
107+
#endif
108+
105109

106110
'' Always defined for this test
107111

0 commit comments

Comments
 (0)