www.digitalmars.com Home | Search | C & C++ | D | DMDScript | News Groups | index | prev | next
Archives

D Programming
D
D.gnu
digitalmars.D
digitalmars.D.bugs
digitalmars.D.dtl
digitalmars.D.dwt
digitalmars.D.announce
digitalmars.D.learn
digitalmars.D.debugger

C/C++ Programming
c++
c++.announce
c++.atl
c++.beta
c++.chat
c++.command-line
c++.dos
c++.dos.16-bits
c++.dos.32-bits
c++.idde
c++.mfc
c++.rtl
c++.stl
c++.stl.hp
c++.stl.port
c++.stl.sgi
c++.stlsoft
c++.windows
c++.windows.16-bits
c++.windows.32-bits
c++.wxwindows

digitalmars.empire
digitalmars.DMDScript

c++ - typedef error

↑ ↓ ← Paul Runde <prunde consolidated.net> writes:
I can't find an answer for this error.

In an include file __int32 is defined:

typedef long __int32;


In another file is this declaration:

typedef unsigned __int32 xxx_uint32_t;


I get the following error:
    '__int32' previously declared as something else
    It was declared as: long
    It is now declared: unsigned


Thank you
Paul
Mar 10 2004
→ Jan Knepper <jan smartsoft.us> writes:
Yeah... For some reason using a typedef in a typedef does not seem to go 
too well... <g>

Guess Walter could look into this.



Paul Runde wrote:
 I can't find an answer for this error.
 
 In an include file __int32 is defined:
 
 typedef long __int32;
 
 
 In another file is this declaration:
 
 typedef unsigned __int32 xxx_uint32_t;
 
 
 I get the following error:
    '__int32' previously declared as something else
    It was declared as: long
    It is now declared: unsigned
 
 
 Thank you
 Paul

-- ManiaC++ Jan Knepper But as for me and my household, we shall use Mozilla... www.mozilla.org
Mar 10 2004
"Walter" <walter digitalmars.com> writes:
The parser sees:

    typedef long __int32;
    typedef unsigned __int32

and that looks like a redefinition.

"Paul Runde" <prunde consolidated.net> wrote in message
news:c2ofv8$6s2$2 digitaldaemon.com...
 I can't find an answer for this error.

 In an include file __int32 is defined:

 typedef long __int32;


 In another file is this declaration:

 typedef unsigned __int32 xxx_uint32_t;


 I get the following error:
     '__int32' previously declared as something else
     It was declared as: long
     It is now declared: unsigned


 Thank you
 Paul

Mar 19 2004
↑ ↓ → Paul Runde <prunde consolidated.net> writes:
Walter wrote:
 The parser sees:
 
     typedef long __int32;
     typedef unsigned __int32
 
 and that looks like a redefinition.
 

My bad. I simply assumed a C\C++ typedef was just like a D typedef. Thanks
Mar 19 2004