gcc/testsuite/c-c++-common/pr35503-1.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-Wrestrict" } */ |
| 3 | |
| 4 | int foo (char *__restrict buf, const char *__restrict fmt, ...); |
| 5 | |
| 6 | void f(void) |
| 7 | { |
| 8 | char buf[100] = "hello"; |
| 9 | foo (buf, "%s-%s", buf, "world"); /* { dg-warning "passing argument 1 to 'restrict'-qualified parameter aliases with argument 3" } */ |
| 10 | } |