Hacker News new | ask | show | jobs
by markrages 4122 days ago
But the union won't crash either (the compiler will keep it aligned), the conversion compiles to no-op, and doesn't waste memory.

Embedded targets are always memory-constrained. If they aren't, you are wasting money on hardware.

1 comments

I was thinking about the case when you get unaligned data (eg you are reading from a file or from the network). Then you need to copy the data anyway.