diff options
Diffstat (limited to 'validation/eval')
| -rw-r--r-- | validation/eval/unqual-cast.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/validation/eval/unqual-cast.c b/validation/eval/unqual-cast.c new file mode 100644 index 00000000..4106ec3b --- /dev/null +++ b/validation/eval/unqual-cast.c @@ -0,0 +1,14 @@ +#define cvr const volatile restrict + +_Static_assert([typeof((cvr int) 0)] == [int]); +_Static_assert([typeof((cvr int *) 0)] == [cvr int *]); + +static int *function(volatile int x) +{ + extern typeof((typeof(x)) (x)) y; + return &y; +} + +/* + * check-name: unqual-cast + */ |
