function.c revision 99d724f6a31b5521ded95adf10ef7f3c62a0b18e
1// RUN: clang %s -fsyntax-only -verify -pedantic
2// PR1892
3void f(double a[restrict][5]);  // should promote to restrict ptr.
4void f(double (* restrict a)[5]);
5
6int foo (__const char *__path);
7int foo(__const char *__restrict __file);
8
9void func(const char*); //expected-error{{previous declaration is here}}
10void func(char*); //expected-error{{conflicting types for 'func'}}
11
12void g(int (*)(const void **, const void **));
13void g(int (*compar)()) {
14}
15
16
17// PR1965
18int t5(b);          // expected-error {{parameter list without types}}
19int t6(int x, g);   // expected-warning {{type specifier required for parameter 'g'}}
20
21int t7(, );       // expected-error {{expected parameter declarator}} expected-error {{expected parameter declarator}}
22int t8(, int a);  // expected-error {{expected parameter declarator}}
23int t9(int a, );  // expected-error {{expected parameter declarator}}
24
25
26