[Bug c++/43787] [4.5/4.6 Regression] regression on copy-constructor of empty class

navin dot kumar at gmail dot com gcc-bugzilla@gcc.gnu.org
Sun Apr 18 18:31:00 GMT 2010



------- Comment #2 from navin dot kumar at gmail dot com  2010-04-18 18:31 -------
Only GCC4.5.0 is emitting a copy-constructor that copies 1 byte of data
(probably because sizeof(empty_t) == 1 according to the C++ ABI).   The
copy-constructor *should* be a noop, and indeed GCC4.4.2 issues a noop for
copying empty classes.


-- 


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



More information about the Gcc-bugs mailing list