http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48916
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED CC| |jakub at gcc dot gnu.org Resolution| |INVALID --- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-05-06 12:01:45 UTC --- This is invalid with -D_FORTIFY_SOURCE=2, valid with -D_FORTIFY_SOURCE=1. -D_FORTIFY_SOURCE=2 limits what can be crossed, you can't cross fields except for a few exceptions (flexible array members and flexible-like array member constructs). This one isn't considered flexible-like array member. Either build with -D_FORITYF_SOURCE=1 instead of =2, or use memcpy instead of strcpy.