Re: casting on 64/32-bit environment

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Mitja Ursic writes:

 > Compiling of a cc program with g++ on 64-bit environment gives me a warning of 
 > a type ?Warning: cast from pointer to integer of different size? on a place 
 > were casting really takes place. If I compile the same program on 32-bit 
 > environment I don?t have warning anymore.
 > Dose anyone have a reasonable explanation about that?

The problem here is that we don't know what you don't understand.

If you're casting a pointer to an (32-bit) int, then if you are on a
64-bit system, there will be overflow and some information will be
lost.  If you're on a 32-bit system then there won't be a problem.
This seems obvious: what's the problem?

Andrew.

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux