On Mon, Oct 25, 2010 at 11:26 AM, Paul Koning <paul_kon...@dell.com> wrote:
> Question on movmemm:
>
> Given
>
> extern int *i, *j;
> void foo (void) { memcpy (i, j, 10); }
>
> I would expect to see argument 4 (the shared alignment) to be sizeof(int) 
> since both argument are pointers to int.  What I get instead is 1.  Why is 
> that?

Because the int * could point to unaligned data and there is no access
that would prove otherwise (memcpy accepts any alignment).

Richard.

> If I have
>
> extern int i[10], j[10];
>
> then I do get larger alignment as expected.
>
>        paul
>
>

Reply via email to