digitalmars.D - Re: What's C's biggest mistake?
- Mike James <foo bar.com> Dec 27 2009
- Teemu Pudas <tpudas cc.hut.fi> Dec 27 2009
Walter Bright Wrote:http://www.reddit.com/r/programming/comments/ai9uc/whats_cs_biggest_mistake/
I write a lot of embedded C for microcontrollers. It would be great to have an easy means of accessing bytes in an int or short without having to resort to messy unions. Maybe make it a bit more BCPL :-) -=mike=-
Dec 27 2009
On 27/12/2009 20:29, Mike James wrote:It would be great to have an easy means of accessing bytes in an int or short without having to resort to messy unions.
Don't do that. It's undefined behaviour. Yes, I've been bitten by it.
Dec 27 2009