[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070628120803.GI7012@devserv.devel.redhat.com>
Date: Thu, 28 Jun 2007 08:08:03 -0400
From: Jakub Jelinek <jakub@...hat.com>
To: Kyle Moffett <mrmacman_g4@....com>
Cc: Matthew Wilcox <matthew@....cx>, Adrian Bunk <bunk@...sta.de>,
LKML Kernel <linux-kernel@...r.kernel.org>,
David Woodhouse <dwmw2@...radead.org>, david@...g.hm,
Andi Kleen <ak@...e.de>, linux-arch@...r.kernel.org
Subject: Re: Userspace compiler support of "long long"
On Thu, Jun 28, 2007 at 07:53:51AM -0400, Kyle Moffett wrote:
> On Jun 27, 2007, at 23:57:54, Matthew Wilcox wrote:
> >On Wed, Jun 27, 2007 at 06:30:52PM -0400, Kyle Moffett wrote:
> >>Then all 64-bit archs have:
> >>typedef signed long __s64;
> >>typedef unsigned long __u64;
> >>
> >>While all 32-bit archs have:
> >>typedef signed long long __s64;
> >>typedef unsigned long long __u64;
> >
> >include/asm-parisc/types.h:typedef unsigned long long __u64;
> >
> >For both 32 and 64-bit.
> >
> >include/asm-sh64/types.h:typedef unsigned long long __u64;
> >include/asm-x86_64/types.h:typedef unsigned long long __u64;
> >
> >So that's three architectures that violate your first assertion.
>
> Oh, ok, that makes it even easier to say this with certainty:
> Changing the other 64-bit archs to use "long long" for their 64-bit
> numbers will not cause additional warnings. I'm also almost certain
> there are no architectures which use "long long" for 128-bit
> integers. (Moreover, I can't find hardly anything which does 128-bit
> integers at all).
unsigned long and unsigned long long have the same size, precision
and alignment on all LP64 arches, that's true. But they have
different ranks and more importantly they mangle differently in C++.
So, whether some user exposed type uses unsigned long or unsigned long long
is part of the ABI, whether that's size_t, uintptr_t, uint64_t, u_int64_t
or any other type, you can't change it without breaking the ABI.
Jakub
-
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