1 // RUN: %clang_cc1 %s -std=c90 -verify -fsyntax-only
3 int explicit_decl(void);
6 x
= g() + 1; // expected-note {{previous implicit declaration}}
9 extern void u(int (*)[h()]);
12 p
= h
; /* expected-error {{use of undeclared identifier 'h'}} */
27 p
= g
; /* expected-error {{use of undeclared identifier 'g'}} */
28 p
= h
; /* expected-error {{use of undeclared identifier 'h'}} */
34 int y
= ({ if (x
> 0) x
= g() + 1; 2*x
; });
35 int (*p
)(void) = g
; /* expected-error {{use of undeclared identifier 'g'}} */
40 {int i
= sizeof(PR34822_foo());} /* expected-note {{previous definition is here}} */
41 {extern int PR34822_foo
;} /* expected-error {{redefinition of 'PR34822_foo' as different kind of symbol}} */
43 {extern int PR34822_bar
;} /* expected-note {{previous declaration is here}} */
44 {int i
= sizeof(PR34822_bar());} /* expected-warning {{use of out-of-scope declaration of 'PR34822_bar' whose type is not compatible with that of an implicit declaration}} expected-error {{called object type 'int' is not a function or function pointer}} */
47 int (*p
)(void) = g
; /* expected-error {{use of undeclared identifier 'g'}} */
48 int (*q
)(void) = h
; /* expected-error {{use of undeclared identifier 'h'}} */
50 float g(void); /* expected-error {{conflicting types for 'g'}} */