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