1 /* Test if the Objective-C @encode machinery distinguishes between
2 'BOOL *' (which should be encoded as '^c') and 'char *' (which
3 should be encoded as '*'). */
4 /* Contributed by Ziemowit Laski <zlaski@apple.com>. */
5 /* { dg-do run { target *-*-darwin* } } */
6 /* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */
10 #include <objc/objc.h>
13 const char *BOOL_ptr = @encode(BOOL *);
14 const char *char_ptr = @encode(char *);
16 if(strcmp(BOOL_ptr, "^c"))
19 if(strcmp(char_ptr, "*"))