Hi, warum will der AVR-gcc folgendes nicht:
1 | void fun(void) |
2 | {
|
3 | static const uint16_t c_datalen = 500; /**< loggin buffer size */ |
4 | static uint8_t s_data[c_datalen]; /**< logging buffer */ |
5 | |
6 | // more code
|
7 | }
|
da kommt nur die meldung: error: storage size of 's_data' isn't constant sieht für mich aber sehr konstant aus! Ich verwende lieber constanten als #defines. Bin mir ziemlich sicher, dass andere Compiler das akzeptieren. ist das ein gcc-Bug? Gruß, vlad edit:code