https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108334
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Can you attach the preprocessed source? GCC thinks you are trying to do a memcpy to a null pointer really: cc1plus.exe: note: destination object is likely at address zero Which could mean either the code which GCC is warning is "dead" code and should have been optimized away or you really are trying to do a memcpy to a nullptr.