diff options
Diffstat (limited to 'gcc/testsuite/objc.dg/const-str-1.m')
-rw-r--r-- | gcc/testsuite/objc.dg/const-str-1.m | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/objc.dg/const-str-1.m b/gcc/testsuite/objc.dg/const-str-1.m new file mode 100644 index 00000000000..1d94faa1757 --- /dev/null +++ b/gcc/testsuite/objc.dg/const-str-1.m @@ -0,0 +1,16 @@ +/* Test errors for constant strings. */ +/* { dg-do compile } */ +/* { dg-options "-fgnu-runtime" } */ + +int foo() +{ + baz(@"hiya"); /* { dg-error "Cannot find interface declaration" } */ +} + +@interface NXConstantString +@end + +int bar() +{ + baz(@"howdah"); +} |