summaryrefslogtreecommitdiff
path: root/gcc/testsuite/obj-c++.dg/strings/const-str-1.mm
blob: 754c99bf1ae4f2e4f798a1be1b2af76940211b77 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/* Test errors for constant strings.  */
/* { dg-do compile } */
/* { dg-options "-mno-constant-cfstrings" { target *-*-darwin* } } */

#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");
}