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