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 middle-end/32887] warning for memset with zero size



------- Comment #15 from manu at gcc dot gnu dot org  2007-07-26 16:58 -------
(In reply to comment #14)
> Subject: Re:  warning for memset with zero size
> 
> On 26 Jul 2007 13:57:41 -0000, manu at gcc dot gnu dot org
> <gcc-bugzilla@gcc.gnu.org> wrote:
> >
> > I think that is a sensible feature request, am I missing something Andrew?
> 
> memset with a zero size is valid code.
> 

I am not saying that is invalid. I am saying that it is a statement with no
effect. So it could be warned as we warn for:  { 0; }
Perhaps memset with size 0 appears frequently in real-code as the result of
macro expansions or such. Then, this must be closed as WONTFIX and similar
requests can be directed at this PR.


-- 


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


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