aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.apple/const-cfstring-2.c
blob: cbf09d3a977176f6c1a1441cb8d877a3ca6784e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
/* APPLE LOCAL file constant CFStrings */
/* Test whether the __builtin__CFStringMakeConstantString 
   "function" fails gracefully when used without the
   -fconstant-cfstrings flag.  */
/* Developed by Ziemowit Laski <zlaski@apple.com>.  */

/* { dg-options "-fno-constant-cfstrings" } */
/* { dg-do compile { target *-*-darwin* } } */

typedef const struct __CFString *CFStringRef;

const CFStringRef S = ((CFStringRef)__builtin___CFStringMakeConstantString("Testing"));
/* { dg-error "built-in" "built-in function .* requires .* flag" { target *-*-* } 12 } */