]> git.sur5r.net Git - cc65/blob - test/ref/cc65091007.c
Only for jumps, the lib uses named asm labels in branches
[cc65] / test / ref / cc65091007.c
1 /*
2   !!DESCRIPTION!!
3   !!ORIGIN!!      testsuite
4   !!LICENCE!!     Public Domain
5   !!AUTHOR!!      Johan Kotlinski
6 */
7
8 #include <stdio.h>
9
10 /*
11 This produces the compiler error "test.c(9): Error: Assignment to const"
12 Shouldn't be an error, should it? baz is const, bar isn't.
13 */
14
15 typedef struct {
16     char foo;
17 } Bar;
18
19 int main() {
20     Bar bar;
21     Bar* const baz = &bar;
22
23     baz->foo = 1;
24
25     printf("it works :)\n");
26
27     return 0;
28 }
29