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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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
}