diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2020-08-11 00:06:13 +0200 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2020-08-11 22:23:48 +0200 |
| commit | 5d038837ebeab6bf7da664487bfcc372baef5176 (patch) | |
| tree | 8edeaa31b05980de467a17e1717cb7aba9402055 /validation | |
| parent | fb8d5ee785251179d0f34ae3eab4b2e4495b8395 (diff) | |
| download | sparse-dev-5d038837ebeab6bf7da664487bfcc372baef5176.tar.gz | |
fix is_scalar_type(): fouled types are scalars too
is_scalar_type() accept SYM_RESTRICT but not SYM_FOULED
but both are for integer types (and only for them).
So, let it accept SYM_FOULED too. Same for is_integral_type().
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'validation')
| -rw-r--r-- | validation/foul-scalar.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/validation/foul-scalar.c b/validation/foul-scalar.c new file mode 100644 index 00000000..8e053b96 --- /dev/null +++ b/validation/foul-scalar.c @@ -0,0 +1,13 @@ +#define __bitwise __attribute__((bitwise)) + +typedef unsigned short __bitwise __be16; + +static void foo(__be16 x) +{ + if (~x) + ; +} + +/* + * check-name: foul-scalar + */ |
