Inline-allocated arrays with initializer list don't work in async methods
Vala code:
async void func() {
int arr[] = {1, 2};
}
Generated C code:
struct _FuncData {
int _state_;
GObject* _source_object_;
GAsyncResult* _res_;
GTask* _async_result;
GAsyncReadyCallback _callback_;
gboolean _task_complete_;
gint arr[2];
gint _tmp0_;
};
...
static gboolean
func_co (FuncData* _data_)
{
...
memset (&_data_->_tmp0_, 0, sizeof (gint));
_data_->_tmp0_[0] = 1;
_data_->_tmp0_[1] = 2;
memcpy (_data_->arr, _data_->_tmp0_, 2 * sizeof (gint));
...
}
But _tmp0_
is not an array, so the gcc compilation fails.