mirror of
https://github.com/vlang/v.git
synced 2025-09-16 16:02:29 +03:00
cgen: minimise sizeof(EmptyStruct)
to 0 for gcc/clang and to 1 for tcc/msvc, by changing EMPTY_STRUCT_DECLARATION and EMPTY_STRUCT_INITIALIZATION (#16733)
This commit is contained in:
parent
e01dac885c
commit
fc5826b7ca
9 changed files with 135 additions and 34 deletions
|
@ -355,7 +355,7 @@ fn test_array_append_empty_struct() {
|
|||
assert (XYZ{} in names) == true
|
||||
|
||||
// test fixed array
|
||||
array := [XYZ{}]
|
||||
array := [XYZ{}]!
|
||||
assert (XYZ{} in names) == true
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue