Help: porting 32-bit app to 64-bit Dec Alpha 
Author Message
 Help: porting 32-bit app to 64-bit Dec Alpha

Hi,

I am porting a 32-bit application to the Dec Alpha mechine. My program looks like this:
=============================================================
void foo(char **argv);

int
main (argc, argv)
    int argc;
    char **argv;
{

    ...
    foo(argv);  

Quote:
}

======================================================================

When I compiled the program, I got the following warning:

cc -g -taso -noansi_alias -xtaso_short -c test.c -o test.o
cc: Warning: test.c, line 21: In this statement, the referenced type
of the pointer value "argv" is "long pointer to signed char", which is
not compatible with "short pointer to signed char". (ptrmismatch)
    foo(argv);
--------^

Any idea about how I can fix this pointer size mismatch problem?

Thanks,

-- Chris



Tue, 02 Oct 2001 03:00:00 GMT  
 Help: porting 32-bit app to 64-bit Dec Alpha
Have you tried removing the old-style declarations -- some compilers might
care:

void foo(char **argv);

int main (int argc, char **argv)
{

    ...
    foo(argv);
    return 0;

Quote:
}

--

Paul Lutus
www.arachnoid.com

<snip>



Tue, 02 Oct 2001 03:00:00 GMT  
 Help: porting 32-bit app to 64-bit Dec Alpha
Aso, try declaring foo as "void foo(far char **argv);"

Might work.

-Ganesh

Quote:

>Have you tried removing the old-style declarations -- some compilers might
>care:

>void foo(char **argv);

>int main (int argc, char **argv)
>{

>    ...
>    foo(argv);
>    return 0;
>}

>--

>Paul Lutus
>www.arachnoid.com


><snip>



Tue, 02 Oct 2001 03:00:00 GMT  
 Help: porting 32-bit app to 64-bit Dec Alpha
 : Aso, try declaring foo as "void foo(far char **argv);"

There is no such type as ``far char'' in C.

--
John Rixon



Wed, 03 Oct 2001 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Tool 2 port 32 bit programms 2 64 bit

2. top 32 bits of 64-bit product of two 32-bit integers

3. 32 bit Icons and C# VS.net (24 bit + 8 bit alpha)

4. 64-bit integer on a 32-bit machine

5. Calling 64 bit lib. from 32 bit program

6. emulating a 64 bit divide with 2 32 bit registers in ansi c

7. converting signed 64 bit - 32 bit

8. 64 bit operation on 32 bit PC

9. 64-bit chips, 32-bit compatibility?

10. REQUEST: 64-bit integer math on 32-bit processor

11. Accessing 32-bit com componet from 64-bit application

12. 32-bit vs 64-bit

 

 
Powered by phpBB® Forum Software