repos / gbc

GBC - Go B Compiler
git clone https://github.com/xplshn/gbc.git

gbc / tests
xplshn  ·  2025-08-13

ternary-side-effect.b

B
 1foo() {
 2    extrn printf;
 3    printf("  Foo\n");
 4}
 5
 6bar() {
 7    extrn printf;
 8    printf("  Bar\n");
 9}
10
11main() {
12    extrn printf;
13    printf("Only Foo should be printed bellow:\n");
14    1 ? foo() : bar();
15}