expressions: make assign_expression() take an op argument
[smatch.git] / validation / constexpr-pure-builtin.c
blobf4cd67edae3003aee6da8b029bcaea4f58730f3a
1 // requires constant integer expressions
2 static int bar[] = {
3 [__builtin_bswap16(0x1234)] = 0, // OK
4 [__builtin_bswap32(0x1234)] = 0, // OK
5 [__builtin_bswap64(0x1234)] = 0, // OK
6 };
8 // requires constant integers
9 static int foo(unsigned long long a)
11 switch (a) {
12 case __builtin_bswap16(1 << 8):
13 case __builtin_bswap32(2L << 24):
14 case __builtin_bswap64(3LL << 56):
15 return 0;
16 default:
17 return 1;
22 * check-name: constness of pure/const builtins