But why? Is there a restriction (ANSI) or is it just a compiler weakness? To my understanding, if you have a single-bit field, there should be no room for interpretation, esp. when you compare to 0, so a
if (s.field) [...] should lead to the same code, whether signed or not. Ralf "Dmitry" <di...@mail.ru> schrieb im Newsbeitrag news:200308271414.54269.di...@mail.ru... no.. this mostly applies to a single bit operand like ...{int a1:,...}; ~d I'd like to understand this suggestion a bit more, as if I want to store 0, > 1, 2, or 3 in a bitfield, it seems like you are suggesting that I should > use 3 bits instead of the expected 2 bits that would be required in an > unsigned bit field. What can be done to make msp430-gcc to generate better > code for the unsigned integer bit field also? - /***************************************************************** ("`-''-/").___..--''"`-._ (\ Dimmy the Wild UA1ACZ `6_ 6 ) `-. ( ).`-.__.`) State Polytechnical Univ. (_Y_.)' ._ ) `._ `. ``-..-' Radio-Physics Departament _..`--'_..-_/ /--'_.' ,' Saint Petersburg, Russia (il),-'' (li),' ((!.-' +7 (812) 5403923, 5585314 *****************************************************************/ ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf