ros / roscpp_core

ros distribution sandbox
89 stars 116 forks source link

Fix GCC8 class-memaccess warning #102

Closed nlimpert closed 5 years ago

nlimpert commented 5 years ago

GCC8 raises a class-memaccess warning on memcpy for objects of class type (see https://gcc.gnu.org/onlinedocs/gcc/C_002b_002b-Dialect-Options.html).

This is related to (and fixes) https://github.com/ros/gencpp/issues/37 (I had the same issue with messages specifying a duration[]).


My GCC version on Fedora 28 is gcc (GCC) 8.2.1 20181215 (Red Hat 8.2.1-6)

dirk-thomas commented 5 years ago

Thanks for the patch.