[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <511530AC.1070203@linux.intel.com>
Date: Fri, 08 Feb 2013 09:06:52 -0800
From: "H. Peter Anvin" <hpa@...ux.intel.com>
To: Russell King - ARM Linux <linux@....linux.org.uk>
CC: kbuild test robot <fengguang.wu@...el.com>,
Ville Syrjälä
<ville.syrjala@...ux.intel.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: sound/pci/asihpi/hpioctl.c:125:6: warning: cast to pointer from
integer of different size
On 02/08/2013 07:28 AM, Russell King - ARM Linux wrote:
>
> Whether that's safe for x86 or not, I don't know, but my suspicions are
> that it's unsafe on x86 as it's possible to refer to the various bytes/
> half-words of eax separately.
>
> So, I came to the conclusion that if x86 remains a problem, there's
> little point supporting it on ARM.
>
It is possible to access bytes separately, but gcc generally doesn't.
However, whether or not that can be relied upon safely is a tricky question.
It *is* also worth nothing that the x86 ABI does allow two words to be
returned in registers from a normal C function, simply by returning a
structure. That doesn't solve the problem at hand, though, which is how
to make a type-neutral macro which can handle doublewords...
-hpa
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists