[Bug middle-end/32887] warning for memset with zero size

2007-09-10 Thread pinskia at gcc dot gnu dot org


--- Comment #16 from pinskia at gcc dot gnu dot org  2007-09-10 14:07 
---


*** This bug has been marked as a duplicate of 16794 ***


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||DUPLICATE


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



[Bug middle-end/32887] warning for memset with zero size

2007-07-26 Thread manu at gcc dot gnu dot org


--- Comment #13 from manu at gcc dot gnu dot org  2007-07-26 13:57 ---
(In reply to comment #12)
 I want the warning.
 but why the warning is glibc's bug?

Andrew already tried to explain. It is a side-effect of a bug in glibc.

 because memset(x,19,0), is buggy code.
 I need the warning.

I think that is a sensible feature request, am I missing something Andrew? 
I hope someone will be so kind to implement it for you (or you decide to
implement it yourself).


-- 

manu at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||manu at gcc dot gnu dot org
Summary|memset warning  |warning for memset with zero
   ||size


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



[Bug middle-end/32887] warning for memset with zero size

2007-07-26 Thread pinskia at gmail dot com


--- Comment #14 from pinskia at gmail dot com  2007-07-26 16:51 ---
Subject: Re:  warning for memset with zero size

On 26 Jul 2007 13:57:41 -, manu at gcc dot gnu dot org
[EMAIL PROTECTED] wrote:

 I think that is a sensible feature request, am I missing something Andrew?

memset with a zero size is valid code.

Thanks,
Andrew Pinski


-- 


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



[Bug middle-end/32887] warning for memset with zero size

2007-07-26 Thread manu at gcc dot gnu dot org


--- 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 -, manu at gcc dot gnu dot org
 [EMAIL PROTECTED] 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



Re: [Bug middle-end/32887] warning for memset with zero size

2007-07-26 Thread Andrew Pinski

On 26 Jul 2007 13:57:41 -, manu at gcc dot gnu dot org
[EMAIL PROTECTED] wrote:


I think that is a sensible feature request, am I missing something Andrew?


memset with a zero size is valid code.

Thanks,
Andrew Pinski