------- Additional Comments From rth at gcc dot gnu dot org  2005-08-25 16:35 
-------
All that said, I personally would consider this a source code bug.  If you
really meant to initialize two members of the structure, I think it makes
logical sense that you refer to the object as a whole.  Otherwise we deny
the ability to apply sensible range checks to array members within objects.

And in the case in question, it's quite obviously an off-by-one bug on the
part of the programmer.  They did not really intend to initialize a3[0] twice.
So I think it would be useful if _FORTIFY_SOURCE complained about this usage
even if it turns out to be within the letter of the law.

-- 


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

Reply via email to