This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix C++ strict-aliasing issues with memcpy folding


On Sun, Jan 24, 2010 at 6:14 PM, Mark Mitchell <mark@codesourcery.com> wrote:

> In that case, I don't think that "following the standard" is a useful
> thing to try to do. ?"Fix the standard" might be useful, of course.
> But, as an implementor, I think we should do something sensible. ?I'm
> very bothered by the idea that:
>
> ?int i;
> ?int *p = &i;
> ?// something
> ?*p = 3;
>
> might be invalid. ?That seems very wrong.

I cannot find any text that says that if 'p' still points
to the storage of 'i', then the above is invalid.

-- Gaby


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]