This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: cast to pointer from integer of different size
- From: Peter Bergner <bergner at vnet dot ibm dot com>
- To: Jack Howarth <howarth at bromo dot msbb dot uc dot edu>
- Cc: gcc at gcc dot gnu dot org, pinskia at physics dot uc dot edu
- Date: Thu, 21 Sep 2006 23:10:10 -0500
- Subject: Re: cast to pointer from integer of different size
- References: <20060922035430.35FB8110010@bromo.msbb.uc.edu>
On Thu, 2006-09-21 at 23:54 -0400, Jack Howarth wrote:
> Peter,
> Wouldn't we want something like...
>
> +#ifdef __powerpc64__
> +unsigned long FindTopOfStack(unsigned long stack_start) {
> +#else
> unsigned long FindTopOfStack(unsigned int stack_start) {
> +#endif
Why have the #ifdef? Why not just define it as:
unsigned long FindTopOfStack(unsigned long stack_start) {
for both 32-bit and 64-bit compiles? It's not like you're
changing the size of stack_start for the 32-bit case, since
unsigned long and unsigned int are both 4 bytes for -m32.
Peter