diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/countof-compat.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/countof-compat.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/countof-compat.c b/gcc/testsuite/gcc.dg/countof-compat.c new file mode 100644 index 0000000..ab5b4ae --- /dev/null +++ b/gcc/testsuite/gcc.dg/countof-compat.c @@ -0,0 +1,8 @@ +/* { dg-do compile } */ +/* { dg-options "-std=c2y -pedantic-errors -Wc23-c2y-compat" } */ + +#include <stdcountof.h> + +int a[1]; +int b[countof(a)]; +int c[_Countof(a)]; /* { dg-warning "ISO C does not support" } */ |