blob: 0c7c326100ea50c9922d22faa5f9c44a95fcbca9 (
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
26
27
28
29
30
|
/* APPLE LOCAL file */
/* Test constant cfstring and writabe strings interaction.
Radar 3978580. */
/* Developed by Devang Patel <dpatel@apple.com>. */
/* { dg-do assemble { target *-*-darwin* } } */
/* { dg-options "-fconstant-cfstrings -fwritable-strings" } */
typedef const struct __CFString *CFStringRef;
#ifdef __CONSTANT_CFSTRINGS__
#define CFSTR(STR) ((CFStringRef) __builtin___CFStringMakeConstantString (STR))
#else
#error __CONSTANT_CFSTRINGS__ not defined
#endif
extern void bar (const void **);
static void foo()
{
CFStringRef keys[] =
{
CFSTR("blah1"),
CFSTR("blah2")
};
int count = sizeof(keys) / sizeof(keys[0]);
bar ((const void **)keys);
}
|