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