For the record, this new warning/code found at least three actual
bugs in Wine (two of which were in the testsuite, but still).
Definitely a useful addition.
Gerald
On 04/27/2016 03:55 AM, Bernd Schmidt wrote:
On 04/26/2016 11:23 PM, Martin Sebor wrote:
The documentation for the new option implies that it should warn
for calls to memset where the third argument contains the number
of elements not multiplied by the element size. But in my (quick)
testing
On 04/27/2016 03:55 AM, Bernd Schmidt wrote:
On 04/26/2016 11:23 PM, Martin Sebor wrote:
The documentation for the new option implies that it should warn
for calls to memset where the third argument contains the number
of elements not multiplied by the element size. But in my (quick)
testing
On 04/26/2016 11:23 PM, Martin Sebor wrote:
The documentation for the new option implies that it should warn
for calls to memset where the third argument contains the number
of elements not multiplied by the element size. But in my (quick)
testing it only warns when the argument is a constant
On 04/25/2016 03:07 AM, Bernd Schmidt wrote:
On 04/22/2016 03:57 PM, Jason Merrill wrote:
This looks good, but can we move the code into c-common rather than
duplicate it?
That would be this patch. Also passes testing on x86_64-linux.
Hi Bernd,
I like the idea behind the patch! So much so
On Tue, Apr 26, 2016 at 9:04 AM, Bernd Schmidt wrote:
> On 04/25/2016 07:55 PM, Jason Merrill wrote:
>>
>> On 04/25/2016 05:07 AM, Bernd Schmidt wrote:
>>>
>>> +if (TREE_CODE (arg2) == CONST_DECL)
>>> + arg2 = DECL_INITIAL (arg2);
>>> +int
On 04/25/2016 07:55 PM, Jason Merrill wrote:
On 04/25/2016 05:07 AM, Bernd Schmidt wrote:
+if (TREE_CODE (arg2) == CONST_DECL)
+ arg2 = DECL_INITIAL (arg2);
+int literal_mask = ((!!integer_zerop (arg1) << 1)
+| (!!integer_zerop (arg2) << 2));
Are
On 04/25/2016 05:07 AM, Bernd Schmidt wrote:
+ if (TREE_CODE (arg2) == CONST_DECL)
+ arg2 = DECL_INITIAL (arg2);
+ int literal_mask = ((!!integer_zerop (arg1) << 1)
+ | (!!integer_zerop (arg2) << 2));
Are you
On 04/22/2016 03:57 PM, Jason Merrill wrote:
This looks good, but can we move the code into c-common rather than
duplicate it?
That would be this patch. Also passes testing on x86_64-linux.
Bernd
* doc/invoke.texi (Warning Options): Add -Wmemset-elt-size.
(-Wmemset-elt-size): New item.
On 04/22/2016 05:31 PM, Jason Merrill wrote:
On Fri, Apr 22, 2016 at 11:24 AM, Bernd Schmidt wrote:
On 04/22/2016 03:57 PM, Jason Merrill wrote:
This looks good, but can we move the code into c-common rather than
duplicate it?
Probably not without a fair amount of
On Fri, Apr 22, 2016 at 11:24 AM, Bernd Schmidt wrote:
> On 04/22/2016 03:57 PM, Jason Merrill wrote:
>> This looks good, but can we move the code into c-common rather than
>> duplicate it?
>
> Probably not without a fair amount of surgery, since the cdw_ and ds_ codes
>
On 04/22/2016 03:57 PM, Jason Merrill wrote:
This looks good, but can we move the code into c-common rather than
duplicate it?
Probably not without a fair amount of surgery, since the cdw_ and ds_
codes are private to each frontend.
Bernd
This looks good, but can we move the code into c-common rather than
duplicate it?
Jason
On Fri, Apr 22, 2016 at 9:30 AM, Bernd Schmidt wrote:
> We had this problem in the C frontend until very recently:
>
> int array[some_count];
> memset (array, 0, some_count);
>
>
We had this problem in the C frontend until very recently:
int array[some_count];
memset (array, 0, some_count);
which forgets to multiply by sizeof int. The following patch implements
a new warning option for this.
Bootstrapped and tested (a while ago, will retest) on x86_64-linux. Ok
14 matches
Mail list logo