This is the mail archive of the
mailing list for the GCC project.
Re: [RFC PATCH] -Wmemset-transposed-args (PR middle-end/61294)
- From: Jason Merrill <jason at redhat dot com>
- To: Manuel López-Ibáñez <lopezibanez at gmail dot com>, Gcc Patch List <gcc-patches at gcc dot gnu dot org>
- Cc: Richard Biener <richard dot guenther at gmail dot com>, Jakub Jelinek <jakub at redhat dot com>, "Joseph S. Myers" <joseph at codesourcery 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: Wed, 09 Jul 2014 17:28:34 -0400
- Subject: Re: [RFC PATCH] -Wmemset-transposed-args (PR middle-end/61294)
- Authentication-results: sourceware.org; auth=none
- References: <CAESRpQDeicuneH9VGgCEhUNz3Kfn3EAJa+JO64iqLoHH9xgbpA at mail dot gmail dot com>
On 07/09/2014 10:40 AM, Manuel López-Ibáñez wrote:
All of these warnings (-Wsizeof-pointer-memaccess, -Wsizeof-array-argument
and -Wmemset-transposed-args) are implemented in a hackish way, because we
fold everything too early. Perhaps for such analysis we want a FOLDED_EXPR
which would have arguments what it has been folded to and the original tree,
for the purposes of code generation the first argument would be used and
the second one only for the analysis. We don't have that many spots where
we need the original trees to be analyzed yet for it to be worth it though
But if we keep adding hacks around it, there will never be progress
and the person(s) who take the challenge of properly fixing this will
not only have to deal with the task itself but also with all the ugly
and obscure hacks added year after year.
I'm planning to address this soon, hopefully this stage 1.