Tautological comparison in gcc 6.1.1

Michael Adam obnox at samba.org
Wed Jul 13 11:38:58 UTC 2016


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/5940f715/signature.sig>


More information about the samba-technical mailing list