Re: [eigen] gcc 7.1 fails to build projects that depend on libeigen |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
Thanks! That helps a lot.
Now compilation fails at
| /home/rojkov/work/ros/build/tmp-glibc/work/i586-oe-
linux/sophus/0.9.1-r0/recipe-
sysroot/usr/include/eigen3/Eigen/src/Core/products/GeneralMatrixVector.
h:186:26: error: enum constant in boolean context [-Werror=int-in-bool-
context]
| const Index offset1 = (FirstAligned && alignmentStep==1)?3:1;
| ^~~~~~~~~~~~~~~~~~
| /home/rojkov/work/ros/build/tmp-glibc/work/i586-oe-
linux/sophus/0.9.1-r0/recipe-
sysroot/usr/include/eigen3/Eigen/src/Core/products/GeneralMatrixVector.
h:187:26: error: enum constant in boolean context [-Werror=int-in-bool-
context]
| const Index offset3 = (FirstAligned && alignmentStep==1)?1:3;
| ^~~~~~~~~~~~~~~~~~
IIUC FirstAligned is a constant always equal to 2. Isn't this first AND
operand redundant then?
BR,
Dmitry
On Mon, 2017-06-26 at 10:55 +0200, Gael Guennebaud wrote:
> ah, nevermind, I initially thought it complained about any usage of
> enums as boolean, but that's only the case if the enum value is not 0
> or 1, so here is the fix:
>
> https://bitbucket.org/eigen/eigen/commits/c8d48daca9b9
>
> gael.
>
> On Sun, Jun 25, 2017 at 9:55 PM, Gael Guennebaud <gael.guennebaud@gma
> il.com> wrote:
> > Hi,
> >
> > sorry for late replay, but that's not as easy as replacing them by
> > static const bool, see for instance this old thread: http://eigen.t
> > uxfamily.narkive.com/GatL7TiX/proposal-to-use-static-const-integer-
> > class-members-instead-of-enum-values
> >
> > So the current workaround is to disable this warning: -Wno-int-in-
> > bool-context.
> >
> > gael
> >
> > On Fri, Jun 16, 2017 at 3:25 PM, Dmitry Rozhkov <dmitry.rozhkov@lin
> > ux.intel.com> wrote:
> > > Hi,
> > >
> > > The latest gcc seems to have problems with traits based on enum.
> > > Please
> > > find in the attachment a typical build log (for sophus in this
> > > case).
> > >
> > > What's the plan for them? Can we replace them with `static const
> > > bool`
> > > rather than `enum`?
> > >
> > > BR,
> > > Dmitry
> > >
> >
> >
>
>