diff options
Diffstat (limited to 'gcc/testsuite/obj-c++.dg/const-str-1.mm')
-rw-r--r-- | gcc/testsuite/obj-c++.dg/const-str-1.mm | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/gcc/testsuite/obj-c++.dg/const-str-1.mm b/gcc/testsuite/obj-c++.dg/const-str-1.mm new file mode 100644 index 00000000000..47bf5ab6637 --- /dev/null +++ b/gcc/testsuite/obj-c++.dg/const-str-1.mm @@ -0,0 +1,26 @@ +/* APPLE LOCAL file mainline */ +/* Test errors for constant strings. */ +/* { dg-do compile } */ +/* { dg-options "-fgnu-runtime" } */ + +#ifdef __cplusplus +extern void baz(...); +#endif + +void foo() +{ + baz(@"hiya"); /* { dg-error "annot find interface declaration" } */ +} + +@interface NXConstantString +{ + void *isa; + char *str; + int len; +} +@end + +void bar() +{ + baz(@"howdah"); +} |