This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug lto/51744] Erroneous warning: memset used with constant zero length parameter


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

--- Comment #9 from Mark Pizzolato <mark at infocomm dot com> ---
> When val == 0 then the case of len == 0 is ambiguous and you can't really
tell the user they swapped val and len (because they are equal).

That is certainly true.

I'm not sure how that specifically relates to the problem since the warning
message is only about the length being 0.

The problem is that the warning is being issued incorrectly when the set value
is != 0 and the length is not a constant.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]