Announce SDCC 4.5.0 RC2.
[sdcc.git] / sdcc / support / valdiag / tests / const.c
blob508208140bce671b03867ec64c3ed9c6c5adbf17
2 char a;
3 const char ca=2;
4 const char *pca;
5 char * const cpa=&a;
7 void test(void)
9 a = 1;
10 #ifdef TEST1
11 ca = a; /* ERROR */
12 #endif
13 #ifdef TEST2
14 pca = &a;
15 *pca = 2; /* ERROR */
16 #endif
17 #ifdef TEST3
18 *cpa = 3;
19 cpa = &ca; /* ERROR */
20 #endif