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 6/26/07, Silvius Rus <rus@google.com> wrote:
I also think this case should not be flagged.  I have seen similar usage
in network programming.  Did it actually result in bad code or was it
just the warning that bothered you?

This case is valid only if you go back to original type of Vector. Sorry but the C++ standard says even if two structs have the same layout, the types are different even for aliasing.

Thanks,
Andrew Pinski


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