Order problems with constants and static inline arrays
Submitted by Simon Werbeck
Link to original bug (#727667)
Description
Now that inline arrays can take arbitrary constant expressions as length, the following program should actually compile:
public class Test : Object {
const size_t CACHE_SIZE = 512;
static int cache[CACHE_SIZE];
}
void main (string[] args) {
}
However, the generated C code looks like this:
static gint test_cache[TEST_CACHE_SIZE];
static gint test_cache[TEST_CACHE_SIZE] = {0};
// ...
#define TEST_CACHE_SIZE ((gsize) 512)
Edited by Rico Tzschichholz