Hi,

Not sure if this is intended but it is surely quite weird. Take the
following code:

--- begin code ---
#ifdef DUBIOUS
struct {  
  int x:1;
};
#endif

typedef unsigned short __attribute__((bitwise)) __le32;

int main(int argc, char **argv)
{
  __le32 i = 5;
}
--- end code ---

and save it as test.c, and then observe:

$ sparse test.c
test.c:11:14: warning: incorrect type in initializer (different base types)
test.c:11:14:    expected restricted unsigned short [usertype] i
test.c:11:14:    got int 

$ sparse test.c -DDUBIOUS
test.c:3:10: error: dubious one-bit signed bitfield

[note that no warning about the bitwise error is there!]

johannes

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to