From: Michal Jaegermann <michal@ellpspace.math.ualberta.ca>
To: axp-list@redhat.com
Subject: Re: Weird Compaq CCC / GCC interaction ?
Date: Tue, 26 Sep 2000 10:02:27 -0600 (MDT) [thread overview]
Message-ID: <200009261602.KAA11797@ellpspace.math.ualberta.ca> (raw)
In-Reply-To: <20000926111252.A17671@snowball.ucd.ie> from "Nikita Schmidt" at Sep 26, 2000 11:12:52 AM
>
> According to the Calling Standard for Alpha Systems, Section 4.1.5 "Unused
> Bits in Passed Data," both signed and unsigned ints should be passed
> sign-extended in registers.
Good to know but why this convention? If I follow implications
correctly (which is a big IF) then if I take results of such function
returning unsigned int, like in the example, and will cast its result to
long then I may get a negative number. OTOH if I do:
#define MAGIC 0xc00fc00fU
...
printf ("%ld\n", (long)MAGIC);
...
then result is positive and I would be quite surprised otherwise.
Or this Standard makes this also into a bug and expects that the
cast above is equivalent to (long)((int)MAGIC)? If yes then again
why?
Michal
next prev parent reply other threads:[~2000-09-26 16:02 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-09-26 8:55 Weird Compaq CCC / GCC interaction ? David Addison
2000-09-26 9:41 ` Andrei A. Dergatchev
2000-09-26 10:12 ` Nikita Schmidt
2000-09-26 16:02 ` Michal Jaegermann [this message]
2000-09-26 12:23 ` Ivan Kokshaysky
2000-09-26 13:57 ` Ivan Kokshaysky
-- strict thread matches above, loose matches on Subject: below --
2000-09-26 13:59 David Addison
2000-09-26 15:36 ` Ivan Kokshaysky
2000-09-26 17:25 Larry Sendlosky
2000-09-26 18:01 ` Michal Jaegermann
2000-09-27 3:17 ` Richard Henderson
2000-09-26 17:47 David Addison
2000-09-26 18:52 Larry Sendlosky
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