On 10/20/16 10:05, Markus Trippelsdorf wrote:
>
> Thanks for the commit. But I think the comment is wrong:
>
> + /* We will only warn on unsigned shifts here, because the majority of
>^^
> This should be »signed«.
>
Oops. Thanks for noticing.
This is what I a
On 2016.10.19 at 14:13 -0600, Jeff Law wrote:
> On 10/18/2016 12:14 PM, Bernd Edlinger wrote:
> > On 10/18/16 19:05, Joseph Myers wrote:
> > > > On Tue, 18 Oct 2016, Bernd Edlinger wrote:
> > > >
> > > > >> Hi,
> > > > >>
> > > > >> this restricts the -Wint-in-bool-context warning to signed shifts,
On 10/18/2016 12:14 PM, Bernd Edlinger wrote:
On 10/18/16 19:05, Joseph Myers wrote:
> On Tue, 18 Oct 2016, Bernd Edlinger wrote:
>
>> Hi,
>>
>> this restricts the -Wint-in-bool-context warning to signed shifts,
>> to reduce the number of false positives Markus reported yesterday.
>
> This pat
On 10/18/16 19:05, Joseph Myers wrote:
> On Tue, 18 Oct 2016, Bernd Edlinger wrote:
>
>> Hi,
>>
>> this restricts the -Wint-in-bool-context warning to signed shifts,
>> to reduce the number of false positives Markus reported yesterday.
>
> This patch seems to be missing testcases (that warned befor
On Tue, 18 Oct 2016, Bernd Edlinger wrote:
> Hi,
>
> this restricts the -Wint-in-bool-context warning to signed shifts,
> to reduce the number of false positives Markus reported yesterday.
This patch seems to be missing testcases (that warned before the patch
and don't warn after it).
--
Jose
Hi,
this restricts the -Wint-in-bool-context warning to signed shifts,
to reduce the number of false positives Markus reported yesterday.
Bootstrap and reg-testing on x86_64-pc-linux-gnu was fine.
Is it OK for trunk?
Thanks
Bernd.
2016-10-17 Bernd Edlinger
* c-common.c (c_common_truthvalue
On 2016.10.17 at 17:30 +, Bernd Edlinger wrote:
> On 10/17/16 19:11, Markus Trippelsdorf wrote:
> >>> I'm seeing this warning a lot in valid low level C code for unsigned
> >>> integers. And I must say it look bogus in this context. Some examples:
> >
> > (All these examples are from qemu trunk
On 10/17/16 19:11, Markus Trippelsdorf wrote:
>>> I'm seeing this warning a lot in valid low level C code for unsigned
>>> integers. And I must say it look bogus in this context. Some examples:
>
> (All these examples are from qemu trunk.)
>
>>> return ((a.high & 0x7fff) == 0x7fff) && (a.low<<1);
On 2016.10.17 at 16:51 +, Bernd Edlinger wrote:
> On 10/17/16 17:23, Markus Trippelsdorf wrote:
> > On 2016.09.29 at 18:52 +, Bernd Edlinger wrote:
> >> On 09/29/16 20:03, Jason Merrill wrote:
> >>> On Wed, Sep 28, 2016 at 12:09 PM, Bernd Edlinger
> >>> wrote:
> On 09/28/16 16:41, Jas
On 10/17/16 17:23, Markus Trippelsdorf wrote:
> On 2016.09.29 at 18:52 +, Bernd Edlinger wrote:
>> On 09/29/16 20:03, Jason Merrill wrote:
>>> On Wed, Sep 28, 2016 at 12:09 PM, Bernd Edlinger
>>> wrote:
On 09/28/16 16:41, Jason Merrill wrote:
> On Tue, Sep 27, 2016 at 11:10 AM, Bernd
On 2016.09.29 at 18:52 +, Bernd Edlinger wrote:
> On 09/29/16 20:03, Jason Merrill wrote:
> > On Wed, Sep 28, 2016 at 12:09 PM, Bernd Edlinger
> > wrote:
> >> On 09/28/16 16:41, Jason Merrill wrote:
> >>> On Tue, Sep 27, 2016 at 11:10 AM, Bernd Edlinger
> >>> wrote:
> On 09/27/16 16:42,
On Sat, Oct 8, 2016 at 4:05 PM, Bernd Edlinger
wrote:
> On 10/08/16 19:40, Jason Merrill wrote:
>> On Fri, Sep 30, 2016 at 1:07 AM, Bernd Edlinger
>> wrote:
>>> On 09/29/16 22:38, Jason Merrill wrote:
On Thu, Sep 29, 2016 at 3:58 PM, Bernd Edlinger
wrote:
> Unfortunately, without t
On 10/08/16 19:40, Jason Merrill wrote:
> On Fri, Sep 30, 2016 at 1:07 AM, Bernd Edlinger
> wrote:
>> On 09/29/16 22:38, Jason Merrill wrote:
>>> On Thu, Sep 29, 2016 at 3:58 PM, Bernd Edlinger
>>> wrote:
Unfortunately, without that exception there is a false positive:
In file incl
On Fri, Sep 30, 2016 at 1:07 AM, Bernd Edlinger
wrote:
> On 09/29/16 22:38, Jason Merrill wrote:
>> On Thu, Sep 29, 2016 at 3:58 PM, Bernd Edlinger
>> wrote:
>>> Unfortunately, without that exception there is a false positive:
>>>
>>> In file included from ../../gcc-trunk/gcc/ada/gcc-interface/de
OK.
On Fri, Sep 30, 2016 at 1:07 AM, Bernd Edlinger
wrote:
> On 09/29/16 22:38, Jason Merrill wrote:
>> On Thu, Sep 29, 2016 at 3:58 PM, Bernd Edlinger
>> wrote:
>>> Unfortunately, without that exception there is a false positive:
>>>
>>> In file included from ../../gcc-trunk/gcc/ada/gcc-interfa
On 09/29/16 22:38, Jason Merrill wrote:
> On Thu, Sep 29, 2016 at 3:58 PM, Bernd Edlinger
> wrote:
>> Unfortunately, without that exception there is a false positive:
>>
>> In file included from ../../gcc-trunk/gcc/ada/gcc-interface/decl.c:30:0:
>> ../../gcc-trunk/gcc/ada/gcc-interface/decl.c: In
On Thu, Sep 29, 2016 at 3:58 PM, Bernd Edlinger
wrote:
> Unfortunately, without that exception there is a false positive:
>
> In file included from ../../gcc-trunk/gcc/ada/gcc-interface/decl.c:30:0:
> ../../gcc-trunk/gcc/ada/gcc-interface/decl.c: In function 'int
> adjust_packed(tree, tree, int)':
On 09/29/16 20:52, Bernd Edlinger wrote:
> On 09/29/16 20:03, Jason Merrill wrote:
>>
>> What do you think about dropping the TYPE_UNSIGNED exception as well?
>> I don't see what difference that makes.
>>
>
>
> If I drop that exception, then I could also drop the check for
> INTEGER_TYPE and the wh
On 09/29/16 20:03, Jason Merrill wrote:
> On Wed, Sep 28, 2016 at 12:09 PM, Bernd Edlinger
> wrote:
>> On 09/28/16 16:41, Jason Merrill wrote:
>>> On Tue, Sep 27, 2016 at 11:10 AM, Bernd Edlinger
>>> wrote:
On 09/27/16 16:42, Jason Merrill wrote:
> On Tue, Sep 27, 2016 at 10:28 AM, Bernd
On Wed, Sep 28, 2016 at 12:09 PM, Bernd Edlinger
wrote:
> On 09/28/16 16:41, Jason Merrill wrote:
>> On Tue, Sep 27, 2016 at 11:10 AM, Bernd Edlinger
>> wrote:
>>> On 09/27/16 16:42, Jason Merrill wrote:
On Tue, Sep 27, 2016 at 10:28 AM, Bernd Edlinger
wrote:
> On 09/27/16 16:10, F
On 09/28/16 16:41, Jason Merrill wrote:
> On Tue, Sep 27, 2016 at 11:10 AM, Bernd Edlinger
> wrote:
>> On 09/27/16 16:42, Jason Merrill wrote:
>>> On Tue, Sep 27, 2016 at 10:28 AM, Bernd Edlinger
>>> wrote:
On 09/27/16 16:10, Florian Weimer wrote:
> * Bernd Edlinger:
>
>>> “0 <<
On Tue, Sep 27, 2016 at 11:10 AM, Bernd Edlinger
wrote:
> On 09/27/16 16:42, Jason Merrill wrote:
>> On Tue, Sep 27, 2016 at 10:28 AM, Bernd Edlinger
>> wrote:
>>> On 09/27/16 16:10, Florian Weimer wrote:
* Bernd Edlinger:
>> “0 << 0” is used in a similar context, to create a zero c
On 09/27/16 16:42, Jason Merrill wrote:
> On Tue, Sep 27, 2016 at 10:28 AM, Bernd Edlinger
> wrote:
>> On 09/27/16 16:10, Florian Weimer wrote:
>>> * Bernd Edlinger:
>>>
> “0 << 0” is used in a similar context, to create a zero constant for a
> multi-bit subfield of an integer.
>
>
On Tue, Sep 27, 2016 at 10:28 AM, Bernd Edlinger
wrote:
> On 09/27/16 16:10, Florian Weimer wrote:
>> * Bernd Edlinger:
>>
“0 << 0” is used in a similar context, to create a zero constant for a
multi-bit subfield of an integer.
This example comes from GDB, in bfd/elf64-alpha.c:
On 09/27/16 16:10, Florian Weimer wrote:
> * Bernd Edlinger:
>
>>> “0 << 0” is used in a similar context, to create a zero constant for a
>>> multi-bit subfield of an integer.
>>>
>>> This example comes from GDB, in bfd/elf64-alpha.c:
>>>
>>> | insn = INSN_ADDQ | (16 << 21) | (0 << 16) | (0 << 0)
* Bernd Edlinger:
>> “0 << 0” is used in a similar context, to create a zero constant for a
>> multi-bit subfield of an integer.
>>
>> This example comes from GDB, in bfd/elf64-alpha.c:
>>
>> | insn = INSN_ADDQ | (16 << 21) | (0 << 16) | (0 << 0);
>>
>
> Of course that is not a boolean context,
On 09/27/16 14:49, Florian Weimer wrote:
> * Jason Merrill:
>
>> On Sun, Sep 25, 2016 at 3:46 AM, Bernd Edlinger
>> wrote:
>>> This patch makes -Wint-in-bool-context warn on suspicious integer left
>>> shifts, when the integer is signed, which is most likely some kind of
>>> programming error, for
Hi,
On Tue, 27 Sep 2016, Jason Merrill wrote:
> On Sun, Sep 25, 2016 at 3:46 AM, Bernd Edlinger
> wrote:
> > This patch makes -Wint-in-bool-context warn on suspicious integer left
> > shifts, when the integer is signed, which is most likely some kind of
> > programming error, for instance using
* Jason Merrill:
> On Sun, Sep 25, 2016 at 3:46 AM, Bernd Edlinger
> wrote:
>> This patch makes -Wint-in-bool-context warn on suspicious integer left
>> shifts, when the integer is signed, which is most likely some kind of
>> programming error, for instance using "<<" instead of "<".
>>
>> The wa
On Sun, Sep 25, 2016 at 3:46 AM, Bernd Edlinger
wrote:
> This patch makes -Wint-in-bool-context warn on suspicious integer left
> shifts, when the integer is signed, which is most likely some kind of
> programming error, for instance using "<<" instead of "<".
>
> The warning is motivated by the f
30 matches
Mail list logo