https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88771

--- Comment #4 from Martin Sebor <msebor at gcc dot gnu.org> ---
The warning is triggered by the excessive size argument in the strncpy call. 
The excessive size makes the call invalid regardless of the values of the two
pointer arguments.

This happens both with the reduced test case in comment #0 and with the
translation unit and -m32.  The warning code just looks at the call:

  __builtin_strncpy (_65, buf_30, 4294967295);

I don't see much the warning code alone can do to handle this case.  We have
talked about at least two approaches to dealing these invalid calls earlier. 
Jeff's preference is to replace them with traps.  Others have suggested
replacing them with __builtin_unreachable().

Reply via email to