Re: pointer math vs named address spaces

2014-12-10 Thread Richard Henderson
On 12/10/2014 05:36 AM, Richard Biener wrote: > On Wed, Dec 10, 2014 at 2:24 AM, Richard Henderson wrote: >> On 12/04/2014 01:54 AM, Richard Biener wrote: >>> Apart from what Joseph already said using 'sizetype' in the middle-end >>> for sizes and offsets is really really deep-rooted into the comp

Re: pointer math vs named address spaces

2014-12-10 Thread Richard Biener
On Wed, Dec 10, 2014 at 2:24 AM, Richard Henderson wrote: > On 12/04/2014 01:54 AM, Richard Biener wrote: >> Apart from what Joseph already said using 'sizetype' in the middle-end >> for sizes and offsets is really really deep-rooted into the compiler. >> What you see above is one aspect - POINTER

Re: pointer math vs named address spaces

2014-12-09 Thread Richard Henderson
On 12/04/2014 01:54 AM, Richard Biener wrote: > Apart from what Joseph already said using 'sizetype' in the middle-end > for sizes and offsets is really really deep-rooted into the compiler. > What you see above is one aspect - POINTER_PLUS_EXPR offsets > are forced to have sizetype type. But you'

Re: pointer math vs named address spaces

2014-12-04 Thread Richard Biener
On Wed, Dec 3, 2014 at 11:34 PM, DJ Delorie wrote: > > If a target (rl78-elf in my case) has a named address space larger > than the generic address space (__far in my case), why is pointer math > in that named address space still truncated to sizetype? > > N1275 recognizes that named address spac

Re: pointer math vs named address spaces

2014-12-03 Thread Joseph Myers
On Wed, 3 Dec 2014, DJ Delorie wrote: > > However, pointer subtraction still returns ptrdiff_t, and sizeof still > > returns size_t, > > Why? Well, TR 18037 doesn't do anything to change that, so if you define some target-specific way to use different types in certain circumstances then you'r

Re: pointer math vs named address spaces

2014-12-03 Thread DJ Delorie
> However, pointer subtraction still returns ptrdiff_t, and sizeof still > returns size_t, Why?

Re: pointer math vs named address spaces

2014-12-03 Thread Joseph Myers
On Wed, 3 Dec 2014, DJ Delorie wrote: > If a target (rl78-elf in my case) has a named address space larger > than the generic address space (__far in my case), why is pointer math > in that named address space still truncated to sizetype? > > N1275 recognizes that named address spaces might be a

pointer math vs named address spaces

2014-12-03 Thread DJ Delorie
If a target (rl78-elf in my case) has a named address space larger than the generic address space (__far in my case), why is pointer math in that named address space still truncated to sizetype? N1275 recognizes that named address spaces might be a different size than the generic address space, b