This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] -Wmemset-transposed-args (PR middle-end/61294, take 2)
- From: Gerald Pfeifer <gerald at pfeifer dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Jason Merrill <jason at redhat dot com>, "Joseph S. Myers" <joseph at codesourcery dot com>, Manuel López-Ibáñez <lopezibanez at gmail dot com>, Gcc Patch List <gcc-patches at gcc dot gnu dot org>, Richard Biener <richard dot guenther at gmail dot com>, Siddhesh Poyarekar <siddhesh at redhat dot com>, Carlos O'Donell <carlos at redhat dot com>, GNU C Library <libc-alpha at sourceware dot org>
- Date: Fri, 11 Jul 2014 01:29:12 +0200 (CEST)
- Subject: Re: [PATCH] -Wmemset-transposed-args (PR middle-end/61294, take 2)
- Authentication-results: sourceware.org; auth=none
- References: <CAESRpQDeicuneH9VGgCEhUNz3Kfn3EAJa+JO64iqLoHH9xgbpA at mail dot gmail dot com> <53BDB402 dot 20309 at redhat dot com> <20140710125222 dot GI31640 at tucnak dot redhat dot com>
On Thu, 10 Jul 2014, Jakub Jelinek wrote:
> +Wmemset-transposed-args
> +C ObjC C++ ObjC++ Var(warn_memset_transposed_args) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
> +Warn about suspicious call to memset where the third argument is constant zero and second is not zero
"calls" (plural), like in the .texi documentation?
"and the second"
(If you want to keep it short, you could say "the third argument is
constant zero and the second is not".)
> +Warn for suspicious calls to the memset built-in function, if the
Should this be @code{memset} as well?
> +second argument is not zero and third argument is zero. This warns e.g.@
"the third argument"
> +about @code{memset (buf, sizeof buf, 0);} where most probably
> +@code{memset (buf, 0, sizeof buf);} was meant instead.
I believe this will look better without the semicolons.
Gerald