We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
typedef struct { int query_zone:4; }statusrequest_t; statusrequest_t state; state.query_zone=8; if ( state.query_zone==8) printf("The result matches n=%i n\r",state.query_zone); else printf("This should not occur n=%i\n\r",state.query_zone);
CARM produces : This should not occur n=-8 RV produces : The result matches n=8
typedef struct { short query_zone:4; }statusrequest_t;
CARM produces : The result matches n=8 RV produces : This should not occur n=-8
typedef struct { signed char query_zone:4; }statusrequest_t;
Why does the comparision fail when query_zone is an int bitfield ? The RV compiler produces not the same result as CARM
Noel, are you still following this thread anymore? Can you give feedback?
i will look again at the problem, i am not in the possibility to do this in the next coming days.