#define NULL (void*)0
#define ATTR __attribute__ ((__sentinel__))
@interface INTF
- (void) foo1 : (int)x, ... ATTR; - (void) foo3 : (int)x __attribute__ ((__sentinel__)) ; - (void) foo5 : (int)x, ... __attribute__ ((__sentinel__(1))); - (void) foo6 : (int)x, ... __attribute__ ((__sentinel__(5))); - (void) foo7 : (int)x, ... __attribute__ ((__sentinel__(0))); - (void) foo8 : (int)x, ... __attribute__ ((__sentinel__("a"))); - (void) foo9 : (int)x, ... __attribute__ ((__sentinel__(-1))); - (void) foo10 : (int)x, ... __attribute__ ((__sentinel__(1,1)));
- (void) foo11 : (int)x, ... __attribute__ ((__sentinel__(1,1,3))); - (void) foo12 : (int)x, ... ATTR;
- (id) foo13 : (id)firstObj, ... __attribute__((sentinel(0,1)));
- (id) foo14 : (id)firstObj : (Class)secondObj, ... __attribute__((sentinel(0,1)));
- (id) foo15 : (id*)firstObj, ... __attribute__((sentinel(0,1)));
- (id) foo16 : (id**)firstObj, ... __attribute__((sentinel(0,1)));
@end
int main (void)
{
INTF *p;
[p foo1:1, NULL]; [p foo1:1, 0]; [p foo5:1, NULL, 2]; [p foo5:1, 2, NULL, 1]; [p foo5:1, NULL, 2, 1];
[p foo6:1,2,3,4,5,6,7]; [p foo6:1,NULL,3,4,5,6,7]; [p foo7:1]; [p foo7:1, NULL];
[p foo12:1];
[ p foo13 : NULL];
[ p foo14 : 0 : NULL];
[ p foo16 : NULL];
[ p foo15 : NULL];
}