return calc_integer_type[dst->type](ctx, dst, in1, op, in2);
}
+ /*
+ * We don't do upcasts on shifting.
+ *
+ * @todo - on left shift, if the RHS shift value is
+ * larger than the LHS data type, then promote the result
+ * data type to the next thing which will fit.
+ */
+ if ((op == T_RSHIFT) || (op == T_LSHIFT)) {
+ type = a->type;
+ fr_assert(b->type == FR_TYPE_UINT32);
+ goto calc_it;
+ }
+
/*
* Upcast to the largest type which will handle the
* calculations.
* Apparently putting the function pointer into an
* intermediate variable shuts it up.
*/
+calc_it:
calc = calc_integer_type[type];
if (!calc) return invalid_type(type);