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: Type-punning



On Tue, 26 Jun 2007, Andrew Pinski wrote:

> On 6/26/07, Herman Geza <hg211@hszk.bme.hu> wrote:
> > Having the same layout makes them "the same".
> Not in C or C++ and in most cases of fortran too (unless you add an
> attribute).
Yes, it's clear now, thanks.  However, it brings a new question: the 
standard defines layout-compatible types. For example, if I'm correct, my Vector 
and Point are layout compatible.  What can I do with layout compatible 
objects?  I found the definiton of layout compatible types, but found no 
uses of them.  Why is it "important" that Point and Vector are 
layout-compatible? (is this question offtopic here?).

Geza


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