gcc/testsuite/gcc.dg/format/gcc_gfc-2.c
raw| 1 | /* PR c/35436 */ |
| 2 | /* { dg-do compile } */ |
| 3 | /* { dg-options "-Wformat" } */ |
| 4 | |
| 5 | typedef void locus[1]; /* { dg-error "array of void" } */ |
| 6 | |
| 7 | void foo(const char*, ...) |
| 8 | __attribute__((__format__(__gcc_gfc__, 1, 2))); /* { dg-error "locus" } */ |
| 9 | |
| 10 | void bar() |
| 11 | { |
| 12 | foo("%L", 0); /* { dg-warning "format" } */ |
| 13 | } |