xref: /llvm-project/clang/test/CodeGen/2009-06-01-addrofknr.c (revision 9c4ade0623af842cda16e5c71b27fb794a3ff3db)
1 // RUN: %clang_cc1 %s -o %t -emit-llvm -verify -std=c89
2 // PR4289
3 
4 struct funcptr {
5   int (*func)();
6 };
7 
func(f)8 static int func(f) // expected-warning {{a function definition without a prototype is deprecated in all versions of C and is not supported in C23}}
9   void *f;
10 {
11   return 0;
12 }
13 
14 int
main(int argc,char * argv[])15 main(int argc, char *argv[])
16 {
17   struct funcptr fp;
18 
19   fp.func = &func;
20   fp.func = func;
21 }
22