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=]
https://bugs.winehq.org/show_bug.cgi?id=55201
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |austinenglish@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=55201
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, source
https://bugs.winehq.org/show_bug.cgi?id=55201
--- Comment #1 from Dmitry Timoshkov dmitry@baikal.ru --- *** Bug 55202 has been marked as a duplicate of this bug. ***
https://bugs.winehq.org/show_bug.cgi?id=55201
--- Comment #2 from Alexandre Julliard julliard@winehq.org --- Can you please attach your config.log?
https://bugs.winehq.org/show_bug.cgi?id=55201
--- Comment #3 from Dmitry Timoshkov dmitry@baikal.ru --- Created attachment 74795 --> https://bugs.winehq.org/attachment.cgi?id=74795 config.log
https://bugs.winehq.org/show_bug.cgi?id=55201
Vitaly Lipatov lav@etersoft.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |lav@etersoft.ru
https://bugs.winehq.org/show_bug.cgi?id=55201
--- Comment #4 from Dmitry Timoshkov dmitry@baikal.ru --- I can confirm that the patches from https://gitlab.winehq.org/wine/wine/-/merge_requests/3256 do fix compilation with clang.
Thanks Jacek.
https://bugs.winehq.org/show_bug.cgi?id=55201
Dmitry Timoshkov dmitry@baikal.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |8f27e8f601af5e591d7f9136729 | |0f9d5140860de Status|NEW |RESOLVED Resolution|--- |FIXED
--- Comment #5 from Dmitry Timoshkov dmitry@baikal.ru --- Fixed by 8f27e8f601af5e591d7f91367290f9d5140860de.
Thanks Alexandre.
https://bugs.winehq.org/show_bug.cgi?id=55201
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #6 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 8.12.