On December 19, 2002 03:20 pm, Ove Kaaven wrote:
union { struct { short dmOrientation; short dmPaperSize; short dmPaperLength; short dmPaperWidth; }; POINTL dmPosition; };
This is a problem, because it seems we don't have nameless structs in g++, and I have no idea how to solve this.
gcc3.2 has them. I just verified that a fragment like that compiles fine with g++3.2.
Red Hat 8.0, Suse 8.1, and Mandrake 9.0 have already standardized on gcc3.2.
Debian supports gcc3.2 only in their 'testing' distribution, but historically, a lot of people switch to 'testing' when they need new stuff.
I have a feeling enough distributions have updated to gcc3.2 that it might be ok to start depending on it.
- Dan
On December 19, 2002 07:48 pm, Dan Kegel wrote:
gcc3.2 has them. I just verified that a fragment like that compiles fine with g++3.2.
Thank you.
ChangeLog Enable nameless structures in C++ for gcc >= 3.x. (Discovery and testing done by Dan Kegel).
Index: include/winnt.h =================================================================== RCS file: /var/cvs/wine/include/winnt.h,v retrieving revision 1.147 diff -u -r1.147 winnt.h --- include/winnt.h 19 Dec 2002 21:12:35 -0000 1.147 +++ include/winnt.h 20 Dec 2002 06:38:42 -0000 @@ -140,8 +140,8 @@ # define NONAMELESSSTRUCT # define NONAMELESSUNION #else -/* Anonymous struct support starts with gcc 2.96 */ -# if !defined(NONAMELESSSTRUCT) && (defined(__GNUC__) && (defined(__cplusplus) || ((__GNUC__ < 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ < 96))))) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) +/* Anonymous struct support starts with gcc 2.96 or gcc/g++ 3.x */ +# if !defined(NONAMELESSSTRUCT) && (defined(__GNUC__) && ((__GNUC__ < 2) || ((__GNUC__ == 2) && (defined(__cplusplus) || (__GNUC_MINOR__ < 96))))) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) # define NONAMELESSSTRUCT # endif /* Anonymous unions support starts with gcc 2.96/g++ 2.95 */