Tautological comparison in gcc 6.1.1

Ira Cooper ira at wakeful.net
Wed Jul 13 12:07:59 UTC 2016


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: 0001-picky-developer-Disable-Wtautological-compare-for-gc.patch
Type: application/mbox
Size: 2874 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20160713/2ea0f13d/0001-picky-developer-Disable-Wtautological-compare-for-gc.mbox>


More information about the samba-technical mailing list