| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-std=c99" } */ |
| 3 |
|
| 4 |
int foo(int n, char (*buf)[*]); |
| 5 |
int bar(int n, char (*buf)[n]); |
| 6 |
|
| 7 |
void test() |
| 8 |
{ |
| 9 |
(1 ? foo : bar)(0); /* { dg-error "too few arguments to function '\\\(int \\\(\\\*\\\)\\\(int, char \\\(\\\*\\\)\\\[n]\\\)\\\)&foo'" } */ |
| 10 |
(0 ? bar : foo)(0); /* { dg-error "too few arguments to function '\\\(int \\\(\\\*\\\)\\\(int, char \\\(\\\*\\\)\\\[n]\\\)\\\)&foo'" } */ |
| 11 |
(0 ? foo : bar)(0); /* { dg-error "too few arguments to function 'bar'" } */ |
| 12 |
(1 ? bar : foo)(0); /* { dg-error "too few arguments to function 'bar'" } */ |
| 13 |
} |
| 14 |
|