Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Re: [lpc2000] Bit-fields are brain-dead (was Looking to buy compiler)

2005-11-09 by Charles Manning

> Just to add to the 'never use bit-fields advice', here's an article
> I found a while ago (where the author calls bit-fields brain-dead) ...

I would refine this:

Never use them for anything that does hardware accesses or has hardware 
dependencies.

I use them quite a bit for packing data into software structures because this 
allows me to do bit-wise packing without writing a whole bunch of shifter 
code. Being able to bit-pack structures easily can save a lot of space when 
creating large numbers of them.

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.