From: Weiqi Gao Newsgroups: comp.os.msdos.djgpp Subject: Re: RSXNTDJ 1.3.1 and anonymous unions Date: Tue, 01 Jul 1997 17:26:01 -0500 Organization: Spectrum Healthcare Services Lines: 24 Message-ID: <33B983F9.AED117D9@a.crl.com> References: <5p5t7m$76q AT news DOT fiberlink DOT net> <33B6BAC8 DOT 2D01 AT cs DOT com> <33B7A36E DOT 3958 AT nortel DOT ca> <33B81BD6 DOT 382C200 AT a DOT crl DOT com> NNTP-Posting-Host: a116016.stl1.as.crl.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Hi, In trying to use RSXNTDJ 1.3.1/DJGPP 2.01/MS Platform SDK to create Win32 programs, I've encountered the following problem: Quite a few of the Platform SDK include files are written to take advantage of the VC++ anonymous union feature (which compiles the code "struct x { union { int y;};} z; z.y = 10;"). Although the header files are written in a way so that one can write portable code (look at prsht.h), almost all the sample code available (e.g., from the MSDN) are written for the VC++ compiler only. I was able to compile some elaborate programs from the Windows 95 User Interface book, including one that uses the treeview control. However I have to modify others, just to get a clean compile under gcc. My question is: does GCC support anonymous unions? How do I turn it on? By the way, RSXNTDJ 1.3.1 looks very good. Thanks to the DJGPP/RSXNTDJ community! -- Weiqi Gao weiqigao AT a DOT crl DOT com