mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-11-18 02:00:36 +03:00
gcc7: comments for falling through a switch case
GCC 7 adds a warning -Wimplicit-fallthrough to catch when falling through a switch statement without a break. Since we actually want that behaviour sometimes, we can add a comment so the compiler knows we intended the fallthrough.
This commit is contained in:
@@ -173,25 +173,32 @@ size_t RUN_ACCEL_FN(const STATE_T s, UNUSED const STATE_T accelMask,
|
||||
switch (limex_m->shiftCount) { \
|
||||
case 8: \
|
||||
succ_m = OR_STATE(succ_m, NFA_EXEC_LIM_SHIFT(limex_m, curr_m, 7)); \
|
||||
/* fallthrough */ \
|
||||
case 7: \
|
||||
succ_m = OR_STATE(succ_m, NFA_EXEC_LIM_SHIFT(limex_m, curr_m, 6)); \
|
||||
/* fallthrough */ \
|
||||
case 6: \
|
||||
succ_m = OR_STATE(succ_m, NFA_EXEC_LIM_SHIFT(limex_m, curr_m, 5)); \
|
||||
/* fallthrough */ \
|
||||
case 5: \
|
||||
succ_m = OR_STATE(succ_m, NFA_EXEC_LIM_SHIFT(limex_m, curr_m, 4)); \
|
||||
/* fallthrough */ \
|
||||
case 4: \
|
||||
succ_m = OR_STATE(succ_m, NFA_EXEC_LIM_SHIFT(limex_m, curr_m, 3)); \
|
||||
/* fallthrough */ \
|
||||
case 3: \
|
||||
succ_m = OR_STATE(succ_m, NFA_EXEC_LIM_SHIFT(limex_m, curr_m, 2)); \
|
||||
/* fallthrough */ \
|
||||
case 2: \
|
||||
succ_m = OR_STATE(succ_m, NFA_EXEC_LIM_SHIFT(limex_m, curr_m, 1)); \
|
||||
/* fallthrough */ \
|
||||
case 1: \
|
||||
/* fallthrough */ \
|
||||
case 0: \
|
||||
; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
|
||||
/**
|
||||
* \brief LimEx NFAS inner loop without accel.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user