This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: `__norestrict' type qualifier
According to Jamie Lokier:
> Chip Salzenberg wrote:
> > > > (And alignment _can_ be a property of pointers on a word- addressed
> > > > machine.)
> > >
> > > In the scope of ISO C?
> >
> > Yes. On a word-addressed machine, a native pointer addresses a single
> > word, which contains multiple bytes. To address a byte you need an
> > address and a byte index within the addressed word. So sizeof(char*)
> > is greater than sizeof(struct*), for example.
>
> I don't think that's relevant to alignment as we meant it: there are
> no unaligned pointers on those machines!
That's my point. A char* can be incorrectly aligned to extract a
word, if the byte index is nonzero. But a word* can't be. Therefore
if you define __norestrict pointers in terms of char* copying, then
you must allow for nonaligned words, and therefore you must make all
__norestrict pointers "fat". This would be a Bad Thing.
--
Chip Salzenberg - a.k.a. - <chip@perlsupport.com>
"When do you work?" "Whenever I'm not busy."