1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +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:
Delyan Angelov
2022-12-22 21:47:39 +02:00
committed by GitHub
parent e01dac885c
commit fc5826b7ca
9 changed files with 135 additions and 34 deletions

View File

@ -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
}