>>> On 13.02.19 at 11:28, wrote:
> On 2/12/19 4:03 PM, Jan Beulich wrote:
> On 12.02.19 at 16:32, wrote:
>>> On 12/02/2019 15:26, Ian Jackson wrote:
> But if we really want to have ptrdiff_t, then I think we should either
> follow the uintptr_t model and use attribute((mode())),
On 2/12/19 4:03 PM, Jan Beulich wrote:
On 12.02.19 at 16:32, wrote:
>> On 12/02/2019 15:26, Ian Jackson wrote:
>>>
But if we really want to have ptrdiff_t, then I think we should either
follow the uintptr_t model and use attribute((mode())), or we should
leverage the compiler's
On Tue, 12 Feb 2019, Jan Beulich wrote:
> >>> On 12.02.19 at 02:13, wrote:
> > --- a/xen/include/xen/types.h
> > +++ b/xen/include/xen/types.h
> > @@ -52,7 +52,8 @@ typedef __u32 __be32;
> > typedef __u64 __le64;
> > typedef __u64 __be64;
> >
> > -typedef unsigned int __attribute__((__mode__(_
>>> On 12.02.19 at 16:32, wrote:
> On 12/02/2019 15:26, Ian Jackson wrote:
>>
>>> But if we really want to have ptrdiff_t, then I think we should either
>>> follow the uintptr_t model and use attribute((mode())), or we should
>>> leverage the compiler's __PTRDIFF_TYPE__ (and then also
>>> __UINTPT
>>> On 12.02.19 at 16:26, wrote:
> Jan Beulich writes ("Re: [PATCH v9 1/5] xen: introduce ptrdiff_t, fix
> uintptr_t"):
>> On 12.02.19 at 02:13, wrote:
>> > -typedef unsigned int __attribute__((__mode__(__pointer__))) uintptr_t;
>> > +typedef unsigned long __attribute__((__mode__(__pointer__)))
On 12/02/2019 15:26, Ian Jackson wrote:
>
>> But if we really want to have ptrdiff_t, then I think we should either
>> follow the uintptr_t model and use attribute((mode())), or we should
>> leverage the compiler's __PTRDIFF_TYPE__ (and then also
>> __UINTPTR_TYPE__ for uintptr_t, at least if avail
Jan Beulich writes ("Re: [PATCH v9 1/5] xen: introduce ptrdiff_t, fix
uintptr_t"):
> On 12.02.19 at 02:13, wrote:
> > -typedef unsigned int __attribute__((__mode__(__pointer__))) uintptr_t;
> > +typedef unsigned long __attribute__((__mode__(__pointer__))) uintptr_t;
>
> I don't understand this c
>>> On 12.02.19 at 02:13, wrote:
> --- a/xen/include/xen/types.h
> +++ b/xen/include/xen/types.h
> @@ -52,7 +52,8 @@ typedef __u32 __be32;
> typedef __u64 __le64;
> typedef __u64 __be64;
>
> -typedef unsigned int __attribute__((__mode__(__pointer__))) uintptr_t;
> +typedef unsigned long __attr
uintptr_t should be "unsigned long" -- same size as a pointer.
Introduce the new type "ptrdiff_t" which is defined as the signed
integer type of the result of subtracting two pointers.
Signed-off-by: Stefano Stabellini
CC: jbeul...@suse.com
CC: andrew.coop...@citrix.com
CC: julien.gr...@arm.com