The following code fails to compile with SDCC 4.1 due to a bogus compilation error:
static inline int f(const int x) {
return x;
}
static inline void g(void) {
f(0);
}
void main(void) {
g();
}
Output:
$ sdcc test.c
-:0: error 33: Attempt to assign value to a constant variable (=)
$ sdcc -v
SDCC : mcs51/z80/z180/r2k/r2ka/r3ka/gbz80/tlcs90/ez80_z80/z80n/ds390/pic16/pic14/TININative/ds400/hc08/s08/stm8/pdk13/pdk14/pdk15 4.1.0 #12072 (Linux)
published under GNU General Public License (GPL)
Fixed in [r12541]
Thanks, Erik!