This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: cast to pointer from integer of different size


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




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]