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 arg
> 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 ori
On Wed, Jul 09, 2014 at 12:51:32PM +0200, Richard Biener wrote:
> At least it shouldn't (they are not required to be shared and usually are not
> if they've gone a transition from TREE_OVERFLOW to !TREE_OVERFLOW).
>
> Well, still feels ugly to me - but it's Jasons call in the end.
Another possibi
On Wed, Jul 9, 2014 at 12:32 PM, Jakub Jelinek wrote:
> On Wed, Jul 09, 2014 at 12:26:09PM +0200, Richard Biener wrote:
>> > I suppose we could use an INTEGER_CST distinct from the one in
>> > TYPE_CACHED_VALUES for raw 0, with a TREE_LANG_FLAG set.
>>
>> Ick. (please no - at least make sure it d
On Wed, Jul 09, 2014 at 12:26:09PM +0200, Richard Biener wrote:
> > I suppose we could use an INTEGER_CST distinct from the one in
> > TYPE_CACHED_VALUES for raw 0, with a TREE_LANG_FLAG set.
>
> Ick. (please no - at least make sure it doesn't survive anywhere to the
> middle-end, like fold or gi
On Wed, Jul 9, 2014 at 12:33 AM, Jason Merrill wrote:
> On 07/08/2014 12:38 PM, Carlos O'Donell wrote:
>>
>> What rationale would you give for not warning on 1-1?
>
>
> Because it's not likely to be a case of argument transposition; it's more
> likely to be an expression that just happens to evalu
On 07/08/2014 12:38 PM, Carlos O'Donell wrote:
What rationale would you give for not warning on 1-1?
Because it's not likely to be a case of argument transposition; it's
more likely to be an expression that just happens to evaluate to 0,
which is fine as a length argument to memset.
On 07/0
On Tue, Jul 08, 2014 at 03:24:52PM -0400, Jason Merrill wrote:
> I don't think we want to warn about e.g. 1-1, only about literal 0.
Well, at least literal 0 and '\0'. In any case, it seems both the C and C++
FEs fold the arguments too early, already during the parsing of the argument
list. In t
On 07/08/2014 03:24 PM, Jason Merrill wrote:
> I don't think we want to warn about e.g. 1-1, only about literal 0.
What rationale would you give for not warning on 1-1?
Cheers,
Carlos.
On 07/08/2014 08:50 AM, Jakub Jelinek wrote:
> Hi!
>
> This is an attempt to move the warning about transposed memset arguments
> from the glibc headers to gcc FEs. The problem with the warning in glibc
> is that it uses __builtin_constant_p and e.g. jump threading very often
> makes the warning
ceware.org
Subject: [RFC PATCH] -Wmemset-transposed-args (PR middle-end/61294)
Hi!
This is an attempt to move the warning about transposed memset arguments
from the glibc headers to gcc FEs. The problem with the warning in glibc
is that it uses __builtin_constant_p and e.g. jump threading very often
Hi!
This is an attempt to move the warning about transposed memset arguments
from the glibc headers to gcc FEs. The problem with the warning in glibc
is that it uses __builtin_constant_p and e.g. jump threading very often
makes the warning trigger even on code where it is very unlikely a user
swa
12 matches
Mail list logo