mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Allow (int[*]) { 1, 2 } cast style initialization. Experimental change from [*] to [?]. Fix issue where compile time declarations in expression list would not be handled properly.
This commit is contained in:
@@ -3,7 +3,7 @@ module test;
|
||||
struct Abc
|
||||
{
|
||||
int x;
|
||||
int[*] y;
|
||||
int[?] y;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
struct Foo
|
||||
{
|
||||
int x;
|
||||
int[*] y; // #error: flexible array member must be the last element
|
||||
int[?] y; // #error: flexible array member must be the last element
|
||||
int z;
|
||||
}
|
||||
|
||||
struct Bar
|
||||
{
|
||||
int[*] y; // #error: flexible array member cannot be the only element
|
||||
int[?] y; // #error: flexible array member cannot be the only element
|
||||
}
|
||||
|
||||
struct Baz
|
||||
{
|
||||
int y;
|
||||
int[*] z;
|
||||
int[?] z;
|
||||
}
|
||||
|
||||
struct BazContainerOk
|
||||
|
||||
@@ -6,11 +6,11 @@ struct Abc
|
||||
struct Foo
|
||||
{
|
||||
int a;
|
||||
int[*] x;
|
||||
int[?] x;
|
||||
}
|
||||
|
||||
struct Foo2
|
||||
{
|
||||
int a;
|
||||
int[*] x, y; // #error: must be the last element
|
||||
int[?] x, y; // #error: must be the last element
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ struct Bar
|
||||
int y;
|
||||
}
|
||||
int ufe;
|
||||
int[*] z;
|
||||
int[?] z;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user