Код
void Func (Task *task)
{
uint8_t results[task->groupCount];
}
{
uint8_t results[task->groupCount];
}
В IAR получаю ошибку
Цитата
Error[Pe060]: this operator is not allowed in an integral constant expression
Переписываю
Код
void Func (Task *task)
{
uint32_t n = task->groupCount;
uint8_t results[n];
}
{
uint32_t n = task->groupCount;
uint8_t results[n];
}
Получаю
Цитата
Error[Pe028]: expression must have a constant value
Кому верить?
Ну положим IAR беспокоиться за stack overflow. Но дайте это опционально, на выбор. А то сразу жесткий error.