From: dmurphy@gemmax.enet.dec.com (Dennis Murphy)
Subject: Re: OSF/ALPHA C compiler bug
Date: 13 Jan 1994 21:44:15 GMT [thread overview]
Message-ID: <2h4fbf$6rn@nntpd.lkg.dec.com> (raw)
In-Reply-To: 2et0mf$1v3@overload.lbl.gov
With the program altered as follows:
main()
{
int i1;
float f=0.0;
char *cp;
int *ip=(int*)&cp;
*ip = f;
if (cp != NULL)
printf("cp is not NULL, but -> 0x%lx\n", cp);
printf("size of ptr is %d, size of int is %d\n", sizeof(cp), sizeof(i1) );
}
I get the results:
cp is not NULL, but -> 0x100000000
size of ptr is 8, size of int is 4
I hope that this helps:
Dennis Murphy
prev parent reply other threads:[~1994-01-13 21:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
1993-12-17 19:18 OSF/ALPHA C compiler bug Guojun Jin[ITG]
1993-12-17 19:55 ` David J. MacKenzie
1993-12-17 21:46 ` OSF/ALPHA C compiler bug (not!) Daniel S. Riley
1994-01-13 21:38 ` OSF/ALPHA C compiler bug Dennis Murphy
1994-01-13 21:44 ` Dennis Murphy [this message]
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox