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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Zero length array inside of another string is not a flexible array member, nor
anything close to that, and with -D_FORTIFY_SOURCE=2 is not even supposed to be
handled like flexible array member alternative.  Thus, I don't see why you
think this is a bug.  Simply don't do it, use -D_FORTIFY_SOURCE=1 instead, or
use e.g. memcpy instead of strncpy which is allowed even in -D_FORTIFY_SOURCE=2
mode (which is stricter than what C/C++ allows) to cross field boundaries.

Reply via email to