http://bugs.winehq.org/show_bug.cgi?id=25942
Summary: Wine's implementation of d3dtypes.h does not work with ISO C++. Product: Wine Version: 1.3.11 Platform: x86-64 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: directx-d3d AssignedTo: wine-bugs@winehq.org ReportedBy: dscharrer@gmail.com
The implementation of d3dtypes.h shipped with wine defines operator() in D3MATRIX as follows: /* This is different from MS, but avoids anonymous structs. */ D3DVALUE &operator () (int r, int c) { return ((D3DVALUE [4][4])&_11)[r][c]; } const D3DVALUE &operator() (int r, int c) const { return ((const D3DVALUE [4][4])&_11)[r][c]; }
Compiling a C++ winelib program which includes d3d.h using wineg++, without -fpermissive and with D3D_OVERLOADS defined, results in a compile error, as "/nemyax/apps/wine/1.3.12/include/wine/windows/d3dtypes.h:339: error: ISO C++ forbids casting to an array type ‘D3DVALUE [4][4]’".
http://bugs.winehq.org/show_bug.cgi?id=25942
--- Comment #1 from Erik Lund culex.eriklund@gmail.com 2011-01-31 15:30:29 CST --- Created an attachment (id=33076) --> (http://bugs.winehq.org/attachment.cgi?id=33076) Testcase for d3dtypes.h C++ compatibility
Small testcase used to show this problem.
http://bugs.winehq.org/show_bug.cgi?id=25942
Erik Lund culex.eriklund@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |culex.eriklund@gmail.com
--- Comment #2 from Erik Lund culex.eriklund@gmail.com 2011-01-31 15:32:22 CST --- I can confirm this problem using GCC 4.5.1 and Wine 1.2.1.
See this attachment( http://bugs.winehq.org/attachment.cgi?id=33076 ) for the testcase that can identify it.
http://bugs.winehq.org/show_bug.cgi?id=25942
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, source, testcase
http://bugs.winehq.org/show_bug.cgi?id=25942
Daniel Scharrer dscharrer@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Version|1.3.11 |1.3.18
--- Comment #3 from Daniel Scharrer dscharrer@gmail.com 2011-04-27 10:33:16 CDT --- Bumping wine version to 1.3.18
http://bugs.winehq.org/show_bug.cgi?id=25942
Ken Sharp kennybobs@o2.co.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- Version|1.3.18 |1.3.11
--- Comment #4 from Ken Sharp kennybobs@o2.co.uk 2011-04-27 10:51:10 CDT --- Don't change the Wine version!
http://bugs.winehq.org/show_bug.cgi?id=25942
Daniel Scharrer dscharrer@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |FIXED
--- Comment #5 from Daniel Scharrer dscharrer@gmail.com 2011-06-03 16:54:54 CDT --- This has been fixed in commit 5deab783e2a18fa2819d99e7ba3b197a189bb3b4
http://bugs.winehq.org/show_bug.cgi?id=25942
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #6 from Alexandre Julliard julliard@winehq.org 2011-06-10 13:16:40 CDT --- Closing bugs fixed in 1.3.22.