Menu

#30 undefined behavior in Judy1Set.c

Judy-1.0.0
open
nobody
None
5
2022-03-06
2022-03-06
JAC
No

When I compile on an x86_64 with gcc I get this error when running Make
I don't know if it will still work or not. I don't plan to use Judy directly, but appearantly Mariadb wants it installed to run. The warning message is below: my signature block

/r
Jay

In file included from Judy1Set.c:31:
Judy1Set.c: In function 'j__udyInsWalk':
Judy1Set.c:1506:51: warning: iteration 8 invokes undefined behavior [-Waggressive-loop-optimizations]
JU_BITMAPSETL(Pjlb, Pjp->jp_1Index[offset]);
Judy1.h:402:58: note: in definition of macro 'J1_JLB_BITMAP'
#define J1_JLB_BITMAP(Pjlb,Subexp) ((Pjlb)->j1lb_Bitmap[Subexp])
^~~~~~
../JudyCommon/JudyPrivate.h:825:26: note: in expansion of macro 'JU_SUBEXPL'
(JU_JLB_BITMAP(PJLB, JU_SUBEXPL(INDEX)) |= JU_BITPOSMASKL(INDEX))
^~~~~~~~~~
Judy1Set.c:1506:17: note: in expansion of macro 'JU_BITMAPSETL'
JU_BITMAPSETL(Pjlb, Pjp->jp_1Index[offset]);
^~~~~~~~~~~~~
Judy1Set.c:1505:13: note: within this loop
for (offset = 0; offset < 15; ++offset)
^~~

Discussion


Log in to post a comment.

MongoDB Logo MongoDB