|
From: Robert S. <rm...@un...> - 2026-06-08 13:33:24
|
Am Montag, dem 08.06.2026 um 11:25 +0100 schrieb andy pugh: > 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)((S > 32)(((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)))); > The international obfuscated C code contest announced the '25 winners a few days ago, but you are probably not too late to submit it for the '26 prize -- Robert Schöftner <rm...@un...> |