Help: BC5 anonymous structures, unions 
Author Message
 Help: BC5 anonymous structures, unions

I am trying to port the following (standard C) code from VC40
to BC5:

  GetSystemInfo( &sysinfo, ... );
  switch (sysinfo.wProcessorArchitecture) {
  ...

BC5 is forcing me to change sysinfo.wProcessorArchitecture
into sysinfo.u.s.wProcessorArchitecture. I don't want that.
             ^^^^
I have tried defining _ANONYMOUS_STRUCT and _ANONYMOUS_UNION,
using the -VF switch and so on. The -VF switch seems to work
fine with anonymous structures, but then fails at processing
borland's library headers (e.g. bc5/include/win32/winnt.h).

Can someone help me?

heers,
                Peter

--



Sat, 02 Jan 1999 03:00:00 GMT  
 Help: BC5 anonymous structures, unions

: I am trying to port the following (standard C) code from VC40
                                     ^^^^^^^^^^ see below
: to BC5:

:   GetSystemInfo( &sysinfo, ... );
:   switch (sysinfo.wProcessorArchitecture) {
:   ...

: BC5 is forcing me to change sysinfo.wProcessorArchitecture
: into sysinfo.u.s.wProcessorArchitecture. I don't want that.
:              ^^^^

Anonymous structures and unions are not part of ANSI C.
Anonymous unions are part of C++. Try a C++ compiler.
[I don't know if BC5 is such a beast, but you seem to think
that the code you're compiling is C -- it isn't]

nathan
--
Nathan Sidwell                         Holder of the Xmris home page
http://www.pact.srf.ac.uk/~nathan/                  Tel 0117 9707182



Sun, 03 Jan 1999 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Erroneous structures (was anonymous structures)

2. Anonymous union in VC++ 7

3. about "anonymous union" problem

4. anonymous structs and unions : legal?

5. Anonymous unions

6. Anonymous unions in C with gcc?

7. Anonymous unions in gcc

8. help: unnamed unions within structures

9. Anonymous sub-structures and GCC

10. Question regarding unions and structures

11. fread w/ Union structures

12. Structures vs. Unions

 

 
Powered by phpBB® Forum Software