Tautological comparison in gcc 6.1.1

Michael Adam obnox at samba.org
Wed Jul 13 12:16:34 UTC 2016


Now after we discussed it, we came up with almost the same patch
in parallel. :-)

Happy to push with your authorship, but we should have separate
patches for tevent and ldb. Otherwise take my RB+.

I tested (mine) with gcc6 and gcc5.

Cheers - Michael


On 2016-07-13 at 08:07 -0400, Ira Cooper wrote:
> Please try this patch on gcc other than 6, I think it should clean up the
> issue.
> 
> Cheers,
> 
> -Ira
> 
> On Wed, Jul 13, 2016 at 7:38 AM, Michael Adam <obnox at samba.org> wrote:
> 
> > On 2016-07-13 at 13:21 +0200, Michael Adam wrote:
> > > update: fixed copy/past errors (push instead of pop at the bottom)
> >
> > Forget that!
> >
> > my patches were only working due to the accidential
> > push instead of pop -- after all the thing is in _macros_ ...
> >
> > Better patches to follow.
> >
> > Michael
> >
> > > On 2016-07-13 at 13:08 +0200, Michael Adam wrote:
> > > > On 2016-07-13 at 21:57 +1200, Andrew Bartlett wrote:
> > > > > On Wed, 2016-07-13 at 14:21 +1000, Amitay Isaacs wrote:
> > > > >
> > > > > > Reviewed-by: me.
> > > > > >
> > > > > > Let's wait and see if anyone has a better idea.
> > > > > >
> > > > > > Amitay.
> > > > >
> > > > > Build some files with -Wno-tautological-compare?
> > > > >
> > > > > The problem with the solutions I've seen proposed is that they just
> > > > > wait for the compiler to get smarter, or the -O level to be raised,
> > and
> > > > > then we are back where we started.  It also makes elegant code less
> > > > > -elegant.
> > > >
> > > > All agreed.
> > > > I just did not know how to do it more elegantly before,
> > > > since these are header files...
> > > >
> > > > Ira gave me the hint to consider using "#pragma GCC diagnostic".
> > > > Thanks!
> > > >
> > > > The attached patch lets me build successfully with gcc6 and
> > > > older gcc. Maybe we should use ignore instead of warning here
> > > > to silence the build a little?
> > > >
> > > > Cheers - Michael
> >


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20160713/6b95bead/signature.sig>


More information about the samba-technical mailing list