repo.or.cz
/
netbsd-mini2440.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
history
|
raw
|
HEAD
Sync usage with man page.
[netbsd-mini2440.git]
/
gnu
/
dist
/
gcc4
/
gcc
/
testsuite
/
objc
/
execute
/
static-2.m
blob
4d7e7449bff16c6b7ba875af7c72588d252cda29
1
/* Contributed by Nicola Pero - Fri Mar 9 19:39:15 CET 2001 */
2
#include <objc/objc.h>
3
4
/* Test defining a static function *inside* a class implementation */
5
6
@interface Test
7
{
8
Class isa;
9
}
10
+ (int) test;
11
@end
12
13
@implementation Test
14
15
static int test (void)
16
{
17
return 1;
18
}
19
20
+ (int) test
21
{
22
return test ();
23
}
24
25
#ifdef __NEXT_RUNTIME__
26
+ initialize { return self; }
27
#endif
28
@end
29
30
int main (void)
31
{
32
if ([Test test] != 1)
33
{
34
abort ();
35
}
36
37
return 0;
38
}
39
40