This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: casting on 64/32-bit environment
- From: Tim Prince <tprince at computer dot org>
- To: Mitja Ursic <mitja dot ursic at email dot si>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Fri, 12 Oct 2007 06:33:33 -0700
- Subject: Re: casting on 64/32-bit environment
- References: <20071012130159.5F8FB8B750@www1.email.si>
Mitja Ursic wrote:
> Hello,
>
> 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 usual meaning of the term 64-bit is that sizeof pointer storage is
increased, compared with 32-bit. So it should hardly be a surprise when
this happens to non-portable code.