------- Additional Comments From pinskia at physics dot uc dot edu 2005-08-25 15:53 ------- Subject: Re: nonoverlapping_memrefs_p returns true even for overlapping memory references
> > > ------- Additional Comments From jakub at gcc dot gnu dot org 2005-08-25 > 15:47 ------- > > That is invalid as a.a2 is only 5 in size and "HELLO" is 6 in size. > I know it overlaps into the next field. Whether it is invalid is unclear to > me. > How about memcpy ((char *) &a + offsetof (struct A, a2), "HELLO", 6)? > Is there supposed to be any semantic difference between the 2? yes because one talks about the object a and the other one talks about the object a.a2. This is at least as I understand what the C standard says. -- Pinski -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23561