This is the mail archive of the gcc-patches@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]

Re: PATCH: warn on memset with constant length 0


On Mon, 2006-12-04 at 14:58 +0100, =?iso-8859-1?q?M=FCller?=, Dirk
wrote:
> warning: memset used with constant zero length parameter
> 
> though I cannot figure out which gcc version broke it. 

GCC never did the warning, glibc did that warning
http://sources.redhat.com/ml/libc-hacker/2005-02/msg00062.html

The main reason why we don't get the warning with __builtin_memset
currently is because the inline function which glibc has never sees
__builtin_memset.

Really if you want GCC to do the warning, the warning should happen in
the front-end so you don't get the false warnings which we could get
now.  

Thanks,
Andrew Pinski


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