This is the mail archive of the gcc@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: ISO Aliasing rules question




--On Friday, February 21, 2003 10:16:02 AM -0700 "law at redhat dot com" <law at redhat dot com> wrote:

Is this correct?  Or is my recollection of the ISO standard incorrect
here?

This is tricky. In general, you're right -- the structure of the type doesn't matter, only the name.

But, then there's the "common initial sequence" stuff -- which doesn't apply in your example, but can in other palces. See 6.5.2.3 in your C99 standard for details.

Bottom line: the optimization in the code you showed is correct.

--
Mark Mitchell                mark at codesourcery dot com
CodeSourcery, LLC            http://www.codesourcery.com


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