Subject: (none)
From: [email-masked] ("Ismael Jurado")

30 Jul 1997 01:34:21 -0700
Approved: [email-masked]
Distribution: cygnus
Message-ID: <[email-masked]>
Content-Type: text/plain
X-Originating-IP: [194.224.19.84]
Original-To: [email-masked]
Original-Cc: [email-masked]
Original-Sender: [email-masked]

I've been doing the job of porting the examples of Petzold's book 
"Programing
Windows 95" (now I'm busy with other work, soon I'll post the results) 
and I'd
found the same problem with unamed unions under gcc. As I see in your 
diff
file you just make this change to the headers:

from MS:
        typedef struct tagFoo {
           int x;
           union {
              int a;
              char b;
           };
           double x;
        } Foo;

from you:
        typedef struct tagFoo {
           int x;
           union {
              int a;
              char b;
           } u1;         <----- you give a name
           double x;
        } Foo;

and then use that name to acces the members in the program code:

from MS:
	... //other code
	Foo foo;
	foo.a=25;
	... //more code

from you:
	... //other code
	Foo foo;
	foo.u1.a=25;
	    ^^ dummy union name
	... //more code

But once you give a name to the nested union in the .h file, you can 
acces any data menber as the original MS code, you don't have to include 
the 
"u1"!, at least in beta 17.1. I hope this will make a smaller diff file.

Ismael Jurado
[email-masked]

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".