I got the following compiler error with Wine 1.2-GIT (up-to-date checkout): Code: make[1]: Entering directory `/home/quix0r/git/wine/dlls/user32' ccache gcc -m32 -c -I. -I. -I../../include -I../../include -D__WINESRC__ -D_USER32_ -D_WINABLE_ -D_REENTRANT -fPIC -Wall -pipe -fno-strict-aliasing -Wdeclaration-after-statement -Wstrict-prototypes -Wtype-limits -Wwrite-strings -Wpointer-arith -g -O0 -fPIC -o painting.o painting.c painting.c: In function ?GetDCEx?: painting.c:913: error: initializer element is not constant make[1]: *** [painting.o] Error 1 make[1]: Leaving directory `/home/quix0r/git/wine/dlls/user32' make: *** [dlls/user32] Error 2 It happens only with last commit, the previous one, previous day, does compile flawless. Please help here. :) Roland
mogorva
2010-Jul-24 05:07 UTC
[Wine] Re: Wine 1.2-GIT: Compiler error in user32/painting.c
It compiles without errors for me when using CFLAGS="-O2", instead of -O0.
Frédéric Delanoy
2010-Jul-24 06:42 UTC
[Wine] Wine 1.2-GIT: Compiler error in user32/painting.c
On Sat, Jul 24, 2010 at 05:52, Quix0r <wineforum-user at winehq.org> wrote:> I got the following compiler error with Wine 1.2-GIT (up-to-date checkout): > > Code: > make[1]: Entering directory `/home/quix0r/git/wine/dlls/user32' > ccache gcc -m32 -c -I. -I. -I../../include -I../../include ?-D__WINESRC__ -D_USER32_ -D_WINABLE_ -D_REENTRANT -fPIC -Wall -pipe -fno-strict-aliasing -Wdeclaration-after-statement -Wstrict-prototypes -Wtype-limits -Wwrite-strings -Wpointer-arith ?-g -O0 -fPIC ?-o painting.o painting.c > painting.c: In function ?GetDCEx?: > painting.c:913: error: initializer element is not constant > make[1]: *** [painting.o] Error 1 > make[1]: Leaving directory `/home/quix0r/git/wine/dlls/user32' > make: *** [dlls/user32] Error 2 > > > It happens only with last commit, the previous one, previous day, does compile flawless. > > Please help here. :) > > RolandI've the same problem here (as other people). Just wait for Monday commit batch... it will hopefully be fixed by then (or the misbehaving patch reverted)
Here is my patch to get it compiling even with -O0 (and what does have optimization to do with errors?): Code: diff --git a/dlls/user32/painting.c b/dlls/user32/painting.c index 5e57e7f..320a920 100644 --- a/dlls/user32/painting.c +++ b/dlls/user32/painting.c @@ -910,7 +910,7 @@ BOOL WINAPI EndPaint( HWND hwnd, const PAINTSTRUCT *lps ) HDC WINAPI GetDCEx( HWND hwnd, HRGN hrgnClip, DWORD flags ) { static const DWORD clip_flags = DCX_PARENTCLIP | DCX_CLIPSIBLINGS | DCX_CLIPCHILDREN | DCX_WINDOW; - static const DWORD user_flags = clip_flags | DCX_NORESETATTRS; /* flags that can be set by user */ + static const DWORD user_flags = DCX_PARENTCLIP | DCX_CLIPSIBLINGS | DCX_CLIPCHILDREN | DCX_WINDOW | DCX_NORESETATTRS; /* f struct dce *dce; BOOL bUpdateVisRgn = TRUE; HWND parent;