mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 20:11:17 +00:00
- Bitstruct accidentally allowed other arrays than char arrays #2836
This commit is contained in:
10
test/test_suite/bitstruct/bitstruct_other_int_array.c3
Normal file
10
test/test_suite/bitstruct/bitstruct_other_int_array.c3
Normal file
@@ -0,0 +1,10 @@
|
||||
bitstruct Foo2 : int[2] // #error: The type of the bitstruct cannot be 'int[2]' but must be an
|
||||
{
|
||||
bool enable_version;
|
||||
}
|
||||
fn void main()
|
||||
{
|
||||
Foo2 a2 = { };
|
||||
Foo2 b2 = { .enable_version, };
|
||||
if (!(a2 & b2)) return;
|
||||
}
|
||||
Reference in New Issue
Block a user