For the sake of discussion, could someone comment this seriously non-portable code (works with gcc on intel):
typedef unsigned int thirtytwo; typedef struct { thirtytwo but:31; thirtytwo bit:1; } msbsliced; typedef struct { thirtytwo bit:1; thirtytwo but:31; } lsbsliced; typedef thirtytwo unsliced; typedef union { unsliced all; msbsliced msb; lsbsliced lsb; } sliced; typedef struct { sliced high; sliced low; } sixtyfour;
void shl ( sixtyfour *pdata ) { pdata->high.lsb.but=pdata->high.msb.but; pdata->high.lsb.bit=pdata->low.msb.bit; pdata->low.lsb.but=pdata->low.msb.but; pdata->low.lsb.bit=0; }