https://bugs.winehq.org/show_bug.cgi?id=55201
Bug ID: 55201 Summary: Wine fails to build with clang-11.0.1 due to recent nameless unions/structs VARIANT changes Product: Wine Version: 8.11 Hardware: x86-64 OS: Linux Status: NEW Keywords: regression Severity: blocker Priority: P2 Component: oleaut32 Assignee: wine-bugs@winehq.org Reporter: dmitry@baikal.ru Regression SHA1: 36963b6d27abcf74b58bcf11953ebdf2b7e9767c Distribution: ---
Starting from
36963b6d27abcf74b58bcf11953ebdf2b7e9767c is the first bad commit commit 36963b6d27abcf74b58bcf11953ebdf2b7e9767c Author: Alexandre Julliard julliard@winehq.org Date: Tue Jul 4 12:42:53 2023 +0200
oleaut32: Get rid of the DECIMAL access macros.
dlls/oleaut32/variant.c | 83 +++++++------ dlls/oleaut32/variant.h | 20 ---- dlls/oleaut32/vartype.c | 303 +++++++++++++++++++++++------------------------- 3 files changed, 188 insertions(+), 218 deletions(-)
Wine fails to build.
dlls/oleaut32:
clang -c -o dlls/oleaut32/x86_64-windows/usrmarshal.o ../wine.src/dlls/oleaut32/usrmarshal.c -Idlls/oleaut32 \ -I../wine.src/dlls/oleaut32 -Iinclude -I../wine.src/include -I../wine.src/include/msvcrt -D_UCRT \ -D__WINESRC__ -D_OLEAUT32_ -D__WINE_PE_BUILD -Wall -target x86_64-windows -fuse-ld=lld \ -fno-strict-aliasing -Wdeclaration-after-statement -Wempty-body -Wignored-qualifiers -Winit-self \ -Wno-pragma-pack -Wstrict-prototypes -Wtype-limits -Wvla -Wwrite-strings -Wpointer-arith \ -Wabsolute-value -Wnonnull -mcx16 -mcmodel=small -g -O2 ../wine.src/dlls/oleaut32/usrmarshal.c:402:24: error: no member named 'n1' in 'struct tagVARIANT' header->vt = pvar->n1.n2.vt; ~~~~ ^ ../wine.src/dlls/oleaut32/usrmarshal.c:403:32: error: no member named 'n1' in 'struct tagVARIANT' header->wReserved1 = pvar->n1.n2.wReserved1; ~~~~ ^ ../wine.src/dlls/oleaut32/usrmarshal.c:404:32: error: no member named 'n1' in 'struct tagVARIANT' header->wReserved2 = pvar->n1.n2.wReserved2; ~~~~ ^ ../wine.src/dlls/oleaut32/usrmarshal.c:405:32: error: no member named 'n1' in 'struct tagVARIANT' header->wReserved3 = pvar->n1.n2.wReserved3; ~~~~ ^ ../wine.src/dlls/oleaut32/usrmarshal.c:406:31: error: no member named 'n1' in 'struct tagVARIANT' header->switch_is = pvar->n1.n2.vt; ~~~~ ^ ../wine.src/dlls/oleaut32/usrmarshal.c:421:31: error: no member named 'n1' in 'struct tagVARIANT' memcpy(Pos, pvar->n1.n2.n3.byref, type_size); ~~~~ ^ ../wine.src/dlls/oleaut32/usrmarshal.c:435:32: error: no member named 'n1' in 'struct tagVARIANT' memcpy(Pos, &pvar->n1.n2.n3, type_size); ~~~~ ^ ../wine.src/dlls/oleaut32/usrmarshal.c:564:27: error: no member named 'n1' in 'struct tagVARIANT' memcpy(&pvar->n1.n2.n3, Pos, type_size); ~~~~ ^ ../wine.src/dlls/oleaut32/usrmarshal.c:568:11: error: no member named 'n1' in 'struct tagVARIANT' pvar->n1.n2.vt = header->vt; ~~~~ ^ ../wine.src/dlls/oleaut32/usrmarshal.c:569:11: error: no member named 'n1' in 'struct tagVARIANT' pvar->n1.n2.wReserved1 = header->wReserved1; ~~~~ ^ ../wine.src/dlls/oleaut32/usrmarshal.c:570:11: error: no member named 'n1' in 'struct tagVARIANT' pvar->n1.n2.wReserved2 = header->wReserved2; ~~~~ ^ ../wine.src/dlls/oleaut32/usrmarshal.c:571:11: error: no member named 'n1' in 'struct tagVARIANT' pvar->n1.n2.wReserved3 = header->wReserved3; ~~~~ ^ ../wine.src/dlls/oleaut32/usrmarshal.c:624:34: error: no member named 'n1' in 'struct tagVARIANT' if (vt & VT_BYREF) ref = pvar->n1.n2.n3.byref; ~~~~ ^ 13 errors generated.
dlls/oleaut32/tests:
clang -c -o dlls/oleaut32/tests/x86_64-windows/vartest.o ../wine.src/dlls/oleaut32/tests/vartest.c -Idlls/oleaut32/tests \ -I../wine.src/dlls/oleaut32/tests -Iinclude -I../wine.src/include -I../wine.src/include/msvcrt \ -D_MSVCR_VER=0 -D__WINESRC__ -D__WINE_PE_BUILD -Wall -target x86_64-windows -fuse-ld=lld \ -fno-strict-aliasing -Wdeclaration-after-statement -Wempty-body -Wignored-qualifiers -Winit-self \ -Wno-pragma-pack -Wstrict-prototypes -Wtype-limits -Wvla -Wwrite-strings -Wpointer-arith \ -Wabsolute-value -Wnonnull -mcx16 -mcmodel=small -g -O2 ../wine.src/dlls/oleaut32/tests/vartest.c:251:5: error: declaration of anonymous struct must be a definition struct __tagBRECORD *rec; ^ ../wine.src/dlls/oleaut32/tests/vartest.c:251:29: error: type name requires a specifier or qualifier struct __tagBRECORD *rec; ^ ../wine.src/dlls/oleaut32/tests/vartest.c:301:11: error: no member named 'rec' in 'struct IRecordInfoImpl' This->rec->pvRecord = NULL; ~~~~ ^ ../wine.src/dlls/oleaut32/tests/vartest.c:769:3: error: declaration of anonymous struct must be a definition struct __tagBRECORD *rec; ^ ../wine.src/dlls/oleaut32/tests/vartest.c:769:3: warning: declaration does not declare anything [-Wmissing-declarations] ../wine.src/dlls/oleaut32/tests/vartest.c:894:3: error: use of undeclared identifier 'rec' rec = &V_UNION(&v, brecVal); ^ ../wine.src/dlls/oleaut32/tests/vartest.c:894:22: error: no member named 'brecVal' in 'struct tagVARIANT' rec = &V_UNION(&v, brecVal); ~~~~~~~~~~~~^~~~~~~~ ... fatal error: too many errors emitted, stopping now [-ferror-limit=]