Re: new warnings building cp-demangle.c

2009-05-19 Thread Manuel López-Ibáñez
2009/5/19 Ian Lance Taylor : > Ben Elliston writes: > > Yep, a bug.  Looks like it should be something like So 2 bugs now found by -Wlogical-op. Well, at least, it was not a _total_ failure. :-) Cheers, Manuel.

Re: new warnings building cp-demangle.c

2009-05-18 Thread Ian Lance Taylor
Ben Elliston writes: > In the last couple of days, I have started seeing the following warnings > when building target-libiberty: > > /home/bje/source/gcc-clean/libiberty/cp-demangle.c:723: warning: logical > ‘and’ of mutually exclusive tests is always false > /home/bje/source/gcc-clean/libibert

Re: new warnings building cp-demangle.c

2009-05-18 Thread Ben Elliston
On Mon, 2009-05-18 at 17:40 -0700, H.J. Lu wrote: > We have > > enum gnu_v3_ctor_kinds { > gnu_v3_complete_object_ctor = 1, > gnu_v3_base_object_ctor, > gnu_v3_complete_object_allocating_ctor > }; > > What does > > (kind < gnu_v3_complete_object_ctor > && kind > gnu_v3_complete_o

Re: new warnings building cp-demangle.c

2009-05-18 Thread H.J. Lu
On Mon, May 18, 2009 at 5:28 PM, Ben Elliston wrote: > Hi Ian > > In the last couple of days, I have started seeing the following warnings > when building target-libiberty: > > /home/bje/source/gcc-clean/libiberty/cp-demangle.c:723: warning: logical > ‘and’ of mutually exclusive tests is always f

Re: new warnings building cp-demangle.c

2009-05-18 Thread Andrew Pinski
On Mon, May 18, 2009 at 5:34 PM, Janis Johnson wrote: >> The code around line 723 is: >> >>   if (p == NULL >>       || name == NULL >>       || (kind < gnu_v3_complete_object_ctor >>           && kind > gnu_v3_complete_object_allocating_ctor)) >>     return 0; >> >> (and similarly for line 742).

Re: new warnings building cp-demangle.c

2009-05-18 Thread Janis Johnson
On Tue, 2009-05-19 at 10:28 +1000, Ben Elliston wrote: > Hi Ian > > In the last couple of days, I have started seeing the following warnings > when building target-libiberty: > > /home/bje/source/gcc-clean/libiberty/cp-demangle.c:723: warning: logical > ‘and’ of mutually exclusive tests is alway