2 // The LLVM Compiler Infrastructure
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
11 // Created by Blaine Garst on 3/21/08.
13 // shouldn't be able to assign to a const pointer
14 // CONFIG error: assignment of read-only
18 void foo(void) { printf("I'm in foo\n"); }
19 void bar(void) { printf("I'm in bar\n"); }
21 int main(int argc
, char *argv
[]) {
22 void (*const fptr
)(void) = foo
;
23 void (^const blockA
)(void) = ^ { printf("hello\n"); };
24 blockA
= ^ { printf("world\n"); } ;
26 printf("%s: success\n", argv
[0]);