[Swan-dev] fyi, we've run out of impair+debug lset_t bits
Andrew Cagney
andrew.cagney at gmail.com
Thu Sep 6 15:53:36 UTC 2018
As in:
/home/libreswan/wip-alg/include/lset.h:32:31: error: left shift count
>= width of type [-Werror=shift-count-overflow]
#define LELEM(opt) ((lset_t)1 << (opt))
^
/home/libreswan/wip-alg/include/lset.h:34:31: note: in definition of
macro ‘LRANGES’
#define LRANGES(first, last) (last - first + last)
^~~~
/home/libreswan/wip-alg/include/lset.h:33:46: note: in expansion of
macro ‘LELEM’
#define LRANGE(lwb, upb) LRANGES(LELEM(lwb), LELEM(upb))
^~~~~
/home/libreswan/wip-alg/include/pluto_constants.h:436:21: note: in
expansion of macro ‘LRANGE’
#define IMPAIR_MASK LRANGE(IMPAIR_floor_IX, IMPAIR_roof_IX - 1)
^~~~~~
/home/libreswan/wip-alg/lib/libswan/impair.c:106:9: note: in expansion
of macro ‘IMPAIR_MASK’
.all = IMPAIR_MASK,
^~~~~~~~~~~
Short term we can get some extra bits by splitting debug and impair so
that they each have their own lset_t. The lmod_t code hopefully makes
this easier.
However, long term we'll need to come up with something different:
expanding lset_t somehow, or even using a new structure.
In the mean time I'll squeeze a few bits so things fit.
Andrew
More information about the Swan-dev
mailing list