Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: jin@gracie.lbl.gov (Guojun Jin[ITG])
Subject: OSF/ALPHA C compiler bug
Date: 17 Dec 1993 19:18:39 GMT	[thread overview]
Message-ID: <2et0mf$1v3@overload.lbl.gov> (raw)

============================== test.c ====================================
include <stdio.h>
 
main()
{
float   f=0.0;
char    *cp;
int     *ip=(int*)&cp;
        *ip = f;
if (cp != NULL)
        printf("cp is not NULL, but -> %d\n", cp);
printf("Cp is %u\n", cp);
}
 
============================== end of test.c ================================
alpha1: cc -g test.c
alpha1: a.out
cp is not NULL, but -> 0
Cp is 0
 
What is the cp value?
 
/---------------------------------------v-------------------------------\
|	Jin Guojun, Imaging Technology	| Internet: g_jin@lbl.gov	|
|	Lawrence Berkeley Laboratory	| Usenet: ucbvax!g_jin@lbl.gov	|
|			| Bitnet:	jin%george.lbl.gov@Csa3.LBL.Gov	|


             reply	other threads:[~1993-12-17 19:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-12-17 19:18 Guojun Jin[ITG] [this message]
1993-12-17 19:55 ` OSF/ALPHA C compiler bug 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
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