Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / objc / execute / formal_protocol-6.m
blob7873fdcdf393e59dd9220932312f839a9842f020
1 /* Contributed by Nicola Pero - Fri Mar  9 21:35:47 CET 2001 */
2 #include <objc/objc.h>
3 #include <objc/Protocol.h>
5 /* Test defining a protocol, and accessing it using @protocol */
7 @protocol Evaluating
8 - (int) importance;
9 @end
11 /* Without a class adopting the protocol - this doesn't work 
12    with gcc-2.95.2 as well */
14 int main (void)
16   Protocol *protocol = @protocol (Evaluating);
18   if (strcmp ([protocol name], "Evaluating"))
19     {
20       abort ();
21     }
23   return 0;