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++/43787] [4.5/4.6 Regression] memory copy of empty class (sizeof is one)



------- Comment #10 from navin dot kumar at gmail dot com  2010-04-19 23:44 -------
Wolfgang,

The opening post was a bad example, and it unfortunately is drawing attention. 
I agree, it is invalid code for deferencing a NULL pointer.  However, please
see my other posts, detailing how the actual issue is a performance bug (missed
optimization) regression in GCC 4.5.0 for the following (valid) code:
empty_t a;
empty_t b = a;

GCC4.4.2 did not do any memory copying in the above example, but GCC4.5.0 does.


-- 

navin dot kumar at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|INVALID                     |


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


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