This is the mail archive of the gcc-bugs@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]

[Bug c++/34295] Bad optimization in an inlined method



------- Comment #4 from steven at gcc dot gnu dot org  2007-11-29 17:23 -------
Try compiling with -fno-strict-aliasing.  This is only automatically enabled at
-O2 or higher.  See the fine manual.

I'm not sure what you mean with "more efficient than memcpy".  If you mean more
efficient as in producing better code: Have you actually checked what comes out
of the compiler if you do this?  If you mean more elegant from a coding style
point of view: The language provides the means, it is called "union".


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34295


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