On Tue, 02 Nov 2004 16:28:50 +0530, Ramprasad A Padmanabhan
<[EMAIL PROTECTED]> wrote:

> Is there any way I can find this portably

C code should be able to tell (Solaris example)

#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>

static char chararray[] = "abcdefghijklmnopqrstuvwxyz";
static char *myfunc(int i)
{ 
  return(& chararray[i]);
}

void main(void) 
{
 int intx;
 long longx;
 char *ptrx;

 (void) scanf("%d", &longx);
 intx = longx;
 ptrx = myfunc(longx);
 (void) printf("%d\n", longx);
 intx = ptrx;
 ptrx = intx;
 intx = (int)longx;
 ptrx = (char *)intx;
 intx = 2147483648L;
 intx = (int) 2147483648L;
 ptrx = myfunc(2147483648L);
}


Using "man lint.1"  If the system is not 64-bit clean -- you will get
a lot of errors.

See:
http://64.233.179.104/search?q=cache:5j9T_MBC1W8J:dry.atmos.washington.edu:8888/ab2/coll.45.13/SOL64TRANS/%40Ab2PageView/1088+32-bit+versus+64-bit+c+code+test&hl=en

-- 
WC -Sx- Jones
http://youve-reached-the.endoftheinternet.org/

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to