With new gcc9 how to handle error from -Werror=address-of-packed-member

Normand normand@linux.vnet.ibm.com
Wed Feb 13 16:59:00 GMT 2019

With new gcc9 there are new error reported by 
How to handle such error ?

libflash/ecc.c:419:24: error: taking address of packed member of 'struct 
ecc64' may result in an unaligned pointer value 
   419 |   memcpy(inc_uint64_by(&ecc_word.data, alignment), src, 
       |                        ^~~~~~~~~~~~~~

Michel Normand

More information about the Gcc-help mailing list