Fix unused warnings.
[official-gcc/graphite-test-results.git] / gcc / testsuite / objc / execute / nested-func-1.m
bloba4c9a561968a43cdf9344ab029e75578291c64ba
1 /* Test basic nested C function functionality within ObjC
2    methods.  */
3 /* Contributed by Ziemowit Laski <zlaski@apple.com>.  */
4 #include <stdio.h>
5 #include <stdlib.h>
6 #import "../../objc-obj-c++-shared/Object1.h"
7 #include <objc/objc.h>
9 int bappy (int (*blargh) (int a, int b, int c))
11   return blargh (4, 7, 2) + 3;
14 @interface Foo: Object
15 + (int)foo;
16 @end
18 @implementation Foo
19 + (int)foo
21   int blargh (int a, int b, int c)
22   {
23     return a * b + c;
24   }
25   return bappy (blargh);
27 @end
29 int main () 
31   int f = [Foo foo];
32   if (f != 33)
33     abort ();
35   return 0;