1// RUN: %clang_cc1 -fsyntax-only -verify %s
2
3void nondecl(int (*f)(int x = 5)) // {expected-error {{default arguments can only be specified}}}
4{
5  void (*f2)(int = 17)  // {expected-error {{default arguments can only be specified}}}
6  = (void (*)(int = 42))f; // {expected-error {{default arguments can only be specified}}}
7}
8
9struct X0 {
10  int (*f)(int = 17); // expected-error{{default arguments can only be specified for parameters in a function declaration}}
11
12  void mem8(int (*fp)(int) = (int (*)(int = 17))0); // expected-error{{default arguments can only be specified for parameters in a function declaration}}
13};
14