From: peltz@jaka.ece.uiuc.edu (Steve Peltz)
Subject: Re: Bug in OSF1.32 C compiler on alpha
Date: 1996/07/01 [thread overview]
Message-ID: <4r9jsg$p3h@vixen.cso.uiuc.edu> (raw)
In-Reply-To: 4r965l$inj@news.psc.edu
In article <4r965l$inj@news.psc.edu>, Nigel Goddard <ngoddard@psc.edu> wrote:
>static void F(x)
> float x;
>{
> (void) printf("%f\n", x);
> G(&x);
>}
The "float" you have there is really a double, according to the promotion
rules. So you're passing a pointer to a double to a function which expects
a pointer to a float.
Try adding the following line:
printf("%d %d %d\n", sizeof x, sizeof(float), sizeof(double));
It shows 8 4 8.
next prev parent reply other threads:[~1996-07-01 4:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-07-01 4:00 Bug in OSF1.32 C compiler on alpha Nigel Goddard
1996-07-01 4:00 ` Daryl Clevenger
1996-07-01 4:00 ` Steve Peltz [this message]
1996-07-02 4:00 ` Dan Pop
1996-07-08 4:00 ` Steve Peltz
1996-07-08 4:00 ` Dan Pop
1996-07-02 4:00 ` Dan Pop
1996-07-03 4:00 ` Andy V
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