blob: 9e21eab7bf2f41d65c7f9083873b41504c1ff5ae [file] [log] [blame]
typedef unsigned short __attribute__((bitwise))__le16;
static __le16 foo(__le16 a)
{
return a |= ~a;
}
static int baz(__le16 a)
{
return ~a == ~a;
}
static int barf(__le16 a)
{
return a == (a & ~a);
}
static __le16 bar(__le16 a)
{
return -a;
}
/*
* check-name: foul bitwise
* check-error-start
foul-bitwise.c:9:16: warning: restricted __le16 degrades to integer
foul-bitwise.c:9:22: warning: restricted __le16 degrades to integer
foul-bitwise.c:19:16: error: incompatible types for operation (-)
foul-bitwise.c:19:16: argument has type restricted __le16 [usertype] a
* check-error-end
*/