>>106865259
This "you can't write malloc in standard c" bullshit has gone on for too long.
union u {int i; float f;} u;
u.i = 1;
printf("%f\n", u.f); //strict aliasing violation, super bad
u.f = 1.;
printf("%f\n", u.f); //fine
int *i = &u.i;
float *f = &u.f;
*i = 1;
printf("%f\n", *f); // le bad
*f = 1.;
printf("%f\n", *f); // fine
Comment too long. Click here to view the full text.