struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / bug1458678.c
blob5aa75e93e13ddc4a94a6187693c47f13e4436519
1 /*
2 bug 1458678
3 */
5 #include <testfwk.h>
7 /* no need to call this, it generates compiler error:
8 error 33: Attempt to assign value to a constant variable (=)
9 The keyword "const" seems to
10 be attributed to the value pointed to
11 instead of to the pointer itself
13 void should_not_give_error(char * const w)
15 w[0]='a';
18 /* (OK) */
19 void does_not_give_error(char * w)
21 w[0]='a';
24 /* this correctly gives error 33, therefore cannot be regression tested
25 void gives_error(const char * w)
27 w[0]='a';
31 void
32 testDummy(void)