Christian Buttner
Christian Buttner
``` bitstruct Flags : int {} const Flags FLAGS_A = Flags {}; const Flags FLAGS_B = Flags {}; const Flags FLAGS_C = FLAGS_A | FLAGS_B; ^^^^^^^^^^^^^^^^^ Error: The expression must...
```c bitstruct Foo : int { bool a; } bitstruct Bar : int { bool a; bool b; } fn void bitstruct_cast() { Bar bar; Foo foo = (Foo)(int)bar; //...
I would appreciate a command line option `--output-dir`, which should do the same as "output" in project.json.
```c struct Foo { void bar; } fn void main(String[] args) { Foo foo; } ``` Kind of unusual, but this crashes the compiler.
```c fn void int_min() { io::printn(int.min); // Prints -2147483648 io::printn((float)int.min); // Prints positive 2147483648.0 assert(int.min == -2147483648); // Assert violation assert((float)int.min == -2147483648.0f); // Assert violation } ```
Is this a possibility? ```c macro foo($bar, $Type) {} fn void bar() { foo(.$bar = 1, .$Type = int); } ```
This happens on macOS. Compile a C3 static library with ```c fn void test_c3() @export("test_c3") { Allocator allocator = allocator::heap(); (void)allocator::new_array(allocator, int, 4); } ``` Compile a C executable with...
```c module test; import foo; fn void main() {} extern fn void func() @if(foo::FOO == 0); // ^^^ // Error: 'foo::FOO' could not be found, did you spell it right?...
``` module test; import std::io; macro macro_2(str) { int a = str; } macro macro_1(str) { macro_2(str); } fn int main(String[] args) { macro_1("Test"); return 0; } ``` Emits ```...
```c bitstruct Flags : int { bool flag1; } struct Foo { long x; Flags flags; } fn int main(String[] args) { long x; Foo foo = { .x =...