1typedef unsigned short __attribute__((bitwise)) le16; 2struct s { 3 int a:2; 4 int b:2; 5 int c:2; 6}; 7 8static _Bool fresi(le16 a) { return a; } 9static _Bool frese(le16 a) { return (_Bool)a; } 10static _Bool fstsi(struct s a) { return a; } 11static _Bool fstse(struct s a) { return (_Bool)a; } 12 13/* 14 * check-name: bool-cast-bad.c 15 * check-command: sparse $file 16 * 17 * check-error-start 18bool-cast-bad.c:10:41: warning: incorrect type in return expression (different base types) 19bool-cast-bad.c:10:41: expected bool 20bool-cast-bad.c:10:41: got struct s a 21bool-cast-bad.c:11:42: warning: cast from non-scalar 22 * check-error-end 23 */ 24