|
From: Bertho S. <lc...@va...> - 2026-06-08 10:38:09
|
I'm not sure I can "see" the problem anymore ;-) -- Greetings Bertho (disclaimers are disclaimed) On 6/8/26 12:25 PM, andy pugh wrote: > In the day-job we auto-generate code from Simulink. > Today it created this horror. > I count 18 casts in a row at the beginning. > > * S-Function (sfix_bitop): '<S230>/BitwiseOperator1' > */ > tmp_VectorConcatenate_atij[1] = > (U8)((U32)((U32)((U32)((U32)((U32)((U32)((U32)((S32)(((FLAG)((S32)((S32)(((FLAG)((S32) > ((S32)(((FLAG)((S32)((S32)(tmp_Switch1_bhzg ? 1 : 0) | > (S32)(tmp_Switch1_c2ot ? 1 : 0)) != 0)) ? 1 : 0) | (S32) > (tmp_tmp_RelationalOperator2_idx_2 ? 1 : 0)) != 0)) ? 1 : 0) | > (S32)(tmp_Switch1_dhzf ? 1 : 0)) != 0)) ? 1 : 0)) + > (U32)((S32)((S32)(tmp_Switch1_bhzg ? 1 : 0) * 2))) + > (U32)((S32)((S32)(tmp_Switch1_c2ot ? 1 : 0) * 4))) + (U32)((S32) > ((S32)(tmp_tmp_RelationalOperator2_idx_2 ? 1 : 0) * 8))) + > (U32)((S32)((S32)(tmp_Switch1_dhzf ? 1 : 0) * 16))) + > (U32)((S32)((((U32)Var1 == Lv1) ? ((S32)1) : ((S32)0)) * 32))) + > (U32)((S32)((((U32) > Var1 == Lv2) ? ((S32)1) : ((S32)0)) * 64)))); |